diff options
author | Griffin Smith <root@gws.fyi> | 2020-01-20T15·31-0500 |
---|---|---|
committer | Griffin Smith <root@gws.fyi> | 2020-01-20T15·31-0500 |
commit | 72edcff32307ffebda07d350634792cc86b268bb (patch) | |
tree | 46ea73be1b22c58bc07e8e9d6fc60f1f74c33a17 /src/Xanthous/App.hs | |
parent | d62aba218d1996b2c0541553c182313cfcc9843d (diff) |
Put new levels at the right position in the list
New levels need to go at the *end* of the list of levels, not the beginning - otherwise we jump to the proper position on the new level but the current level stays the same (oops).
Diffstat (limited to 'src/Xanthous/App.hs')
-rw-r--r-- | src/Xanthous/App.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Xanthous/App.hs b/src/Xanthous/App.hs index 2fd821af1cf7..577466328101 100644 --- a/src/Xanthous/App.hs +++ b/src/Xanthous/App.hs @@ -300,8 +300,7 @@ handleCommand GoDown = do let newLevelNum = Levels.pos levs + 1 levs' <- nextLevel (levelToEntityMap <$> genLevel newLevelNum) levs cEID <- use characterEntityID - pCharacter <- use $ entities . at cEID - entities . at cEID .= Nothing + pCharacter <- entities . at cEID <<.= Nothing levels .= levs' entities . at cEID .= pCharacter else say_ ["cant", "goDown"] |