Add fields to determine an item's inventory position/whether it is held

This commit is contained in:
2022-04-11 13:32:06 +01:00
parent d46d315203
commit c686d9e111
14 changed files with 107 additions and 113 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ import Geometry
renderInfoListAt :: Float -> Float -> Configuration -> World -> (Point2,[String]) -> Picture
renderInfoListAt x y cfig w (p,ss) = renderListAt x y cfig (zip ss (repeat yellow))
<> winScale cfig (color yellow $ lConnect (V2 (x-hw) (hh-20-y)) (worldPosToScreen w p))
<> winScale cfig (color yellow $ lConnect (V2 (x-hw) (hh-25-y)) (worldPosToScreen w p))
<> listCursorNSW x y cfig 0 yellow 19 (length ss)
where
hw = halfWidth cfig
+5 -2
View File
@@ -108,9 +108,12 @@ drawPathing cfig w
crDisplayInfo :: Configuration -> World -> Creature -> Maybe (Point2,[String])
crDisplayInfo cfig w cr
| _crID cr == 0 = Nothing
| crOnScreen = Just (_crPos cr, catMaybes
[fmap show $ ap ^? crGoal
,fmap show $ ap ^? crStrategy
-- [fmap show $ ap ^? crGoal
-- ,fmap show $ ap ^? crStrategy
[fmap show $ cr ^? crPos
,fmap show $ cr ^? crOldPos
,fmap show $ ap ^? crAction
,fmap show $ ap ^? crImpulse
]