Defunction-ify item modules, requires more cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user