Defunction-ify item modules, requires more cleanup

This commit is contained in:
2022-06-08 12:28:11 +01:00
parent d91a53f76c
commit bcbfd7d2fa
48 changed files with 762 additions and 740 deletions
+4 -5
View File
@@ -9,19 +9,18 @@ import Color
--import Geometry
import Control.Lens
makeTypeCraftNum :: Int -> CombineType -> Item
makeTypeCraftNum :: Int -> ItemBaseType -> Item
makeTypeCraftNum i ct = defaultCraftable
{ _itInvSize = 0.5
, _itCurseStatus = Uncursed
, _itName = show ct
, _itType = ct
, _itConsumption = ItemItselfConsumable i
}
& itType . iyBase .~ ct
makeTypeCraft :: CombineType -> Item
makeTypeCraft :: ItemBaseType -> Item
makeTypeCraft = makeTypeCraftNum 1
makeModule :: CombineType -> Item
makeModule :: ItemBaseType -> Item
makeModule ct = makeTypeCraft ct
& itInvSize .~ 1
& itInvColor .~ chartreuse