diff --git a/code/__DEFINES/_versions.dm b/code/__DEFINES/_versions.dm index 04554bf8b38..cb1ed09e84f 100644 --- a/code/__DEFINES/_versions.dm +++ b/code/__DEFINES/_versions.dm @@ -1,2 +1,2 @@ /// Version of RUST-G that this codebase wants -#define RUST_G_VERSION "1.2.0-P" +#define RUST_G_VERSION "1.2.0-P2" diff --git a/code/__DEFINES/rust_g.dm b/code/__DEFINES/rust_g.dm index baab1967f34..6f4a9a910fb 100644 --- a/code/__DEFINES/rust_g.dm +++ b/code/__DEFINES/rust_g.dm @@ -268,6 +268,10 @@ /proc/rustg_unix_timestamp() return text2num(RUSTG_CALL(RUST_G, "unix_timestamp")()) +// Toast Operations // + +#define rustg_create_toast(title, body) RUSTG_CALL(RUST_G, "create_toast")(title, body) + // TOML Operations // #define rustg_raw_read_toml_file(path) json_decode(RUSTG_CALL(RUST_G, "toml_file_to_json")(path) || "null") diff --git a/code/_compile_options.dm b/code/_compile_options.dm index 9de77861738..0578e08a32d 100644 --- a/code/_compile_options.dm +++ b/code/_compile_options.dm @@ -22,6 +22,8 @@ // #define FIND_REF_NO_CHECK_TICK //Sets world.loop_checks to false and prevents find references from sleeping +// #define FIND_REF_NOTIFY_ON_COMPLETE // Throw a windows notification toast when the ref finding process is done + /***** End toggles for the GC ref finder *****/ #define IS_MODE_COMPILED(MODE) (ispath(text2path("/datum/game_mode/"+(MODE)))) diff --git a/code/controllers/configuration/sections/system_configuration.dm b/code/controllers/configuration/sections/system_configuration.dm index fd3f0b30811..ea84dd4313d 100644 --- a/code/controllers/configuration/sections/system_configuration.dm +++ b/code/controllers/configuration/sections/system_configuration.dm @@ -28,6 +28,8 @@ var/override_map = null /// Assoc list of region names and their server IPs. Used for geo-routing. var/list/region_map = list() + /// Send a system toast on init completion? + var/toast_on_init_complete = FALSE /datum/configuration_section/system_configuration/load_data(list/data) // Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line @@ -35,6 +37,7 @@ CONFIG_LOAD_BOOL(is_production, data["is_production"]) CONFIG_LOAD_BOOL(external_tos_handler, data["external_tos_handler"]) CONFIG_LOAD_BOOL(enable_multi_instance_support, data["enable_multi_instance_support"]) + CONFIG_LOAD_BOOL(toast_on_init_complete, data["toast_on_init_complete"]) CONFIG_LOAD_STR(topic_key, data["communications_password"]) CONFIG_LOAD_STR(shutdown_shell_command, data["shutdown_shell_command"]) diff --git a/code/controllers/master.dm b/code/controllers/master.dm index 14c71a72a3f..8b4b0f37cc9 100644 --- a/code/controllers/master.dm +++ b/code/controllers/master.dm @@ -228,6 +228,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new log_startup_progress("Initializations complete within [time] second[time == 1 ? "" : "s"]!") + if(GLOB.configuration.system.toast_on_init_complete) + rustg_create_toast("Paradise SS13", "Server initialization complete") + if(GLOB.configuration.general.developer_express_start) SSticker.force_start = TRUE diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index ef4b9587697..2d971c4c2f5 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -415,6 +415,9 @@ SUBSYSTEM_DEF(garbage) log_gc("Finished searching clients") log_gc("Completed search for references to a [type].") + #ifdef FIND_REF_NOTIFY_ON_COMPLETE + rustg_create_toast("ParadiseSS13", "GC search complete for [type]") + #endif if(usr && usr.client) usr.client.running_find_references = null running_find_references = null diff --git a/config/example/config.toml b/config/example/config.toml index 21246826bdc..7ecb3fac5b6 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -751,6 +751,8 @@ external_tos_handler = false regional_servers = [ #{name = "UK", ip = "byond://uk.paradisestation.org:6666"}, ] +# Send a toast on server init completion. You probably dont need this on in production +toast_on_init_complete = true ################################################################ diff --git a/librust_g.so b/librust_g.so index 9ac58d5344e..d99a0236c06 100644 Binary files a/librust_g.so and b/librust_g.so differ diff --git a/rust_g.dll b/rust_g.dll index 9207d9bbf32..a3807b50250 100644 Binary files a/rust_g.dll and b/rust_g.dll differ