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:
@@ -224,7 +224,7 @@ var/datum/subsystem/garbage_collector/SSgarbage
|
||||
/datum/var/gc_destroyed //Time when this object was destroyed.
|
||||
|
||||
#ifdef TESTING
|
||||
/datum/var/running_find_references
|
||||
/datum/var/running_find_references
|
||||
/datum/var/last_find_references = 0
|
||||
|
||||
/datum/verb/find_refs()
|
||||
@@ -333,7 +333,7 @@ var/datum/subsystem/garbage_collector/SSgarbage
|
||||
else
|
||||
DoSearchVar(variable, "[Xname]: [varname]")
|
||||
#endif
|
||||
else if(islist(X))
|
||||
else if(islist(X))
|
||||
if(src in X)
|
||||
testing("Found [src.type] \ref[src] in list [Xname].")
|
||||
#ifdef GC_FAILURE_HARD_LOOKUP
|
||||
@@ -347,7 +347,6 @@ var/datum/subsystem/garbage_collector/SSgarbage
|
||||
//update this list using tools/DMTreeToGlobalsList
|
||||
/datum/proc/find_references_in_globals()
|
||||
SearchVar(last_irc_status)
|
||||
SearchVar(inerror)
|
||||
SearchVar(failed_db_connections)
|
||||
SearchVar(nextmap)
|
||||
SearchVar(mapchanging)
|
||||
|
||||
@@ -374,10 +374,10 @@ var/datum/subsystem/job/SSjob
|
||||
S = sloc
|
||||
break
|
||||
if(!S) //if there isn't a spawnpoint send them to latejoin, if there's no latejoin go yell at your mapper
|
||||
world.log << "Couldn't find a round start spawn point for [rank]"
|
||||
log_world("Couldn't find a round start spawn point for [rank]")
|
||||
S = pick(latejoin)
|
||||
if(!S) //final attempt, lets find some area in the arrivals shuttle to spawn them in to.
|
||||
world.log << "Couldn't find a round start latejoin spawn point."
|
||||
log_world("Couldn't find a round start latejoin spawn point.")
|
||||
for(var/turf/T in get_area_turfs(/area/shuttle/arrival))
|
||||
if(!T.density)
|
||||
var/clear = 1
|
||||
|
||||
@@ -116,4 +116,4 @@ var/datum/subsystem/lighting/SSlighting
|
||||
varval1 = "/list([length(varval1)])"
|
||||
varval2 = "/list([length(varval2)])"
|
||||
msg += "\t [varname] = [varval1] -> [varval2]\n"
|
||||
world.log << msg
|
||||
log_world(msg)
|
||||
|
||||
@@ -45,7 +45,7 @@ var/datum/subsystem/minimap/SSminimap
|
||||
for(var/z in z_levels)
|
||||
if(!fexists(file(map_path(z,backup)))) //Let's make sure we have a file for this map
|
||||
if(backup)
|
||||
world.log << "Failed to find backup file for map [MAP_NAME] on zlevel [z]."
|
||||
log_world("Failed to find backup file for map [MAP_NAME] on zlevel [z].")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ var/datum/subsystem/ticker/ticker
|
||||
world << "Please set up your character and select \"Ready\". The game will start in [config.lobby_countdown] seconds."
|
||||
current_state = GAME_STATE_PREGAME
|
||||
for(var/client/C in clients)
|
||||
window_flash(C) //let them know lobby has opened up.
|
||||
window_flash(C, ignorepref = TRUE) //let them know lobby has opened up.
|
||||
|
||||
if(GAME_STATE_PREGAME)
|
||||
//lobby stats for statpanels
|
||||
@@ -106,6 +106,8 @@ var/datum/subsystem/ticker/ticker
|
||||
|
||||
if(timeLeft <= 0)
|
||||
current_state = GAME_STATE_SETTING_UP
|
||||
if(start_immediately)
|
||||
fire()
|
||||
|
||||
if(GAME_STATE_SETTING_UP)
|
||||
if(!setup())
|
||||
@@ -212,11 +214,11 @@ var/datum/subsystem/ticker/ticker
|
||||
//Deleting Startpoints but we need the ai point to AI-ize people later
|
||||
if(S.name != "AI")
|
||||
qdel(S)
|
||||
/*
|
||||
|
||||
var/list/adm = get_admin_counts()
|
||||
if(!adm["present"])
|
||||
send2irc("Server", "Round just started with no active admins online!")
|
||||
*/
|
||||
var/list/allmins = adm["present"]
|
||||
send2irc("Server", "Round of [hide_mode ? "secret":"[mode.name]"] has started[allmins.len ? ".":" with no active admins online!"]")
|
||||
|
||||
/datum/subsystem/ticker/proc/station_explosion_detonation(atom/bomb)
|
||||
if(bomb) //BOOM
|
||||
var/turf/epi = bomb.loc
|
||||
@@ -554,7 +556,7 @@ var/datum/subsystem/ticker/ticker
|
||||
for(var/path in SSgarbage.didntgc)
|
||||
dellog += "Path : [path] \n"
|
||||
dellog += "Failures : [SSgarbage.didntgc[path]] \n"
|
||||
world.log << dellog
|
||||
log_world(dellog)
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
@@ -663,7 +665,6 @@ var/datum/subsystem/ticker/ticker
|
||||
|
||||
modevoted = ticker.modevoted
|
||||
|
||||
|
||||
/datum/subsystem/ticker/proc/send_news_report()
|
||||
var/news_message
|
||||
var/news_source = "Nanotrasen News Network"
|
||||
@@ -714,4 +715,4 @@ var/datum/subsystem/ticker/ticker
|
||||
news_message = "During routine evacuation procedures, the emergency shuttle of [station_name()] had its navigation protocols corrupted and went off course, but was recovered shortly after."
|
||||
|
||||
if(news_message)
|
||||
send2irc(news_source, news_message,"News_Report")
|
||||
send2otherserver(news_source, news_message,"News_Report")
|
||||
|
||||
43
code/controllers/subsystem/time_tracking.dm
Normal file
43
code/controllers/subsystem/time_tracking.dm
Normal file
@@ -0,0 +1,43 @@
|
||||
var/datum/subsystem/time_track/SStime_track
|
||||
|
||||
/datum/subsystem/time_track
|
||||
name = "Time Tracking"
|
||||
wait = 600
|
||||
flags = SS_NO_INIT|SS_FIRE_IN_LOBBY
|
||||
|
||||
var/time_dilation_current = 0
|
||||
|
||||
var/time_dilation_avg_fast = 0
|
||||
var/time_dilation_avg = 0
|
||||
var/time_dilation_avg_slow = 0
|
||||
|
||||
var/first_run = TRUE
|
||||
|
||||
var/last_tick_realtime = 0
|
||||
var/last_tick_byond_time = 0
|
||||
var/last_tick_tickcount = 0
|
||||
|
||||
/datum/subsystem/time_track/New()
|
||||
NEW_SS_GLOBAL(SStime_track)
|
||||
|
||||
/datum/subsystem/time_track/fire()
|
||||
|
||||
var/current_realtime = REALTIMEOFDAY
|
||||
var/current_byondtime = world.time
|
||||
var/current_tickcount = world.time/world.tick_lag
|
||||
|
||||
if (!first_run)
|
||||
var/tick_drift = max(0, (((current_realtime - last_tick_realtime) - (current_byondtime - last_tick_byond_time)) / world.tick_lag))
|
||||
|
||||
time_dilation_current = tick_drift / (current_tickcount - last_tick_tickcount) * 100
|
||||
|
||||
time_dilation_avg_fast = MC_AVERAGE_FAST(time_dilation_avg_fast, time_dilation_current)
|
||||
time_dilation_avg = MC_AVERAGE(time_dilation_avg, time_dilation_avg_fast)
|
||||
time_dilation_avg_slow = MC_AVERAGE_SLOW(time_dilation_avg_slow, time_dilation_avg)
|
||||
else
|
||||
first_run = FALSE
|
||||
last_tick_realtime = current_realtime
|
||||
last_tick_byond_time = current_byondtime
|
||||
last_tick_tickcount = current_tickcount
|
||||
|
||||
|
||||
@@ -299,7 +299,11 @@ proc/addtimer(datum/callback/callback, wait, flags)
|
||||
var/hash
|
||||
|
||||
if (flags & TIMER_UNIQUE)
|
||||
var/list/hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, wait, flags & TIMER_CLIENT_TIME)
|
||||
var/list/hashlist
|
||||
if(flags & TIMER_NO_HASH_WAIT)
|
||||
hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, flags & TIMER_CLIENT_TIME)
|
||||
else
|
||||
hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, wait, flags & TIMER_CLIENT_TIME)
|
||||
hashlist += callback.arguments
|
||||
hash = hashlist.Join("|||||||")
|
||||
|
||||
@@ -341,4 +345,4 @@ proc/addtimer(datum/callback/callback, wait, flags)
|
||||
|
||||
|
||||
#undef BUCKET_LEN
|
||||
#undef BUCKET_POS
|
||||
#undef BUCKET_POS
|
||||
Reference in New Issue
Block a user