Make concrete world read/showable

This commit is contained in:
2022-07-25 12:23:21 +01:00
parent f8f9fbe800
commit f5604ef429
6 changed files with 15 additions and 13 deletions
+4 -3
View File
@@ -29,7 +29,7 @@ onOffEff f g it
rewindEffect :: Item -> Creature -> World -> World
rewindEffect itm cr w
| Just invid == _crLeftInvSel cr = w & cWorld . rewindWorlds %~ (take maxcharge . (w' : ))
| Just invid == _crLeftInvSel cr = w & cWorld . rewindWorlds %~ (take maxcharge . (cw : ))
& ptrWpCharge .~ length (_rewindWorlds (_cWorld w))
| otherwise = w & cWorld . rewindWorlds .~ []
& ptrWpCharge .~ 0
@@ -37,8 +37,9 @@ rewindEffect itm cr w
invid = _ipInvID $ _itPos itm
ptrWpCharge = cWorld . creatures . ix (_crID cr) . crInv . ix invid . itConsumption . wpCharge
maxcharge = _wpMaxCharge . _itConsumption $ itm
w' = w & cWorld . rewindWorlds .~ []
& cWorld . timeFlow .~ NormalTimeFlow
cw = _cWorld w
& rewindWorlds .~ []
& timeFlow .~ NormalTimeFlow
resetAttachmentEffect :: Item -> Creature -> World -> World
resetAttachmentEffect itm cr w