Debug flag allowing overwriting stairs

And using it in the movement tests, so running doesn't stop
at stairs.
This commit is contained in:
Pasi Kallinen
2021-07-30 16:35:33 +03:00
parent 5580cd6286
commit b080ea12c2
5 changed files with 20 additions and 5 deletions

View File

@@ -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;
}