33 #define DBG_NG LOG_STREAM(debug, log_engine) 34 #define LOG_NG LOG_STREAM(info, log_engine) 35 #define WRN_NG LOG_STREAM(warn, log_engine) 38 #define DBG_EH LOG_STREAM(debug, log_event_handler) 46 : first_time_only_(cfg[
"first_time_only"].to_bool(true))
56 assert(!
disabled_ &&
"Trying to disable a disabled event. Shouldn't happen!");
67 DBG_NG <<
cfg_[
"name"] <<
" will now invoke the following command(s):\n" <<
cfg_;
void handle_event(const queued_event &event_info, game_lua_kernel &lk)
Handles the queued event, according to our WML instructions.
event_handler(config &&cfg, bool is_menu_item, const std::vector< std::string > &types)
static lg::log_domain log_engine("engine")
void disable()
Flag this handler as disabled.
static lg::log_domain log_event_handler("event_handler")
Define the handlers for the game's events mechanism.
A variable-expanding proxy for the config class.
Standard logging facilities (interface).
void commit_music_changes()
A config object defines a single node in a WML file, with access to child nodes.
bool run_wml_action(const std::string &, const vconfig &, const game_events::queued_event &)
Runs a command from an event handler.