Keep inventory as intmap, start to allow items of different sizes

This commit is contained in:
2021-11-30 15:33:15 +00:00
parent 184c0c09c1
commit 27b1a6da9e
8 changed files with 87 additions and 57 deletions
+3 -3
View File
@@ -140,7 +140,7 @@ defaultEquipment = Equipment
, _itID = Nothing
, _itZoom = defaultItZoom
, _itInvColor = yellow
, _itInvDisplay = _itName
, _itInvDisplay = \it -> [_itName it]
, _itDimension = defaultItemDimension
}
defaultItZoom :: ItZoom
@@ -157,7 +157,7 @@ defaultConsumable = Consumable
, _itEquipPict = \_ _ -> (,) emptySH blank
, _itID = Nothing
, _itInvColor = blue
, _itInvDisplay = \it -> _itName it ++ " x" ++ show (_itAmount it)
, _itInvDisplay = \it -> [_itName it ++ " x" ++ show (_itAmount it)]
, _itEffect = NoItEffect
, _itDimension = defaultItemDimension
}
@@ -204,7 +204,7 @@ defaultIt = Consumable
, _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ polygon $ square 3
, _itEquipPict = \_ _ -> (,) emptySH blank
, _itID = Nothing
, _itInvDisplay = _itName
, _itInvDisplay = (:[]) . _itName
, _itInvColor = blue
, _itEffect = NoItEffect
}