Allow for separate equipment positions on body

This commit is contained in:
2022-05-21 14:41:49 +01:00
parent 398ed6d982
commit 8ad332aced
8 changed files with 69 additions and 10 deletions
+14 -3
View File
@@ -127,9 +127,20 @@ subInventoryDisplay subinv cfig w = case subinv of
cury = fromMaybe 1 $ augmentedInvSizes w IM.!? _crInvSel (you w)
equipcursor = case _crLeftInvSel cr of
Nothing -> mempty
Just invid -> f cyan invid
equipcursors = foldMap (f yellow) (IS.toList $ _crInvEquipped cr)
f col invid = listTextPictureAt 144 0 cfig (selNumPos invid w) . color col $ text "EQUIPPED"
Just invid -> f' cyan invid
equipcursors = IM.foldMapWithKey (f yellow) (_crInvEquipped cr)
f' col invid = listTextPictureAt 144 0 cfig (selNumPos invid w) . color col $ text "EQUIPPED"
f col invid epos = listTextPictureAt 144 0 cfig (selNumPos invid w) . color col $ text $ eqPosText epos
eqPosText :: EquipPosition -> String
eqPosText ep = case ep of
OnHead -> "HEAD"
OnChest -> "CHEST"
OnBack -> "BACK"
OnLeftWrist -> "L-WRIST"
OnRightWrist -> "R-WRIST"
OnLegs -> "LEGS"
OnSpecial -> "EQUIPPED"
topInvW :: Int
topInvW = 15