diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index 3bab71a5ce0..dfc3d024c19 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -501,3 +501,8 @@ /datum/config_entry/string/centcom_ban_db // URL for the CentCom Galactic Ban DB API /datum/config_entry/string/centcom_source_whitelist + +//SKYRAT EDIT ADDITION BEGIN +/datum/config_entry/string/servertagline + config_entry_value = "We forgot to set the server's tagline in config.txt" +//SKYRAT EDIT END diff --git a/code/game/world.dm b/code/game/world.dm index 25d0cac8dd1..c96a64a6fa8 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -274,7 +274,7 @@ GLOBAL_VAR(restart_counter) log_world("World rebooted at [time_stamp()]") shutdown_logging() // Past this point, no logging procs can be used, at risk of data loss. ..() - +/* SKYRAT EDIT CHANGE - MOVED TO MODULAR /world/proc/update_status() var/list/features = list() @@ -326,6 +326,7 @@ GLOBAL_VAR(restart_counter) s += ": [jointext(features, ", ")]" status = s +*/ //SKYRAT EDIT END /world/proc/update_hub_visibility(new_visibility) if(new_visibility == GLOB.hub_visibility) diff --git a/config/config.txt b/config/config.txt index dd38fd199a2..f951ea11c32 100644 --- a/config/config.txt +++ b/config/config.txt @@ -22,6 +22,9 @@ $include interviews.txt ## Server SQL name: This is the name used to identify the server to the SQL DB, distinct from SERVERNAME as it must be at most 32 characters. # SERVERSQLNAME tgstation +## Server tagline: This will appear right below the server's title. +# SERVERTAGLINE A generic TG-based server + ## Station name: The name of the station as it is referred to in-game. If commented out, the game will generate a random name instead. STATIONNAME Space Station 13 diff --git a/modular_skyrat/modules/tagline/code/readme.md b/modular_skyrat/modules/tagline/code/readme.md new file mode 100644 index 00000000000..88622aafd9c --- /dev/null +++ b/modular_skyrat/modules/tagline/code/readme.md @@ -0,0 +1,23 @@ +## Title: Tagline + +MODULE ID: TAGLINE + +### Description: + +Gives the server a customised tagline and description, while removing needless information. + +### TG Proc Changes: + + - REMOVAL: Skyrat-tg\code\game\world.dm > /world/proc/update_status() + +### Defines: + +N/A + +### Included files: + +N/A + +### Credits: + +Gandalf2k15 diff --git a/modular_skyrat/modules/tagline/code/world.dm b/modular_skyrat/modules/tagline/code/world.dm new file mode 100644 index 00000000000..9299f485619 --- /dev/null +++ b/modular_skyrat/modules/tagline/code/world.dm @@ -0,0 +1,40 @@ +/world/proc/update_status() + + var/list/features = list() + + var/s = "" + var/hostedby + if(config) + var/server_name = CONFIG_GET(string/servername) + if (server_name) + s += "[server_name] — " + hostedby = CONFIG_GET(string/hostedby) + + s += " (" + s += "" + s += "Discord" + s += ")\]" + s += "
[CONFIG_GET(string/servertagline)]
" + + + var/n = 0 + for (var/mob/M in GLOB.player_list) + if (M.client) + n++ + + if(SSmapping.config) + features += "[SSmapping.config.map_name]" + + if (n > 1) + features += "~[n] players" + else if (n > 0) + features += "~[n] player" + + if (!host && hostedby) + features += "hosted by [hostedby]" + + if (features) + s += "\[[jointext(features, ", ")]" + + status = s + diff --git a/tgstation.dme b/tgstation.dme index cd7fe621776..f57b6b0af9b 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3584,6 +3584,7 @@ #include "modular_skyrat\modules\roboclothes\code\vending\wardrobes.dm" #include "modular_skyrat\modules\SiliconQoL\code\_onclick.dm" #include "modular_skyrat\modules\ssd_indicator\code\mob.dm" +#include "modular_skyrat\modules\tagline\code\world.dm" #include "modular_skyrat\modules\typing_indicator\code\mob.dm" #include "modular_skyrat\modules\verbs\code\modules\client\preferences_toggles.dm" #include "modular_skyrat\modules\verbs\code\modules\client\verbs\looc.dm"