Improve radar/sonar

This commit is contained in:
2022-05-27 00:08:10 +01:00
parent 048b838e4b
commit 3234d6b86d
4 changed files with 57 additions and 24 deletions
+17 -2
View File
@@ -9,6 +9,7 @@ import Dodge.Item.Weapon.ExtraEffect
import Dodge.Item.Weapon.UseEffect
--import Dodge.Item.Weapon.Remote
import Dodge.Default.Weapon
import Dodge.SoundLogic
--import Dodge.Item.Weapon.Grenade
import Geometry
import Picture
@@ -70,8 +71,8 @@ Automatically sends out pulses that display walls. -}
autoRadar :: Item
autoRadar = defaultEquipment
{ _itType = RADAR
, _itName = "AUTORADAR"
, _itEquipPict = shapeForWrist (colorSH yellow $ upperPrismPoly 3 $ rectWH 2 2)
, _itName = "WALLFINDER"
, _itEquipPict = shapeForWrist (colorSH red $ upperPrismPoly 3 $ rectWH 2 2)
-- , _itEffect = autoRadarEffect
, _itID = Nothing
}
@@ -79,5 +80,19 @@ autoRadar = defaultEquipment
& itUse . eqUse .~ autoRadarEffect
& itUse . eqParams .~ EquipCounter 0
{- |
Automatically sends out pulses that display walls. -}
itemFinder :: Item
itemFinder = defaultEquipment
{ _itType = ITEMFINDER
, _itName = "ITEMFINDER"
, _itEquipPict = shapeForWrist (colorSH blue $ upperPrismPoly 3 $ rectWH 2 2)
-- , _itEffect = autoRadarEffect
, _itID = Nothing
}
& itUse . eqSite .~ GoesOnWrist
& itUse . eqUse .~ autoEffect anItemFindPulse 100 click1S
& itUse . eqParams .~ EquipCounter 0
shapeForWrist :: Shape -> Creature -> Item -> SPic
shapeForWrist = pictureOnEquip . noPic . translateSH (V3 0 4 (-4))