Tg port 2 15 (#230)
* defines/helpers * globalvars, onclick, controllers * datums and game * woooooooooorld. Uh. dm * modules sans mobs client admin * modules/admin * pref shit * modules/mob * icon updates * extra things * Cherrypicked fixes from open PRs * metastation.tgm fix * a better meta fix * reverts async breakings
This commit is contained in:
+7
-25
@@ -16,7 +16,7 @@
|
||||
var/list/map_transition_config = MAP_TRANSITION_CONFIG
|
||||
|
||||
/world/New()
|
||||
world.log << "World loaded at [world.timeofday]"
|
||||
log_world("World loaded at [world.timeofday]")
|
||||
map_ready = 1
|
||||
|
||||
#if (PRELOAD_RSC == 0)
|
||||
@@ -52,9 +52,9 @@ var/list/map_transition_config = MAP_TRANSITION_CONFIG
|
||||
|
||||
if(config.sql_enabled)
|
||||
if(!setup_database_connection())
|
||||
world.log << "Your server failed to establish a connection with the database."
|
||||
log_world("Your server failed to establish a connection with the database.")
|
||||
else
|
||||
world.log << "Database connection established."
|
||||
log_world("Database connection established.")
|
||||
|
||||
|
||||
data_core = new /datum/datacore()
|
||||
@@ -117,12 +117,14 @@ var/last_irc_status = 0
|
||||
s["players"] = clients.len
|
||||
s["revision"] = revdata.commit
|
||||
s["revision_date"] = revdata.date
|
||||
|
||||
var/mentors = 0
|
||||
for(var/client/C in clients)
|
||||
var/mentor = mentor_datums[C.ckey]
|
||||
if(mentor)
|
||||
mentors++
|
||||
s["mentors"] = mentors
|
||||
|
||||
var/list/adm = get_admin_counts()
|
||||
var/list/presentmins = adm["present"]
|
||||
var/list/afkmins = adm["afk"]
|
||||
@@ -191,7 +193,7 @@ var/last_irc_status = 0
|
||||
else
|
||||
return ircadminwho()
|
||||
|
||||
#define WORLD_REBOOT(X) world.log << "World rebooted at [world.timeofday]"; ..(X)
|
||||
#define WORLD_REBOOT(X) log_world("World rebooted at [world.timeofday]"); ..(X); return;
|
||||
/world/Reboot(var/reason, var/feedback_c, var/feedback_r, var/time)
|
||||
if (reason == 1) //special reboot, do none of the normal stuff
|
||||
if (usr)
|
||||
@@ -277,26 +279,6 @@ var/last_irc_status = 0
|
||||
)
|
||||
world << sound(round_end_sound)
|
||||
|
||||
var/inerror = 0
|
||||
/world/Error(var/exception/e)
|
||||
//runtime while processing runtimes
|
||||
if (inerror)
|
||||
inerror = 0
|
||||
return ..(e)
|
||||
inerror = 1
|
||||
//newline at start is because of the "runtime error" byond prints that can't be timestamped.
|
||||
e.name = "\n\[[time2text(world.timeofday,"hh:mm:ss")]\][e.name]"
|
||||
|
||||
//this is done this way rather then replace text to pave the way for processing the runtime reports more thoroughly
|
||||
// (and because runtimes end with a newline, and we don't want to basically print an empty time stamp)
|
||||
var/list/split = splittext(e.desc, "\n")
|
||||
for (var/i in 1 to split.len)
|
||||
if (split[i] != "")
|
||||
split[i] = "\[[time2text(world.timeofday,"hh:mm:ss")]\][split[i]]"
|
||||
e.desc = jointext(split, "\n")
|
||||
inerror = 0
|
||||
return ..(e)
|
||||
|
||||
/world/proc/load_mode()
|
||||
var/list/Lines = file2list("data/mode.txt")
|
||||
if(Lines.len)
|
||||
@@ -404,7 +386,7 @@ var/failed_db_connections = 0
|
||||
else
|
||||
failed_db_connections++ //If it failed, increase the failed connections counter.
|
||||
if(config.sql_enabled)
|
||||
world.log << "SQL error: " + dbcon.ErrorMsg()
|
||||
log_world("SQL error: " + dbcon.ErrorMsg())
|
||||
|
||||
return .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user