Implement zipper for attachment trees

This commit is contained in:
2024-10-05 14:39:34 +01:00
parent 71d4802a4a
commit 164beeea6d
23 changed files with 391 additions and 277 deletions
+3 -2
View File
@@ -26,7 +26,8 @@ defaultHeldItem = Item
{ _itCurseStatus = Uncursed
, _itType = HELD PISTOL
, _itEffect = defaultItEffect
, _itID = 0
, _itID = 0 -- should this return an error ? const $ error "itID not correctly initialised" ?
, _itAmmoSlots = mempty
, _itInvSize = 1
, _itLocation = InVoid
, _itDimension = defaultItemDimension
@@ -45,7 +46,7 @@ singleAmmo x = IM.insert 0 x mempty
defaultBulletWeapon :: Item
defaultBulletWeapon = defaultHeldItem
& itUse . heldAmmoTypes .~ singleAmmo BulletAmmo
& itAmmoSlots .~ singleAmmo BulletAmmo
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.01 0 PistolFlare MuzzleShootBullet]
defaultConsumable :: Item
-1
View File
@@ -30,7 +30,6 @@ defaultHeldUse = UseHeld
{ _heldDelay = FixedRate{_rateMax = 8, _rateTime = 0}
, _heldHammer = HammerUp
, _heldAim = defaultAimParams
, _heldAmmoTypes = mempty
, _heldParams = BulletShooterParams
{ _muzVel = ConstFloat 0.8
, _rifling = ConstFloat 0.8