Put the character at the staircase when going down
Always put the character at the up staircase when going down a level, even when going down to a level we've already generated.
This commit is contained in:
parent
5337d7c0eb
commit
2fc4fcfee9
1 changed files with 1 additions and 1 deletions
|
@ -304,6 +304,7 @@ handleCommand GoDown = do
|
||||||
pCharacter <- entities . at cEID <<.= Nothing
|
pCharacter <- entities . at cEID <<.= Nothing
|
||||||
levels .= levs'
|
levels .= levs'
|
||||||
entities . at cEID .= pCharacter
|
entities . at cEID .= pCharacter
|
||||||
|
characterPosition .= extract levs' ^. upStaircasePosition
|
||||||
else say_ ["cant", "goDown"]
|
else say_ ["cant", "goDown"]
|
||||||
|
|
||||||
continue
|
continue
|
||||||
|
@ -599,7 +600,6 @@ genLevel _num = do
|
||||||
level <- case generator of
|
level <- case generator of
|
||||||
CaveAutomata -> generateLevel SCaveAutomata CaveAutomata.defaultParams dims
|
CaveAutomata -> generateLevel SCaveAutomata CaveAutomata.defaultParams dims
|
||||||
Dungeon -> generateLevel SDungeon Dungeon.defaultParams dims
|
Dungeon -> generateLevel SDungeon Dungeon.defaultParams dims
|
||||||
characterPosition .= level ^. levelCharacterPosition
|
|
||||||
pure $!! level
|
pure $!! level
|
||||||
|
|
||||||
levelToGameLevel :: Level -> GameLevel
|
levelToGameLevel :: Level -> GameLevel
|
||||||
|
|
Loading…
Reference in a new issue