Debug flag allowing overwriting stairs
And using it in the movement tests, so running doesn't stop at stairs.
This commit is contained in:
10
src/nhlua.c
10
src/nhlua.c
@@ -974,7 +974,9 @@ nhl_doturn(lua_State *L)
|
||||
}
|
||||
|
||||
/* set debugging flags. debugging use only, of course. */
|
||||
/* nh.debug_flags({ mongen = false, hunger = false }); */
|
||||
/* nh.debug_flags({ mongen = false,
|
||||
hunger = false,
|
||||
overwrite_stairs = true }); */
|
||||
static int
|
||||
nhl_debug_flags(lua_State *L)
|
||||
{
|
||||
@@ -1004,6 +1006,12 @@ nhl_debug_flags(lua_State *L)
|
||||
iflags.debug_hunger = !(boolean)val; /* value in lua is negated */
|
||||
}
|
||||
|
||||
/* allow overwriting stairs */
|
||||
val = get_table_boolean_opt(L, "overwrite_stairs", -1);
|
||||
if (val != -1) {
|
||||
iflags.debug_overwrite_stairs = (boolean)val;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user