Mapper, ARHUD, radar sweeps update. Add dropper items

This commit is contained in:
2025-01-03 10:43:06 +00:00
parent e9f5a39ed7
commit 386d6f47b0
27 changed files with 802 additions and 700 deletions
+6 -4
View File
@@ -3,6 +3,7 @@ module Dodge.Creature.State (
doDamage,
) where
import Control.Applicative
import Dodge.HeldUse
import Control.Monad
import qualified Data.Map.Strict as M
@@ -291,16 +292,17 @@ updateItemWithOrientation cr m loc@(LocLDT _ itmtree) =
(HELD TORCH, _) -> shineTorch cr itmtree m
(HELD LASER, WeaponTargetingSF) -> shineTargetLaser cr itmtree m
(TARGETING tt, _) -> updateItemTargeting tt cr itm
(ATTACH AUGMENTEDHUD, _) -> drawAugmentedHUD loc
(ARHUD, _) -> drawARHUD loc
_ -> id
where
ci = itmtree ^. ldtValue
itm = ci ^. _1
drawAugmentedHUD :: LocationLDT ItemLink ComposedItem -> World -> World
drawAugmentedHUD (LocLDT con _) w = fromMaybe w $ do
drawARHUD :: LocationLDT ItemLink ComposedItem -> World -> World
drawARHUD (LocLDT con _) w = fromMaybe w $ do
itm <- con ^? cldtParent . _1
return $ w & cWorld . lWorld . flares <>~ drawTargeting itm w
return $ w & cWorld . lWorld . flares <>~ fold
(drawTargetingAR itm w <|> drawMapperAR itm w)
shineTargetLaser ::
Creature ->