Lua: nhcore script with function callbacks
Adds possible callbacks for "start_new_game", "restore_old_game", "moveloop_turn", and "game_exit" which when defined, will be called from core code at the appropriate time. Adds lua hooks for dump_fmtstr (only if DUMPLOG), dnum_name, u.moves, u.uhave_amulet, and u.depth.
This commit is contained in:
@@ -421,6 +421,16 @@ typedef struct sortloot_item Loot;
|
||||
#define SUPPRESS_HISTORY 4
|
||||
#define URGENT_MESSAGE 8
|
||||
|
||||
/* Lua callback functions */
|
||||
enum nhcore_calls {
|
||||
NHCORE_START_NEW_GAME = 0,
|
||||
NHCORE_RESTORE_OLD_GAME,
|
||||
NHCORE_MOVELOOP_TURN,
|
||||
NHCORE_GAME_EXIT,
|
||||
|
||||
NUM_NHCORE_CALLS
|
||||
};
|
||||
|
||||
/* Macros for messages referring to hands, eyes, feet, etc... */
|
||||
enum bodypart_types {
|
||||
ARM = 0,
|
||||
|
||||
Reference in New Issue
Block a user