Add in "linear" lWorld to separate time reversable worlds

This commit is contained in:
2022-10-28 12:24:51 +01:00
parent 5f6bd43599
commit 7e790b7153
130 changed files with 827 additions and 980 deletions
+4 -3
View File
@@ -29,7 +29,8 @@ useTimeScrollGun itm _ w = w & timeFlow .~ ScrollTimeFlow
}
useRewindGun :: Item -> Creature -> World -> World
useRewindGun _ _ w = w
useRewindGun itm _ w = w & timeFlow .~ RewindLeftClick (itm ^?! itUse . leftConsumption . wpCharge)
--useRewindGun _ _ w = case w ^. cwTime . rewindWorlds of
-- [w'] -> w & cwTime . maybeWorld .~ Just' w'
-- (w' : ws) -> w
@@ -50,7 +51,7 @@ useShrinkGun it cr w = case it ^? itParams . shrinkGunStatus of
invid = _ipInvID $ _itLocation it
tryResize x g = maybe w g $ sizeSelf x cr w
f isInUse cstatus =
cWorld . creatures . ix (_crID cr) . crInv . ix invid
cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix invid
%~ ((itParams . shrinkGunStatus .~ isInUse) . (itCurseStatus .~ cstatus))
boostSelfL ::
@@ -107,7 +108,7 @@ addBoostShockwave ::
World ->
World
addBoostShockwave pjid p v w =
w & cWorld . linearShockwaves
w & cWorld . lWorld . linearShockwaves
%~ IM.insertWith f pjid thePJ
where
thePJ =