diff options
author | Haru <haru@dotalux.com> | 2016-08-20 18:44:02 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-08-20 18:44:02 +0200 |
commit | 7a276976948fa39e2d329de3b622c34dd0c572ad (patch) | |
tree | 887387c0aaedb88c609a945514669cbba457e307 /src/map/script.c | |
parent | f77278551b125da51b6917c53e608abdecdd146c (diff) | |
download | hercules-7a276976948fa39e2d329de3b622c34dd0c572ad.tar.gz hercules-7a276976948fa39e2d329de3b622c34dd0c572ad.tar.bz2 hercules-7a276976948fa39e2d329de3b622c34dd0c572ad.tar.xz hercules-7a276976948fa39e2d329de3b622c34dd0c572ad.zip |
Re-added HPM support for configuration settings
Plugin settings should be relative to the the libconfig file root. For
example, a configuration setting of type HPCT_CHAR will be relative to
the root of conf/char/char-server.conf. In order to add a configuration
entry inside the char_configuration block, the full configuration path
(slash-delimited) should be passed to addCharConf(), as in the
following example:
`addCharConf("char_configuration/my_setting", my_parser_function);`
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c index 09cefa500..df6a8d159 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -4556,7 +4556,8 @@ bool script_config_read(const char *filename, bool imported) libconfig->setting_lookup_int(setting, "input_min_value", &script->config.input_min_value); libconfig->setting_lookup_int(setting, "input_max_value", &script->config.input_max_value); - // TODO HPM->parseConf(w1, w2, HPCT_SCRIPT)); + if (!HPM->parse_conf(&config, filename, HPCT_SCRIPT, imported)) + retval = false; // import should overwrite any previous configuration, so it should be called last if (libconfig->lookup_string(&config, "import", &import) == CONFIG_TRUE) { |