Implement copier, an item that copies the value displayed by other items

This commit is contained in:
2025-01-08 14:29:25 +00:00
parent 47aa8655b1
commit 21b7b863c7
12 changed files with 184 additions and 142 deletions
+8 -6
View File
@@ -3,6 +3,8 @@ module Dodge.Creature.State (
doDamage,
) where
--import Dodge.Inventory.SelectionList
--import Dodge.Item.Location
import Control.Applicative
import Dodge.HeldUse
import Control.Monad
@@ -288,13 +290,13 @@ updateItemWithOrientation ::
LocationLDT ItemLink ComposedItem ->
World ->
World
updateItemWithOrientation cr m loc@(LocLDT _ itmtree) =
updateItemWithOrientation cr m loc@(LocLDT _ itmtree) w =
case (ci ^. _1 . itType, ci ^. _2) of
(HELD TORCH, _) -> shineTorch cr itmtree m
(HELD LASER, WeaponTargetingSF) -> shineTargetLaser cr itmtree m
(TARGETING tt, _) -> updateItemTargeting tt cr itm
(ARHUD, _) -> drawARHUD loc
_ -> id
(HELD TORCH, _) -> shineTorch cr itmtree m w
(HELD LASER, WeaponTargetingSF) -> shineTargetLaser cr itmtree m w
(TARGETING tt, _) -> updateItemTargeting tt cr itm w
(ARHUD, _) -> drawARHUD loc w
_ -> w
where
ci = itmtree ^. ldtValue
itm = ci ^. _1