Implement copier, an item that copies the value displayed by other items
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user