mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
Hub refresh - Cleans up update_status(), adds more hub-related config options, and more!
This commit is contained in:
@@ -292,6 +292,8 @@ GLOBAL_LIST_INIT(station_names, world.file2list("strings/station_names.txt" + ""
|
|||||||
|
|
||||||
GLOBAL_LIST_INIT(station_suffixes, world.file2list("strings/station_suffixes.txt"))
|
GLOBAL_LIST_INIT(station_suffixes, world.file2list("strings/station_suffixes.txt"))
|
||||||
|
|
||||||
|
GLOBAL_LIST_INIT(server_taglines, world.file2list("strings/server_taglines.txt"))
|
||||||
|
|
||||||
GLOBAL_LIST_INIT(greek_letters, world.file2list("strings/greek_letters.txt"))
|
GLOBAL_LIST_INIT(greek_letters, world.file2list("strings/greek_letters.txt"))
|
||||||
|
|
||||||
GLOBAL_LIST_INIT(phonetic_alphabet, world.file2list("strings/phonetic_alphabet.txt"))
|
GLOBAL_LIST_INIT(phonetic_alphabet, world.file2list("strings/phonetic_alphabet.txt"))
|
||||||
|
|||||||
@@ -2,9 +2,15 @@
|
|||||||
|
|
||||||
/datum/config_entry/string/servername // server name (the name of the game window)
|
/datum/config_entry/string/servername // server name (the name of the game window)
|
||||||
|
|
||||||
|
/datum/config_entry/string/communityshortname // short name of the server's community
|
||||||
|
|
||||||
|
/datum/config_entry/string/communitylink // link to the server's website
|
||||||
|
|
||||||
/datum/config_entry/string/servertagline
|
/datum/config_entry/string/servertagline
|
||||||
config_entry_value = "We forgot to set the server's tagline in config.txt"
|
config_entry_value = "We forgot to set the server's tagline in config.txt"
|
||||||
|
|
||||||
|
/datum/config_entry/flag/usetaglinestrings
|
||||||
|
|
||||||
/datum/config_entry/string/serversqlname // short form server name used for the DB
|
/datum/config_entry/string/serversqlname // short form server name used for the DB
|
||||||
|
|
||||||
/datum/config_entry/string/stationname // station name (the name of the station in-game)
|
/datum/config_entry/string/stationname // station name (the name of the station in-game)
|
||||||
|
|||||||
@@ -285,63 +285,47 @@ GLOBAL_LIST(topic_status_cache)
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/world/proc/update_status()
|
/world/proc/update_status()
|
||||||
|
. = ""
|
||||||
|
if(!config)
|
||||||
|
status = "<b>SERVER LOADING OR BROKEN.</b> (18+)"
|
||||||
|
return
|
||||||
|
|
||||||
var/list/features = list()
|
game_state = (CONFIG_GET(number/extreme_popcap) && GLOB.clients.len >= CONFIG_GET(number/extreme_popcap))
|
||||||
|
|
||||||
// if(GLOB.master_mode)
|
// ---Hub title---
|
||||||
// features += GLOB.master_mode
|
var/servername = CONFIG_GET(string/servername)
|
||||||
|
var/stationname = station_name()
|
||||||
|
var/defaultstation = CONFIG_GET(string/stationname)
|
||||||
|
if(servername || stationname != defaultstation)
|
||||||
|
. += (servername ? "<b>[servername] - " : "<b>")
|
||||||
|
. += (stationname != defaultstation ? "[stationname]</b>\] " : "</b>\] ")
|
||||||
|
|
||||||
// if (!GLOB.enter_allowed)
|
var/communityname = CONFIG_GET(string/communityshortname)
|
||||||
// features += "closed"
|
var/communitylink = CONFIG_GET(string/communitylink)
|
||||||
|
if(communityname)
|
||||||
|
. += (communitylink ? "(<a href=\"[communitylink]\">[communityname]</a>) " : "([communityname]) ")
|
||||||
|
|
||||||
var/s = ""
|
|
||||||
var/hostedby
|
|
||||||
if(config)
|
|
||||||
var/server_name = CONFIG_GET(string/servername)
|
|
||||||
if (server_name)
|
|
||||||
s += "<b>[server_name]</b> — "
|
|
||||||
// features += "[CONFIG_GET(flag/norespawn) ? "no " : ""]respawn"
|
|
||||||
// if(CONFIG_GET(flag/allow_vote_mode))
|
|
||||||
// features += "vote"
|
|
||||||
// if(CONFIG_GET(flag/allow_ai))
|
|
||||||
// features += "AI allowed"
|
|
||||||
hostedby = CONFIG_GET(string/hostedby)
|
|
||||||
|
|
||||||
s += "<b>[station_name()]</b>";
|
|
||||||
s += " ("
|
|
||||||
s += "<a href=\"https://citadel-station.net/home\">" //Change this to wherever you want the hub to link to.
|
|
||||||
s += "Citadel" //Replace this with something else. Or ever better, delete it and uncomment the game version.
|
|
||||||
s += "</a>"
|
|
||||||
s += ")\]" //CIT CHANGE - encloses the server title in brackets to make the hub entry fancier
|
|
||||||
s += "<br>[CONFIG_GET(string/servertagline)]<br>" //CIT CHANGE - adds a tagline!
|
|
||||||
|
|
||||||
var/players = GLOB.clients.len
|
|
||||||
|
|
||||||
if(SSmapping.config) // this just stops the runtime, honk.
|
|
||||||
features += "[SSmapping.config.map_name]" //CIT CHANGE - makes the hub entry display the current map
|
|
||||||
|
|
||||||
if(NUM2SECLEVEL(GLOB.security_level))//CIT CHANGE - makes the hub entry show the security level
|
|
||||||
features += "[NUM2SECLEVEL(GLOB.security_level)] alert"
|
|
||||||
|
|
||||||
var/popcaptext = ""
|
|
||||||
var/popcap = max(CONFIG_GET(number/extreme_popcap), CONFIG_GET(number/hard_popcap), CONFIG_GET(number/soft_popcap))
|
var/popcap = max(CONFIG_GET(number/extreme_popcap), CONFIG_GET(number/hard_popcap), CONFIG_GET(number/soft_popcap))
|
||||||
if (popcap)
|
if(popcap)
|
||||||
popcaptext = "/[popcap]"
|
. += "([GLOB.clients.len]/[popcap]) "
|
||||||
|
|
||||||
if (players > 1)
|
. += "(18+)<br>" //This is obligatory forr obvious reasons.
|
||||||
features += "[players][popcaptext] players"
|
|
||||||
else if (players > 0)
|
|
||||||
features += "[players][popcaptext] player"
|
|
||||||
|
|
||||||
game_state = (CONFIG_GET(number/extreme_popcap) && players >= CONFIG_GET(number/extreme_popcap)) //tells the hub if we are full
|
// ---Hub body---
|
||||||
|
var/tagline = (CONFIG_GET(flag/usetaglinestrings) ? pick(GLOB.server_taglines) : CONFIG_GET(string/servertagline))
|
||||||
|
if(tagline)
|
||||||
|
. += "[tagline]<br>"
|
||||||
|
|
||||||
if (!host && hostedby)
|
// ---Hub footer---
|
||||||
features += "hosted by <b>[hostedby]</b>"
|
. += "\["
|
||||||
|
if(SSmapping.config)
|
||||||
|
. += "[SSmapping.config.map_name], "
|
||||||
|
if(NUM2SECLEVEL(GLOB.security_level))
|
||||||
|
. += "[NUM2SECLEVEL(GLOB.security_level)] alert, "
|
||||||
|
|
||||||
|
. += "[get_active_player_count(afk_check = TRUE)] playing"
|
||||||
|
|
||||||
if (features)
|
status = .
|
||||||
s += "\[[jointext(features, ", ")]"
|
|
||||||
|
|
||||||
status = s
|
|
||||||
|
|
||||||
/world/proc/update_hub_visibility(new_visibility)
|
/world/proc/update_hub_visibility(new_visibility)
|
||||||
if(new_visibility == GLOB.hub_visibility)
|
if(new_visibility == GLOB.hub_visibility)
|
||||||
|
|||||||
@@ -4,9 +4,19 @@
|
|||||||
## Server name: This appears at the top of the screen in-game and in the BYOND hub. Uncomment and replace 'tgstation' with the name of your choice.
|
## Server name: This appears at the top of the screen in-game and in the BYOND hub. Uncomment and replace 'tgstation' with the name of your choice.
|
||||||
# SERVERNAME tgstation
|
# SERVERNAME tgstation
|
||||||
|
|
||||||
|
## Community short-name: This appears in parentheses after the server's active station name
|
||||||
|
# COMMUNITYSHORTNAME tg???
|
||||||
|
|
||||||
|
## Community link: Requires a community short-name defined. Attaches a link to the community's shortname, and requires a short-name defined.
|
||||||
|
## You could alternatively just add raw HTML to the above, but this is more newbie-friendly
|
||||||
|
# COMMUNITYLINK http://crouton.net
|
||||||
|
|
||||||
## Server tagline: This will appear right below the server's title.
|
## Server tagline: This will appear right below the server's title.
|
||||||
# SERVERTAGLINE A generic TG-based server
|
# SERVERTAGLINE A generic TG-based server
|
||||||
|
|
||||||
|
## Use tagline strings: Uncomment to have the server's tagline be randomly selected from taglines.txt
|
||||||
|
# USETAGLINESTRINGS
|
||||||
|
|
||||||
## 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.
|
## 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
|
# SERVERSQLNAME tgstation
|
||||||
|
|
||||||
|
|||||||
1
strings/server_taglines.txt
Normal file
1
strings/server_taglines.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fill in your own community quotes and memery here!
|
||||||
Reference in New Issue
Block a user