Defunction-ify item modules, requires more cleanup
This commit is contained in:
@@ -23,9 +23,7 @@ import Control.Lens
|
||||
Sends out pulses that display walls. -}
|
||||
clickDetector :: Detector -> Item
|
||||
clickDetector dt = defaultGun
|
||||
{ _itName = show dt
|
||||
, _itType = CLICKDETECTOR dt
|
||||
, _itConsumption = defaultAmmo
|
||||
{ _itConsumption = defaultAmmo
|
||||
, _itUse = ruseRate 20 (detectorEffect dt) upHammer
|
||||
[ ammoUseCheck
|
||||
]
|
||||
@@ -34,12 +32,11 @@ clickDetector dt = defaultGun
|
||||
-- , _itZoom = defaultItZoom { _itZoomMax = 1}
|
||||
, _itEquipPict = pictureWeaponAim $ \_ -> (,) emptySH $ color blue $ polygon $ rectNESW 5 5 (-5) (-5)
|
||||
}
|
||||
& itType . iyBase .~ CLICKDETECTOR dt
|
||||
|
||||
autoDetector :: Detector -> Item
|
||||
autoDetector dt = defaultEquipment
|
||||
{ _itType = AUTODETECTOR dt
|
||||
, _itName = "AUTO-" ++ show dt
|
||||
, _itEquipPict = shapeForWrist (colorSH (detectorColor dt) $ upperPrismPoly 3 $ rectWH 2 2)
|
||||
{_itEquipPict = shapeForWrist (colorSH (detectorColor dt) $ upperPrismPoly 3 $ rectWH 2 2)
|
||||
-- , _itEffect = autoRadarEffect
|
||||
, _itID = Nothing
|
||||
}
|
||||
@@ -47,6 +44,7 @@ autoDetector dt = defaultEquipment
|
||||
& itUse . eqEq . eqUse .~ autoEffect (detectorEffect dt) 100 click1S
|
||||
& itUse . eqEq . eqParams .~ EquipCounter 0
|
||||
& itUse . eqEq . eqViewDist ?~ 350
|
||||
& itType . iyBase .~ AUTODETECTOR dt
|
||||
|
||||
detectorColor :: Detector -> Color
|
||||
detectorColor dt = case dt of
|
||||
|
||||
Reference in New Issue
Block a user