diff --git a/code/__DEFINES/rust_g.dm b/code/__DEFINES/rust_g.dm index 4b2ac79d8fd..3afe9d3a496 100644 --- a/code/__DEFINES/rust_g.dm +++ b/code/__DEFINES/rust_g.dm @@ -151,7 +151,14 @@ #define rustg_time_milliseconds(id) text2num(call(RUST_G, "time_milliseconds")(id)) #define rustg_time_reset(id) call(RUST_G, "time_reset")(id) -#define rustg_read_toml_file(path) json_decode(call(RUST_G, "toml_file_to_json")(path) || "null") +#define rustg_raw_read_toml_file(path) json_decode(call(RUST_G, "toml_file_to_json")(path) || "null") + +/proc/rustg_read_toml_file(path) + var/list/output = rustg_raw_read_toml_file(path) + if (output["success"]) + return json_decode(output["content"]) + else + CRASH(output["content"]) #define rustg_url_encode(text) call(RUST_G, "url_encode")("[text]") #define rustg_url_decode(text) call(RUST_G, "url_decode")(text) diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm index fd0eb3551a6..ea6bcdfb6f8 100644 --- a/code/controllers/configuration/configuration.dm +++ b/code/controllers/configuration/configuration.dm @@ -379,13 +379,13 @@ Example config: return log_config("Loading config file word_filter.toml...") - - var/list/word_filter = rustg_read_toml_file("[directory]/word_filter.toml") - if (!islist(word_filter)) - var/message = "The word filter configuration did not output a list, contact someone with configuration access to make sure it's setup properly." + var/list/result = rustg_read_toml_file("[directory]/word_filter.toml") + if(!result["success"]) + var/message = "The word filter is not configured correctly! [result["content"]]" log_config(message) DelayedMessageAdmins(message) return + var/list/word_filter = result["content"] ic_filter_reasons = try_extract_from_word_filter(word_filter, "ic") ic_outside_pda_filter_reasons = try_extract_from_word_filter(word_filter, "ic_outside_pda") diff --git a/dependencies.sh b/dependencies.sh index c644b054727..0f2e21aa3ad 100644 --- a/dependencies.sh +++ b/dependencies.sh @@ -8,7 +8,7 @@ export BYOND_MAJOR=514 export BYOND_MINOR=1560 #rust_g git tag -export RUST_G_VERSION=0.5.0 +export RUST_G_VERSION=1.0.2 #node version export NODE_VERSION=14 diff --git a/rust_g.dll b/rust_g.dll index b72315ec5cf..ce4c1d7572e 100644 Binary files a/rust_g.dll and b/rust_g.dll differ