Cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user