mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2025-12-10 16:37:06 +00:00
Hub refresh 2022 - Cleans up hub desc code, adds some more config options, and more! (#3988)
* Hub refresh 2022 - Cleans up hub desc code, adds some more config options, and more! * fixes stray hyphen when station name is default
This commit is contained in:
@@ -2,6 +2,8 @@ GLOBAL_LIST_INIT(char_directory_tags, list("Pred", "Prey", "Switch", "Non-Vore",
|
|||||||
GLOBAL_LIST_INIT(char_directory_erptags, list("Top", "Bottom", "Switch", "No ERP", "Unset"))
|
GLOBAL_LIST_INIT(char_directory_erptags, list("Top", "Bottom", "Switch", "No ERP", "Unset"))
|
||||||
GLOBAL_LIST_EMPTY(meteor_list)
|
GLOBAL_LIST_EMPTY(meteor_list)
|
||||||
|
|
||||||
|
GLOBAL_LIST_INIT(server_taglines, file2list("config/strings/server_taglines.txt"))
|
||||||
|
|
||||||
/// List of wire colors for each object type of that round. One for airlocks, one for vendors, etc.
|
/// List of wire colors for each object type of that round. One for airlocks, one for vendors, etc.
|
||||||
GLOBAL_LIST_EMPTY(wire_color_directory) // This is an associative list with the `holder_type` as the key, and a list of colors as the value.
|
GLOBAL_LIST_EMPTY(wire_color_directory) // This is an associative list with the `holder_type` as the key, and a list of colors as the value.
|
||||||
|
|
||||||
|
|||||||
@@ -32,5 +32,11 @@
|
|||||||
config_entry_value = null
|
config_entry_value = null
|
||||||
min_val = 0
|
min_val = 0
|
||||||
|
|
||||||
|
/datum/config_entry/string/community_shortname
|
||||||
|
|
||||||
|
/datum/config_entry/string/community_link
|
||||||
|
|
||||||
/datum/config_entry/string/tagline
|
/datum/config_entry/string/tagline
|
||||||
config_entry_value = "<br><small><a href='https://discord.gg/citadelstation'>Roleplay focused 18+ server with extensive species choices.</a></small></br>"
|
config_entry_value = "<br><small><a href='https://discord.gg/citadelstation'>Roleplay focused 18+ server with extensive species choices.</a></small></br>"
|
||||||
|
|
||||||
|
/datum/config_entry/flag/usetaglinestrings
|
||||||
|
|||||||
@@ -390,61 +390,41 @@ GLOBAL_REAL_VAR(world_log_redirected) = FALSE
|
|||||||
D.associate(GLOB.directory[ckey])
|
D.associate(GLOB.directory[ckey])
|
||||||
|
|
||||||
/world/proc/update_status()
|
/world/proc/update_status()
|
||||||
var/s = ""
|
. = ""
|
||||||
|
if(!config)
|
||||||
|
status = "<b>SERVER LOADING OR BROKEN.</b> (18+)"
|
||||||
|
return
|
||||||
|
|
||||||
if (config_legacy?.server_name)
|
// ---Hub title---
|
||||||
s += "<b>[config_legacy.server_name]</b> — "
|
var/servername = config_legacy?.server_name
|
||||||
|
var/stationname = station_name()
|
||||||
|
var/defaultstation = GLOB.using_map ? GLOB.using_map.station_name : stationname
|
||||||
|
if(servername || stationname != defaultstation)
|
||||||
|
. += (servername ? "<b>[servername]" : "<b>")
|
||||||
|
. += (stationname != defaultstation ? "[servername ? " - " : ""][stationname]</b>\] " : "</b>\] ")
|
||||||
|
|
||||||
s += "<b>[station_name()]</b>";
|
var/communityname = CONFIG_GET(string/community_shortname)
|
||||||
s += " ("
|
var/communitylink = CONFIG_GET(string/community_link)
|
||||||
s += "<a href=\"http://\">" //Change this to wherever you want the hub to link to.
|
if(communityname)
|
||||||
// s += "[game_version]"
|
. += (communitylink ? "(<a href=\"[communitylink]\">[communityname]</a>) " : "([communityname]) ")
|
||||||
s += "Citadel" //Replace this with something else. Or ever better, delete it and uncomment the game version. CITADEL CHANGE - modifies hub entry to match main
|
|
||||||
s += "</a>"
|
|
||||||
s += ")\]" //CITADEL CHANGE - encloses the server title in brackets to make the hub entry fancier
|
|
||||||
s += CONFIG_GET(string/tagline)
|
|
||||||
|
|
||||||
s += ")"
|
. += "(18+)<br>" //This is obligatory for obvious reasons.
|
||||||
|
|
||||||
var/list/features = list()
|
// ---Hub body---
|
||||||
|
var/tagline = (CONFIG_GET(flag/usetaglinestrings) ? pick(GLOB.server_taglines) : CONFIG_GET(string/tagline))
|
||||||
|
if(tagline)
|
||||||
|
. += "[tagline]<br>"
|
||||||
|
|
||||||
if(SSticker)
|
// ---Hub footer---
|
||||||
if(master_mode)
|
. += "\["
|
||||||
features += master_mode
|
if(GLOB.using_map)
|
||||||
else
|
. += "[GLOB.using_map.station_short], "
|
||||||
features += "<b>STARTING</b>"
|
|
||||||
|
|
||||||
/*if (!config_legacy.enter_allowed) CITADEL CHANGE - removes useless info from hub entry
|
. += "[get_security_level()] alert, "
|
||||||
features += "closed"
|
|
||||||
|
|
||||||
features += config_legacy.abandon_allowed ? "respawn" : "no respawn"
|
. += "[GLOB.clients.len] players"
|
||||||
|
|
||||||
if (config && config_legacy.allow_vote_mode)
|
status = .
|
||||||
features += "vote"
|
|
||||||
|
|
||||||
if (config && config_legacy.allow_ai)
|
|
||||||
features += "AI allowed"*/
|
|
||||||
|
|
||||||
var/n = 0
|
|
||||||
for (var/mob/M in player_list)
|
|
||||||
if (M.client)
|
|
||||||
n++
|
|
||||||
|
|
||||||
if (n > 1)
|
|
||||||
features += "~[n] players"
|
|
||||||
else if (n > 0)
|
|
||||||
features += "~[n] player"
|
|
||||||
|
|
||||||
|
|
||||||
if (config && config_legacy.hostedby)
|
|
||||||
features += "hosted by <b>[config_legacy.hostedby]</b>"
|
|
||||||
|
|
||||||
if (features)
|
|
||||||
s += "\[[jointext(features, ", ")]" //CITADEL CHANGE - replaces colon with left bracket to make the hub entry a little fancier
|
|
||||||
|
|
||||||
/* does this help? I do not know */
|
|
||||||
if (src.status != s)
|
|
||||||
src.status = s
|
|
||||||
|
|
||||||
#define FAILED_DB_CONNECTION_CUTOFF 5
|
#define FAILED_DB_CONNECTION_CUTOFF 5
|
||||||
var/failed_db_connections = 0
|
var/failed_db_connections = 0
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ $include entries/fail2topic.txt
|
|||||||
$include entries/game_options.txt
|
$include entries/game_options.txt
|
||||||
$include entries/lobby.txt
|
$include entries/lobby.txt
|
||||||
$include entries/urls.txt
|
$include entries/urls.txt
|
||||||
|
$include entries/hub.txt
|
||||||
|
|
||||||
|
|
||||||
# You can use the @ character at the beginning of a config option to lock it from being edited in-game
|
# You can use the @ character at the beginning of a config option to lock it from being edited in-game
|
||||||
@@ -42,7 +43,3 @@ CLIENT_ERROR_VERSION 511
|
|||||||
CLIENT_ERROR_MESSAGE Your version of byond is not supported. Please upgrade.
|
CLIENT_ERROR_MESSAGE Your version of byond is not supported. Please upgrade.
|
||||||
## The minimum build needed for joining the server, if using 512, a good minimum build would be 1421 as that disables the Middle Mouse Button exploit.
|
## The minimum build needed for joining the server, if using 512, a good minimum build would be 1421 as that disables the Middle Mouse Button exploit.
|
||||||
CLIENT_ERROR_BUILD 1421
|
CLIENT_ERROR_BUILD 1421
|
||||||
|
|
||||||
## TAGLINE - Hub tagline
|
|
||||||
TAGLINE <br><small><a href='https://discord.gg/citadelstation'>Roleplay focused 18+ server with extensive species choices.</a></small></br>
|
|
||||||
|
|
||||||
|
|||||||
12
config/entries/hub.txt
Normal file
12
config/entries/hub.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
## Community short-name: This appears in parentheses after the server's active station name
|
||||||
|
# COMMUNITYSHORTNAME virgo???
|
||||||
|
|
||||||
|
## 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
|
||||||
|
|
||||||
|
## TAGLINE - Hub tagline
|
||||||
|
TAGLINE <br><small><a href='https://discord.gg/citadelstation'>Roleplay focused 18+ server with extensive species choices.</a></small></br>
|
||||||
|
|
||||||
|
## Use tagline strings: Uncomment to have the server's tagline be randomly selected from taglines.txt
|
||||||
|
# USETAGLINESTRINGS
|
||||||
1
config/strings/server_taglines.txt
Normal file
1
config/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