Tweak equipment draw

This commit is contained in:
2021-11-19 14:24:31 +00:00
parent 4ef1811dd6
commit 6f518d720c
13 changed files with 33 additions and 41 deletions
+10 -1
View File
@@ -8,11 +8,20 @@ import ShapePicture
import qualified Data.IntMap.Strict as IM
import Control.Lens
pictureWeaponOnAim
:: Creature
-> Int -- ^ Position of item in inventory
-> SPic
pictureWeaponOnAim cr i = pictureWeaponOnAimItem pic cr i
where
it = _crInv cr IM.! i
pic = _itFloorPict it it
pictureWeaponOnAim'
:: (Item -> SPic)
-> Creature
-> Int -- ^ Position of item in inventory
-> SPic
pictureWeaponOnAim f cr i = pictureWeaponOnAimItem pic cr i
pictureWeaponOnAim' f cr i = pictureWeaponOnAimItem pic cr i
where
pic = f (_crInv cr IM.! i)