This commit is contained in:
2024-12-18 15:50:22 +00:00
parent 694bc2b060
commit 86d884ba01
12 changed files with 11 additions and 52 deletions
+3 -3
View File
@@ -103,9 +103,9 @@ itemCombinations =
, po [cr MICROCHIP, cr PRISM] (makeTypeCraft LIGHTSENSOR)
, po [cr MICROCHIP, cr MICROPHONE] (makeTypeCraft SOUNDSENSOR)
, po [cr MICROCHIP, cr THERMOMETER] (makeTypeCraft HEATSENSOR)
, po [cr MICROCHIP, cr TRANSMITTER, cr LIGHTSENSOR] (autoDetector ITEMDETECTOR)
, po [cr MICROCHIP, cr TRANSMITTER, cr SOUNDSENSOR] (autoDetector WALLDETECTOR)
, po [cr MICROCHIP, cr TRANSMITTER, cr HEATSENSOR] (autoDetector CREATUREDETECTOR)
, po [cr MICROCHIP, cr TRANSMITTER, cr LIGHTSENSOR] (clickDetector ITEMDETECTOR)
, po [cr MICROCHIP, cr TRANSMITTER, cr SOUNDSENSOR] (clickDetector WALLDETECTOR)
, po [cr MICROCHIP, cr TRANSMITTER, cr HEATSENSOR] (clickDetector CREATUREDETECTOR)
, po [AMMOMAG BATTERY, cr LED] torch
, po [hd TORCH, eq HAT] headLamp
-- , po [cr LIGHTER, cr THERMOMETER, cr MICROCHIP] (energyBallCraft IncBall)
+2 -6
View File
@@ -140,15 +140,12 @@ inventoryX c = case c of
, makeTypeCraftNum 1 CREATURESENSOR
]
'C' ->
[ autoDetector CREATUREDETECTOR
, autoDetector WALLDETECTOR
, autoDetector ITEMDETECTOR
, wristInvisibility
[ wristInvisibility
]
'D' ->
[ blinkGun
, unsafeBlinkGun
, autoDetector WALLDETECTOR
, clickDetector WALLDETECTOR
]
'E' -> fold
[ makeTypeCraftNum 3 PIPE
@@ -264,7 +261,6 @@ testInventory =
[ autoAmr
, brainHat
, headLamp
, autoDetector WALLDETECTOR
, magShield
, frontArmour
, wristArmour
+1 -1
View File
@@ -189,7 +189,7 @@ invItemLocUpdate loc w = case itm ^. itType of
tryUseParent :: LocationLDT ItemLink ComposedItem -> World -> World
tryUseParent loc w = fromMaybe w $ do
t <- locUp loc
let t' = bimap (_iatType) (^. _1) $ t ^. locLDT
let t' = bimap (^. iatType) (^. _1) $ t ^. locLDT
cr <- w ^? cWorld . lWorld . creatures . ix 0
return $ heldEffectNoHammerCheck t' cr w
-1
View File
@@ -113,7 +113,6 @@ data EquipItemType
| BULLETBELTPACK
| BULLETBELTBRACER
| BATTERYPACK
| AUTODETECTOR Detector
| WRIST_ECG
deriving (Eq, Ord, Show, Read)
-2
View File
@@ -9,7 +9,6 @@ module Dodge.Data.Item.HeldUse where
import Data.Aeson
import Data.Aeson.TH
import Dodge.Data.CamouflageStatus
import Dodge.Data.Item.Combine
import Control.Lens
data Cuse
@@ -19,7 +18,6 @@ data Cuse
data Euse
= EDoNothing
| EDetector {_euseDetector :: Detector}
| EMagShield
| EWristShield
| EHeadLamp
-5
View File
@@ -9,9 +9,6 @@ import Dodge.Data.World
import Dodge.Default.Wall
import Dodge.Item.HeldOffset
import Dodge.Item.Location
import Dodge.Item.Weapon.ExtraEffect
import Dodge.Item.Weapon.Radar
import Dodge.SoundLogic.ExternallyGeneratedSounds
import Dodge.Wall.Create
import Dodge.Wall.Delete
import Dodge.Wall.ForceField
@@ -23,7 +20,6 @@ import LensHelp
useE :: Euse -> Item -> Creature -> World -> World
useE eo = case eo of
EDoNothing -> const $ const id
EDetector dt -> autoEffect (detectorEffect dt) 100 click1S
EMagShield -> useMagShield
EWristShield -> setWristShieldPos
EHeadLamp -> createHeadLamp
@@ -31,7 +27,6 @@ useE eo = case eo of
EonWristShield -> onEquipWristShield
EoffWristShield -> onRemoveWristShield
EFuelSource 0 _ -> const . const id
--EFuelSource{} -> trySiphonFuel
EFuelSource{} -> const . const id
EBatterySource{} -> tryChargeBattery
EAmmoSource{} -> tryAttachBulletBelt
-1
View File
@@ -71,7 +71,6 @@ itemFromEquipType et = case et of
FUELPACK -> fuelPack
BULLETBELTPACK -> bulletBeltPack
BULLETBELTBRACER -> bulletBeltBracer
AUTODETECTOR d -> autoDetector d
WRIST_ECG -> pulseChecker
itemFromLeftType :: LeftItemType -> Item
+1 -14
View File
@@ -79,20 +79,6 @@ showAutoRechargeProgress lc = case lc of
| otherwise -> show (_arLoaded lc)
ChargeableAmmo{} -> show (_wpCharge lc)
--showReloadProgress :: Creature -> Item -> String
--showReloadProgress cr itm = case cr ^? crManipulation . manObject . inInventory . iselAction of
-- Just (ReloadAction i la) -> show i ++ showLoadActionType la ic
-- _ -> case ic of
-- InternalSource ia -> case ia ^? iaProgress . _Just . ix 0 of
-- Nothing -> show $ ia ^. iaLoaded
-- Just la -> show (_actionTime la) ++ showLoadActionType la ic
-- AboveSource -> fromMaybe "XXXX" $ do
-- i <- fmap (subtract 1) $ itm ^? itLocation . ipInvID
-- x <- cr ^? crInv . ix i . itUse . equipEffect . eeUse . euseAmmoAmount
-- return $ showIntKMG' x
-- where
-- ic = (itm ^?! itUse . heldConsumption . laSource)
itemNumberDisplay :: Creature -> ComposedItem -> [String]
itemNumberDisplay cr ci = case (ci ^. _2, itm ^?! itUse, itm ^. itType) of
(_,_,EQUIP WRIST_ECG) -> [displayPulse $ cr ^?! crType . avatarPulse . pulseProgress]
@@ -112,6 +98,7 @@ itemNumberDisplay cr ci = case (ci ^. _2, itm ^?! itUse, itm ^. itType) of
itm = ci ^. _1
displayPulse :: Int -> String
displayPulse 0 = "*****"
displayPulse x = take 5 $ drop y "----^-----"
where
y = min 5 $ x `div` 3
-1
View File
@@ -91,7 +91,6 @@ equipItemSPic et _ = case et of
noPic $ colorSH green backpackShape
BULLETBELTBRACER ->
noPic (colorSH green $ upperPrismPolySU 3 $ rectWH 2 2)
AUTODETECTOR dt -> noPic (colorSH (detectorColor dt) $ upperPrismPolySU 3 $ rectWH 2 2)
backpackShape :: Shape
backpackShape = upperPrismPolyMT 10 $ rectNSWE 5 (-5) (-4) 4
-1
View File
@@ -118,7 +118,6 @@ equipInfo eit = case eit of
BULLETBELTPACK -> "A container holding a long belt of bullets."
BULLETBELTBRACER -> "A container holding a long belt of bullets."
BATTERYPACK -> "A collection of batteries with a universal adapter."
AUTODETECTOR d -> "A device that detects " ++ detectorInfo d ++ " in an expanding radius. Pulses automatically. "
WRIST_ECG -> "A wristworn device that detects the hearts electrical activity."
--targetingInfo :: TargetingType -> String
+3 -15
View File
@@ -1,22 +1,10 @@
module Dodge.Item.Weapon.Radar
( autoDetector
, detectorEffect
) where
module Dodge.Item.Weapon.Radar (
detectorEffect,
) where
import Control.Lens
import Dodge.Data.World
import Dodge.Default
import Dodge.RadarSweep
autoDetector :: Detector -> Item
autoDetector dt =
defaultEquipment
& itUse . uequipEffect . eeSite .~ GoesOnWrist
& itUse . uequipEffect . eeUse .~ EDetector dt --autoEffect (detectorEffect dt) 100 click1S
& itUse . uequipEffect . eeParams .~ EquipCounter 0
& itUse . uequipEffect . eeViewDist ?~ 350
& itType .~ EQUIP (AUTODETECTOR dt)
detectorEffect :: Detector -> Item -> Creature -> World -> World
detectorEffect dt = case dt of
ITEMDETECTOR -> const (aRadarPulse ObItem)
+1 -2
View File
@@ -17,8 +17,7 @@ lockRoomMultiItems =
[
( blinkAcrossChallenge
, takeOne
[ [LEFT BLINKERUNSAFE, EQUIP $ AUTODETECTOR WALLDETECTOR]
, [LEFT BLINKERUNSAFE, HELD $ DETECTOR WALLDETECTOR]
[ [LEFT BLINKERUNSAFE, HELD $ DETECTOR WALLDETECTOR]
]
)
]