Improve click detectors
Introduce "gadgets" as a structural function, for items that can be used when held and when not held. Click detectors are such an item. Make click detectors correctly attach and use up batteries when used.
This commit is contained in:
@@ -38,7 +38,7 @@ singleAmmo x = IM.insert 0 x mempty
|
||||
defaultBulletWeapon :: Item
|
||||
defaultBulletWeapon = defaultHeldItem
|
||||
& itAmmoSlots .~ singleAmmo BulletAmmo
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.01 0 PistolFlare MuzzleShootBullet]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.01 0 PistolFlare MuzzleShootBullet (UseExactly 1)]
|
||||
|
||||
defaultConsumable :: Item
|
||||
defaultConsumable = defaultHeldItem & itUse .~ UseConsume CDoNothing
|
||||
|
||||
@@ -23,6 +23,7 @@ defaultAimParams =
|
||||
, _mzAmmoSlot = 0
|
||||
, _mzFlareType = DefaultFlareType
|
||||
, _mzEffect = MuzzleShootBullet
|
||||
, _mzAmmoPerShot = UseExactly 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user