Lua: location-specific timers

Expose map-location specific timers to lua scripts. For example:

  nh.start_timer_at(x,y, "melt-ice", 10);

Currently only available timer type is "melt-ice".
This commit is contained in:
Pasi Kallinen
2022-03-15 13:46:50 +02:00
parent 006ae67029
commit 957c0fbee0
3 changed files with 131 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ enum timeout_types {
NUM_TIME_FUNCS
};
#define timer_is_pos(ttype) ((ttype) == MELT_ICE_AWAY)
#define timer_is_obj(ttype) ((ttype) == ROT_ORGANIC \
|| (ttype) == ROT_CORPSE \
|| (ttype) == REVIVE_MON \