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