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
 | 
			
		||||
    levels .= levs'
 | 
			
		||||
    entities . at cEID .= pCharacter
 | 
			
		||||
    characterPosition .= extract levs' ^. upStaircasePosition
 | 
			
		||||
  else say_ ["cant", "goDown"]
 | 
			
		||||
 | 
			
		||||
  continue
 | 
			
		||||
| 
						 | 
				
			
			@ -599,7 +600,6 @@ genLevel _num = do
 | 
			
		|||
  level <- case generator of
 | 
			
		||||
    CaveAutomata -> generateLevel SCaveAutomata CaveAutomata.defaultParams dims
 | 
			
		||||
    Dungeon -> generateLevel SDungeon Dungeon.defaultParams dims
 | 
			
		||||
  characterPosition .= level ^. levelCharacterPosition
 | 
			
		||||
  pure $!! level
 | 
			
		||||
 | 
			
		||||
levelToGameLevel :: Level -> GameLevel
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue