mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Merge pull request #11389 from Kyep/hub_entry_update
Improves Hub Listing
This commit is contained in:
@@ -3,7 +3,7 @@ var/datum/configuration/config = null
|
||||
var/host = null
|
||||
var/join_motd = null
|
||||
GLOBAL_VAR(join_tos)
|
||||
var/game_version = "Custom ParaCode"
|
||||
var/game_version = "ParaCode"
|
||||
var/changelog_hash = md5('html/changelog.html') //used to check if the CL changed
|
||||
var/game_year = (text2num(time2text(world.realtime, "YYYY")) + 544)
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/datum/configuration
|
||||
var/server_name = null // server name (for world name / status)
|
||||
var/server_tag_line = null // server tagline (for showing on hub entry)
|
||||
var/server_extra_features = null // server-specific extra features (for hub entry)
|
||||
var/server_suffix = 0 // generate numeric suffix based on server port
|
||||
|
||||
var/minimum_client_build = 1421 // Build 1421 due to the middle mouse button exploit
|
||||
@@ -53,7 +55,6 @@
|
||||
var/humans_need_surnames = 0
|
||||
var/allow_random_events = 0 // enables random events mid-round when set to 1
|
||||
var/allow_ai = 1 // allow ai job
|
||||
var/hostedby = null
|
||||
var/respawn = 0
|
||||
var/guest_jobban = 1
|
||||
var/usewhitelist = 0
|
||||
@@ -395,6 +396,12 @@
|
||||
if("servername")
|
||||
config.server_name = value
|
||||
|
||||
if("server_tag_line")
|
||||
config.server_tag_line = value
|
||||
|
||||
if("server_extra_features")
|
||||
config.server_extra_features = value
|
||||
|
||||
if("serversuffix")
|
||||
config.server_suffix = 1
|
||||
|
||||
@@ -404,9 +411,6 @@
|
||||
if("nudge_script_path")
|
||||
config.nudge_script_path = value
|
||||
|
||||
if("hostedby")
|
||||
config.hostedby = value
|
||||
|
||||
if("server")
|
||||
config.server = value
|
||||
|
||||
|
||||
+21
-36
@@ -374,26 +374,28 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
// apply some settings from config..
|
||||
|
||||
/world/proc/update_status()
|
||||
status = get_status_text()
|
||||
|
||||
/proc/get_world_status_text()
|
||||
return world.get_status_text()
|
||||
|
||||
/world/proc/get_status_text()
|
||||
var/s = ""
|
||||
|
||||
if(config && config.server_name)
|
||||
s += "<b>[config.server_name]</b> — "
|
||||
s += "<b>[station_name()]</b> "
|
||||
if(config && config.githuburl)
|
||||
s+= "([game_version])"
|
||||
|
||||
s += "<b>[station_name()]</b>";
|
||||
s += " ("
|
||||
s += "<a href=\"http://nanotrasen.se\">" //Change this to wherever you want the hub to link to.
|
||||
s += "[game_version]"
|
||||
s += "</a>"
|
||||
s += ")"
|
||||
s += "<br>The Perfect Mix of RP & Action<br>"
|
||||
|
||||
|
||||
|
||||
if(config && config.server_tag_line)
|
||||
s += "<br>[config.server_tag_line]"
|
||||
|
||||
s += "<br>"
|
||||
var/list/features = list()
|
||||
|
||||
if(ticker)
|
||||
if(master_mode)
|
||||
if(master_mode && master_mode != "secret")
|
||||
features += master_mode
|
||||
else
|
||||
features += "<b>STARTING</b>"
|
||||
@@ -401,39 +403,22 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
if(!enter_allowed)
|
||||
features += "closed"
|
||||
|
||||
features += abandon_allowed ? "respawn" : "no respawn"
|
||||
if(config && config.server_extra_features)
|
||||
features += config.server_extra_features
|
||||
|
||||
if(config && config.allow_vote_mode)
|
||||
features += "vote"
|
||||
|
||||
if(config && config.allow_ai)
|
||||
features += "AI allowed"
|
||||
if(config && config.wikiurl)
|
||||
features += "<a href=\"[config.wikiurl]\">Wiki</a>"
|
||||
|
||||
var/n = 0
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client)
|
||||
n++
|
||||
|
||||
if(n > 1)
|
||||
features += "~[n] players"
|
||||
else if(n > 0)
|
||||
features += "~[n] player"
|
||||
|
||||
/*
|
||||
is there a reason for this? the byond site shows 'hosted by X' when there is a proper host already.
|
||||
if(host)
|
||||
features += "hosted by <b>[host]</b>"
|
||||
*/
|
||||
|
||||
// if(!host && config && config.hostedby)
|
||||
// features += "hosted by <b>[config.hostedby]</b>"
|
||||
if(abandon_allowed)
|
||||
features += "respawn"
|
||||
|
||||
if(features)
|
||||
s += ": [jointext(features, ", ")]"
|
||||
s += "[jointext(features, ", ")]"
|
||||
|
||||
/* does this help? I do not know */
|
||||
if(src.status != s)
|
||||
src.status = s
|
||||
return s
|
||||
|
||||
#define FAILED_DB_CONNECTION_CUTOFF 5
|
||||
var/failed_db_connections = 0
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
## Server name: This appears at the top of the screen in-game. In this case it will read "spacestation13: station_name" where station_name is the randomly generated name of the station for the round. Remove the # infront of SERVERNAME and replace 'spacestation13' with the name of your choice
|
||||
# SERVERNAME spacestation13
|
||||
|
||||
## Server tagline: This appears on the hub entry.
|
||||
#SERVER_TAG_LINE The Perfect Mix of RP & Action
|
||||
|
||||
## Server extra features: This appears in the feature list on the hub entry.
|
||||
#SERVER_EXTRA_FEATURES medium RP, varied species/jobs/modes
|
||||
|
||||
## Add a # infront of this if you want to use the SQL based admin system, the legacy system uses admins.txt. You need to set up your database to use the SQL based system.
|
||||
ADMIN_LEGACY_SYSTEM
|
||||
|
||||
|
||||
Reference in New Issue
Block a user