mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
[READY] Server dev toasts (#20147)
* Server init toast * New libraries * GC ref notification * Update code/_compile_options.dm Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> --------- Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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))))
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
################################################################
|
||||
|
||||
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user