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 PRISM] (makeTypeCraft LIGHTSENSOR)
, po [cr MICROCHIP, cr MICROPHONE] (makeTypeCraft SOUNDSENSOR) , po [cr MICROCHIP, cr MICROPHONE] (makeTypeCraft SOUNDSENSOR)
, po [cr MICROCHIP, cr THERMOMETER] (makeTypeCraft HEATSENSOR) , po [cr MICROCHIP, cr THERMOMETER] (makeTypeCraft HEATSENSOR)
, po [cr MICROCHIP, cr TRANSMITTER, cr LIGHTSENSOR] (autoDetector ITEMDETECTOR) , po [cr MICROCHIP, cr TRANSMITTER, cr LIGHTSENSOR] (clickDetector ITEMDETECTOR)
, po [cr MICROCHIP, cr TRANSMITTER, cr SOUNDSENSOR] (autoDetector WALLDETECTOR) , po [cr MICROCHIP, cr TRANSMITTER, cr SOUNDSENSOR] (clickDetector WALLDETECTOR)
, po [cr MICROCHIP, cr TRANSMITTER, cr HEATSENSOR] (autoDetector CREATUREDETECTOR) , po [cr MICROCHIP, cr TRANSMITTER, cr HEATSENSOR] (clickDetector CREATUREDETECTOR)
, po [AMMOMAG BATTERY, cr LED] torch , po [AMMOMAG BATTERY, cr LED] torch
, po [hd TORCH, eq HAT] headLamp , po [hd TORCH, eq HAT] headLamp
-- , po [cr LIGHTER, cr THERMOMETER, cr MICROCHIP] (energyBallCraft IncBall) -- , 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 , makeTypeCraftNum 1 CREATURESENSOR
] ]
'C' -> 'C' ->
[ autoDetector CREATUREDETECTOR [ wristInvisibility
, autoDetector WALLDETECTOR
, autoDetector ITEMDETECTOR
, wristInvisibility
] ]
'D' -> 'D' ->
[ blinkGun [ blinkGun
, unsafeBlinkGun , unsafeBlinkGun
, autoDetector WALLDETECTOR , clickDetector WALLDETECTOR
] ]
'E' -> fold 'E' -> fold
[ makeTypeCraftNum 3 PIPE [ makeTypeCraftNum 3 PIPE
@@ -264,7 +261,6 @@ testInventory =
[ autoAmr [ autoAmr
, brainHat , brainHat
, headLamp , headLamp
, autoDetector WALLDETECTOR
, magShield , magShield
, frontArmour , frontArmour
, wristArmour , wristArmour
+1 -1
View File
@@ -189,7 +189,7 @@ invItemLocUpdate loc w = case itm ^. itType of
tryUseParent :: LocationLDT ItemLink ComposedItem -> World -> World tryUseParent :: LocationLDT ItemLink ComposedItem -> World -> World
tryUseParent loc w = fromMaybe w $ do tryUseParent loc w = fromMaybe w $ do
t <- locUp loc t <- locUp loc
let t' = bimap (_iatType) (^. _1) $ t ^. locLDT let t' = bimap (^. iatType) (^. _1) $ t ^. locLDT
cr <- w ^? cWorld . lWorld . creatures . ix 0 cr <- w ^? cWorld . lWorld . creatures . ix 0
return $ heldEffectNoHammerCheck t' cr w return $ heldEffectNoHammerCheck t' cr w
-1
View File
@@ -113,7 +113,6 @@ data EquipItemType
| BULLETBELTPACK | BULLETBELTPACK
| BULLETBELTBRACER | BULLETBELTBRACER
| BATTERYPACK | BATTERYPACK
| AUTODETECTOR Detector
| WRIST_ECG | WRIST_ECG
deriving (Eq, Ord, Show, Read) deriving (Eq, Ord, Show, Read)
-2
View File
@@ -9,7 +9,6 @@ module Dodge.Data.Item.HeldUse where
import Data.Aeson import Data.Aeson
import Data.Aeson.TH import Data.Aeson.TH
import Dodge.Data.CamouflageStatus import Dodge.Data.CamouflageStatus
import Dodge.Data.Item.Combine
import Control.Lens import Control.Lens
data Cuse data Cuse
@@ -19,7 +18,6 @@ data Cuse
data Euse data Euse
= EDoNothing = EDoNothing
| EDetector {_euseDetector :: Detector}
| EMagShield | EMagShield
| EWristShield | EWristShield
| EHeadLamp | EHeadLamp
-5
View File
@@ -9,9 +9,6 @@ import Dodge.Data.World
import Dodge.Default.Wall import Dodge.Default.Wall
import Dodge.Item.HeldOffset import Dodge.Item.HeldOffset
import Dodge.Item.Location 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.Create
import Dodge.Wall.Delete import Dodge.Wall.Delete
import Dodge.Wall.ForceField import Dodge.Wall.ForceField
@@ -23,7 +20,6 @@ import LensHelp
useE :: Euse -> Item -> Creature -> World -> World useE :: Euse -> Item -> Creature -> World -> World
useE eo = case eo of useE eo = case eo of
EDoNothing -> const $ const id EDoNothing -> const $ const id
EDetector dt -> autoEffect (detectorEffect dt) 100 click1S
EMagShield -> useMagShield EMagShield -> useMagShield
EWristShield -> setWristShieldPos EWristShield -> setWristShieldPos
EHeadLamp -> createHeadLamp EHeadLamp -> createHeadLamp
@@ -31,7 +27,6 @@ useE eo = case eo of
EonWristShield -> onEquipWristShield EonWristShield -> onEquipWristShield
EoffWristShield -> onRemoveWristShield EoffWristShield -> onRemoveWristShield
EFuelSource 0 _ -> const . const id EFuelSource 0 _ -> const . const id
--EFuelSource{} -> trySiphonFuel
EFuelSource{} -> const . const id EFuelSource{} -> const . const id
EBatterySource{} -> tryChargeBattery EBatterySource{} -> tryChargeBattery
EAmmoSource{} -> tryAttachBulletBelt EAmmoSource{} -> tryAttachBulletBelt
-1
View File
@@ -71,7 +71,6 @@ itemFromEquipType et = case et of
FUELPACK -> fuelPack FUELPACK -> fuelPack
BULLETBELTPACK -> bulletBeltPack BULLETBELTPACK -> bulletBeltPack
BULLETBELTBRACER -> bulletBeltBracer BULLETBELTBRACER -> bulletBeltBracer
AUTODETECTOR d -> autoDetector d
WRIST_ECG -> pulseChecker WRIST_ECG -> pulseChecker
itemFromLeftType :: LeftItemType -> Item itemFromLeftType :: LeftItemType -> Item
+1 -14
View File
@@ -79,20 +79,6 @@ showAutoRechargeProgress lc = case lc of
| otherwise -> show (_arLoaded lc) | otherwise -> show (_arLoaded lc)
ChargeableAmmo{} -> show (_wpCharge 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 :: Creature -> ComposedItem -> [String]
itemNumberDisplay cr ci = case (ci ^. _2, itm ^?! itUse, itm ^. itType) of itemNumberDisplay cr ci = case (ci ^. _2, itm ^?! itUse, itm ^. itType) of
(_,_,EQUIP WRIST_ECG) -> [displayPulse $ cr ^?! crType . avatarPulse . pulseProgress] (_,_,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 itm = ci ^. _1
displayPulse :: Int -> String displayPulse :: Int -> String
displayPulse 0 = "*****"
displayPulse x = take 5 $ drop y "----^-----" displayPulse x = take 5 $ drop y "----^-----"
where where
y = min 5 $ x `div` 3 y = min 5 $ x `div` 3
-1
View File
@@ -91,7 +91,6 @@ equipItemSPic et _ = case et of
noPic $ colorSH green backpackShape noPic $ colorSH green backpackShape
BULLETBELTBRACER -> BULLETBELTBRACER ->
noPic (colorSH green $ upperPrismPolySU 3 $ rectWH 2 2) noPic (colorSH green $ upperPrismPolySU 3 $ rectWH 2 2)
AUTODETECTOR dt -> noPic (colorSH (detectorColor dt) $ upperPrismPolySU 3 $ rectWH 2 2)
backpackShape :: Shape backpackShape :: Shape
backpackShape = upperPrismPolyMT 10 $ rectNSWE 5 (-5) (-4) 4 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." BULLETBELTPACK -> "A container holding a long belt of bullets."
BULLETBELTBRACER -> "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." 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." WRIST_ECG -> "A wristworn device that detects the hearts electrical activity."
--targetingInfo :: TargetingType -> String --targetingInfo :: TargetingType -> String
+2 -14
View File
@@ -1,22 +1,10 @@
module Dodge.Item.Weapon.Radar module Dodge.Item.Weapon.Radar (
( autoDetector detectorEffect,
, detectorEffect
) where ) where
import Control.Lens
import Dodge.Data.World import Dodge.Data.World
import Dodge.Default
import Dodge.RadarSweep 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 :: Detector -> Item -> Creature -> World -> World
detectorEffect dt = case dt of detectorEffect dt = case dt of
ITEMDETECTOR -> const (aRadarPulse ObItem) ITEMDETECTOR -> const (aRadarPulse ObItem)
+1 -2
View File
@@ -17,8 +17,7 @@ lockRoomMultiItems =
[ [
( blinkAcrossChallenge ( blinkAcrossChallenge
, takeOne , takeOne
[ [LEFT BLINKERUNSAFE, EQUIP $ AUTODETECTOR WALLDETECTOR] [ [LEFT BLINKERUNSAFE, HELD $ DETECTOR WALLDETECTOR]
, [LEFT BLINKERUNSAFE, HELD $ DETECTOR WALLDETECTOR]
] ]
) )
] ]