summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2020-05-02 09:35:01 -0400
committergumi <git@gumi.ca>2020-05-03 11:46:22 -0400
commitb12f1ff8be37346ec70ab50447c8f03bd9a990e1 (patch)
tree3e209166b7982bb065de402a040fc87bc7a928d8 /src/map/script.c
parentd958a36388644a9e58b63da0458f836d198833c8 (diff)
downloadhercules-b12f1ff8be37346ec70ab50447c8f03bd9a990e1.tar.gz
hercules-b12f1ff8be37346ec70ab50447c8f03bd9a990e1.tar.bz2
hercules-b12f1ff8be37346ec70ab50447c8f03bd9a990e1.tar.xz
hercules-b12f1ff8be37346ec70ab50447c8f03bd9a990e1.zip
add a config flag to allow to local functions to be event handlers
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 6f21f2a82..bf9348645 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -4973,6 +4973,7 @@ static bool script_config_read(const char *filename, bool imported)
libconfig->setting_lookup_bool_real(setting, "warn_func_mismatch_paramnum", &script->config.warn_func_mismatch_paramnum);
libconfig->setting_lookup_bool_real(setting, "warn_func_mismatch_argtypes", &script->config.warn_func_mismatch_argtypes);
libconfig->setting_lookup_bool_real(setting, "functions_private_by_default", &script->config.functions_private_by_default);
+ libconfig->setting_lookup_bool_real(setting, "functions_as_events", &script->config.functions_as_events);
libconfig->setting_lookup_int(setting, "check_cmdcount", &script->config.check_cmdcount);
libconfig->setting_lookup_int(setting, "check_gotocount", &script->config.check_gotocount);
libconfig->setting_lookup_int(setting, "input_min_value", &script->config.input_min_value);
@@ -28576,6 +28577,7 @@ void script_defaults(void)
script->config.ontouch2_name = "OnTouch"; //ontouch2_name (run whenever a char walks into the OnTouch area)
script->config.onuntouch_name = "OnUnTouch"; //onuntouch_name (run whenever a char walks from the OnTouch area)
script->config.functions_private_by_default = true;
+ script->config.functions_as_events = false;
// for ENABLE_CASE_CHECK
script->calc_hash_ci = calc_hash_ci;