This commit is contained in:
kevinz000
2020-05-10 15:05:46 -07:00
parent 2b598c692c
commit 452b360450
2 changed files with 23 additions and 10 deletions

View File

@@ -5,16 +5,18 @@
var/list/testmerge = list() var/list/testmerge = list()
/datum/getrev/New() /datum/getrev/New()
commit = rustg_git_revparse("HEAD")
if(commit)
date = rustg_git_commit_date(commit)
originmastercommit = rustg_git_revparse("origin/master")
/datum/getrev/proc/load_tgs_info()
testmerge = world.TgsTestMerges() testmerge = world.TgsTestMerges()
var/datum/tgs_revision_information/revinfo = world.TgsRevision() var/datum/tgs_revision_information/revinfo = world.TgsRevision()
if(revinfo) if(revinfo)
commit = revinfo.commit commit = revinfo.commit
originmastercommit = revinfo.origin_commit originmastercommit = revinfo.origin_commit
else date = rustg_git_commit_date(commit)
commit = rustg_git_revparse("HEAD")
if(commit)
date = rustg_git_commit_date(commit)
originmastercommit = rustg_git_revparse("origin/master")
// goes to DD log and config_error.txt // goes to DD log and config_error.txt
log_world(get_log_message()) log_world(get_log_message())
@@ -77,7 +79,9 @@
msg += "No commit information" msg += "No commit information"
if(world.TgsAvailable()) if(world.TgsAvailable())
var/datum/tgs_version/version = world.TgsVersion() var/datum/tgs_version/version = world.TgsVersion()
msg += "Server tools version: [version.raw_parameter]" msg += "TGS version: [version.raw_parameter]"
var/datum/tgs_version/api_version = world.TgsApiVersion()
msg += "DMAPI version: [api_version.raw_parameter]"
// Game mode odds // Game mode odds
msg += "<br><b>Current Informational Settings:</b>" msg += "<br><b>Current Informational Settings:</b>"
@@ -121,4 +125,4 @@
if(probabilities[ctag] > 0) if(probabilities[ctag] > 0)
var/percentage = round(probabilities[ctag] / sum * 100, 0.1) var/percentage = round(probabilities[ctag] / sum * 100, 0.1)
msg += "[ctag] [percentage]%" msg += "[ctag] [percentage]%"
to_chat(src, msg.Join("<br>")) to_chat(src, msg.Join("<br>"))

View File

@@ -23,10 +23,11 @@ GLOBAL_LIST(topic_status_cache)
make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once) make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once)
TgsNew(minimum_required_security_level = TGS_SECURITY_TRUSTED)
GLOB.revdata = new GLOB.revdata = new
InitTgs()
config.Load(params[OVERRIDE_CONFIG_DIRECTORY_PARAMETER]) config.Load(params[OVERRIDE_CONFIG_DIRECTORY_PARAMETER])
//SetupLogs depends on the RoundID, so lets check //SetupLogs depends on the RoundID, so lets check
@@ -37,6 +38,9 @@ GLOBAL_LIST(topic_status_cache)
#ifndef USE_CUSTOM_ERROR_HANDLER #ifndef USE_CUSTOM_ERROR_HANDLER
world.log = file("[GLOB.log_directory]/dd.log") world.log = file("[GLOB.log_directory]/dd.log")
#else
if (TgsAvailable())
world.log = file("[GLOB.log_directory]/dd.log") //not all runtimes trigger world/Error, so this is the only way to ensure we can see all of them.
#endif #endif
load_admins() load_admins()
@@ -62,6 +66,10 @@ GLOBAL_LIST(topic_status_cache)
if(TEST_RUN_PARAMETER in params) if(TEST_RUN_PARAMETER in params)
HandleTestRun() HandleTestRun()
/world/proc/InitTgs()
TgsNew(new /datum/tgs_event_handler/impl, TGS_SECURITY_TRUSTED)
GLOB.revdata.load_tgs_info()
/world/proc/HandleTestRun() /world/proc/HandleTestRun()
//trigger things to run the whole process //trigger things to run the whole process
Master.sleep_offline_after_initializations = FALSE Master.sleep_offline_after_initializations = FALSE
@@ -223,16 +231,17 @@ GLOBAL_LIST(topic_status_cache)
qdel(src) //shut it down qdel(src) //shut it down
/world/Reboot(reason = 0, fast_track = FALSE) /world/Reboot(reason = 0, fast_track = FALSE)
TgsReboot()
if (reason || fast_track) //special reboot, do none of the normal stuff if (reason || fast_track) //special reboot, do none of the normal stuff
if (usr) if (usr)
log_admin("[key_name(usr)] Has requested an immediate world restart via client side debugging tools") log_admin("[key_name(usr)] Has requested an immediate world restart via client side debugging tools")
message_admins("[key_name_admin(usr)] Has requested an immediate world restart via client side debugging tools") message_admins("[key_name_admin(usr)] Has requested an immediate world restart via client side debugging tools")
to_chat(world, "<span class='boldannounce'>Rebooting World immediately due to host request</span>") to_chat(world, "<span class='boldannounce'>Rebooting World immediately due to host request.</span>")
else else
to_chat(world, "<span class='boldannounce'>Rebooting world...</span>") to_chat(world, "<span class='boldannounce'>Rebooting world...</span>")
Master.Shutdown() //run SS shutdowns Master.Shutdown() //run SS shutdowns
TgsReboot()
if(TEST_RUN_PARAMETER in params) if(TEST_RUN_PARAMETER in params)
FinishTestRun() FinishTestRun()
return return