Mapper, ARHUD, radar sweeps update. Add dropper items
This commit is contained in:
@@ -36,7 +36,7 @@ useItemLoc cr loc pt w
|
||||
, cr ^. crStance . posture == Aiming =
|
||||
return $ heldEffect pt (bimap _iatType (^. _1) ldt) cr w
|
||||
| GadgetPlatformSF <- sf =
|
||||
return $ heldEffect pt (bimap _iatType (^. _1) ldt) cr w
|
||||
return $ gadgetEffect pt loc cr w
|
||||
| UnderBarrelPlatformSF <- sf
|
||||
, fromMaybe False $ loc ^? locLDT . ldtValue . _1 . itLocation . ilIsAttached
|
||||
, cr ^. crStance . posture == Aiming =
|
||||
@@ -79,6 +79,8 @@ structureUseAtLoc :: ItemStructuralFunction -> Bool
|
||||
structureUseAtLoc = \case
|
||||
HeldPlatformSF -> True
|
||||
UnderBarrelPlatformSF -> True
|
||||
GadgetPlatformSF -> True
|
||||
MapperSF -> True
|
||||
_ -> False
|
||||
|
||||
activateDetonator ::
|
||||
|
||||
@@ -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 ->
|
||||
|
||||
Reference in New Issue
Block a user