lua timer fix

Commit 7a533a911c about three weeks
ago reordered a couple of timers.  The list of timers in nhlua.c was
overlooked at the time.

The theme room "Ice room" was affected.  I'm surprised that sanity
checking while running the fuzzer didn't notice and complain.
This commit is contained in:
PatR
2024-01-12 11:31:48 -08:00
parent 6274ad3259
commit 4609f23332
2 changed files with 8 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 nhlua.c $NHDT-Date: 1704497031 2024/01/05 23:23:51 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.126 $ */
/* NetHack 3.7 nhlua.c $NHDT-Date: 1705087450 2024/01/12 19:24:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.129 $ */
/* Copyright (c) 2018 by Pasi Kallinen */
/* NetHack may be freely redistributed. See license for details. */
@@ -255,10 +255,12 @@ get_table_mapchr_opt(lua_State *L, const char *name, schar defval)
short
nhl_get_timertype(lua_State *L, int idx)
{
/* these are in the same order as enum timeout_types in timeout.h and
ttable timeout_funcs[] in timeout.c, although not spelled the same */
static const char *const timerstr[NUM_TIME_FUNCS + 1] = {
"rot-organic", "rot-corpse", "revive-mon", "zombify-mon",
"burn-obj", "hatch-egg", "fig-transform", "melt-ice",
"shrink-glob", NULL
"burn-obj", "hatch-egg", "fig-transform", "shrink-glob",
"melt-ice", NULL
};
short ret = luaL_checkoption(L, idx, NULL, timerstr);