More nesting of fields in CWorld
This commit is contained in:
+3
-3
@@ -20,7 +20,7 @@ useL lu = case lu of
|
||||
LBoost -> boostSelfL 10
|
||||
|
||||
useRewindGun :: Item -> Creature -> World -> World
|
||||
useRewindGun _ _ w = case _rewindWorlds (_cWorld w) of
|
||||
useRewindGun _ _ w = case w ^. cWorld . cwTime . rewindWorlds of
|
||||
[w'] -> rewindusing w' [w']
|
||||
(w' : ws) -> rewindusing w' ws
|
||||
_ -> w
|
||||
@@ -28,10 +28,10 @@ useRewindGun _ _ w = case _rewindWorlds (_cWorld w) of
|
||||
rewindusing :: CWorld -> [CWorld] -> World
|
||||
rewindusing w' ws =
|
||||
w
|
||||
& cWorld . maybeWorld
|
||||
& cWorld . cwTime . maybeWorld
|
||||
.~ Just'
|
||||
( w'
|
||||
& rewindWorlds .~ ws
|
||||
& cwTime . rewindWorlds .~ ws
|
||||
)
|
||||
|
||||
-- be careful changing this around; potential problems include updating the
|
||||
|
||||
Reference in New Issue
Block a user