Separate out concrete part of world
This commit is contained in:
@@ -29,16 +29,16 @@ onOffEff f g it
|
||||
|
||||
rewindEffect :: Item -> Creature -> World -> World
|
||||
rewindEffect itm cr w
|
||||
| Just invid == _crLeftInvSel cr = w & rewindWorlds %~ (take maxcharge . (w' : ))
|
||||
& ptrWpCharge .~ length (_rewindWorlds w)
|
||||
| otherwise = w & rewindWorlds .~ []
|
||||
| Just invid == _crLeftInvSel cr = w & cWorld . rewindWorlds %~ (take maxcharge . (w' : ))
|
||||
& ptrWpCharge .~ length (_rewindWorlds (_cWorld w))
|
||||
| otherwise = w & cWorld . rewindWorlds .~ []
|
||||
& ptrWpCharge .~ 0
|
||||
where
|
||||
invid = _ipInvID $ _itPos itm
|
||||
ptrWpCharge = creatures . ix (_crID cr) . crInv . ix invid . itConsumption . wpCharge
|
||||
ptrWpCharge = cWorld . creatures . ix (_crID cr) . crInv . ix invid . itConsumption . wpCharge
|
||||
maxcharge = _wpMaxCharge . _itConsumption $ itm
|
||||
w' = w & rewindWorlds .~ []
|
||||
& timeFlow .~ NormalTimeFlow
|
||||
w' = w & cWorld . rewindWorlds .~ []
|
||||
& cWorld . timeFlow .~ NormalTimeFlow
|
||||
|
||||
resetAttachmentEffect :: Item -> Creature -> World -> World
|
||||
resetAttachmentEffect itm cr w
|
||||
@@ -47,7 +47,7 @@ resetAttachmentEffect itm cr w
|
||||
where
|
||||
iteff = _itEffect itm
|
||||
invid = _ipInvID $ _itPos itm
|
||||
pointToIt = creatures . ix (_crID cr) . crInv . ix invid
|
||||
pointToIt = cWorld . creatures . ix (_crID cr) . crInv . ix invid
|
||||
|
||||
createHeldLight :: Item -> Creature -> World -> World
|
||||
createHeldLight itm cr = createTorchLightOffset cr itm 0
|
||||
|
||||
Reference in New Issue
Block a user