Merge branch 'master' into upstream-merge-31877
This commit is contained in:
@@ -147,7 +147,7 @@ GLOBAL_PROTECT(config_dir)
|
||||
E = entries_by_type[entry_type]
|
||||
if(!E)
|
||||
CRASH("Missing config entry for [entry_type]!")
|
||||
return E.ValidateAndSet(new_val)
|
||||
return E.ValidateAndSet("[new_val]")
|
||||
|
||||
/datum/controller/configuration/proc/LoadModes()
|
||||
gamemode_cache = typecacheof(/datum/game_mode, TRUE)
|
||||
|
||||
@@ -86,8 +86,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
sortTim(subsystems, /proc/cmp_subsystem_init)
|
||||
reverseRange(subsystems)
|
||||
for(var/datum/controller/subsystem/ss in subsystems)
|
||||
testing("Shutdown [ss.name] subsystem")
|
||||
log_world("Shutting down [ss.name] subsystem...")
|
||||
ss.Shutdown()
|
||||
log_world("Shutdown complete")
|
||||
|
||||
// Returns 1 if we created a new mc, 0 if we couldn't due to a recent restart,
|
||||
// -1 if we encountered a runtime trying to recreate it
|
||||
@@ -595,4 +596,4 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
if (client_count < CONFIG_GET(number/mc_tick_rate/disable_high_pop_mc_mode_amount))
|
||||
processing = CONFIG_GET(number/mc_tick_rate/base_mc_tick_rate)
|
||||
else if (client_count > CONFIG_GET(number/mc_tick_rate/high_pop_mc_mode_amount))
|
||||
processing = CONFIG_GET(number/mc_tick_rate/high_pop_mc_tick_rate)
|
||||
processing = CONFIG_GET(number/mc_tick_rate/high_pop_mc_tick_rate)
|
||||
|
||||
@@ -34,8 +34,7 @@
|
||||
var/static/list/failure_strikes //How many times we suspect a subsystem type has crashed the MC, 3 strikes and you're out!
|
||||
|
||||
//Do not override
|
||||
/datum/controller/subsystem/New()
|
||||
return
|
||||
///datum/controller/subsystem/New()
|
||||
|
||||
// Used to initialize the subsystem BEFORE the map has loaded
|
||||
// Called AFTER Recover if that is called
|
||||
|
||||
@@ -191,12 +191,8 @@ SUBSYSTEM_DEF(blackbox)
|
||||
var/sqljob = sanitizeSQL(L.mind.assigned_role)
|
||||
var/sqlspecial = sanitizeSQL(L.mind.special_role)
|
||||
var/sqlpod = sanitizeSQL(placeofdeath.name)
|
||||
var/laname
|
||||
var/lakey
|
||||
if(L.lastattacker && ismob(L.lastattacker))
|
||||
var/mob/LA = L.lastattacker
|
||||
laname = sanitizeSQL(LA.real_name)
|
||||
lakey = sanitizeSQL(LA.key)
|
||||
var/laname = sanitizeSQL(L.lastattacker)
|
||||
var/lakey = sanitizeSQL(L.lastattackerckey)
|
||||
var/sqlbrute = sanitizeSQL(L.getBruteLoss())
|
||||
var/sqlfire = sanitizeSQL(L.getFireLoss())
|
||||
var/sqlbrain = sanitizeSQL(L.getBrainLoss())
|
||||
|
||||
@@ -276,16 +276,29 @@ Delayed insert mode was removed in mysql 7 and only works with MyISAM type table
|
||||
|
||||
/datum/DBColumn/proc/SqlTypeName(type_handler = sql_type)
|
||||
switch(type_handler)
|
||||
if(TINYINT) return "TINYINT"
|
||||
if(SMALLINT) return "SMALLINT"
|
||||
if(MEDIUMINT) return "MEDIUMINT"
|
||||
if(INTEGER) return "INTEGER"
|
||||
if(BIGINT) return "BIGINT"
|
||||
if(FLOAT) return "FLOAT"
|
||||
if(DOUBLE) return "DOUBLE"
|
||||
if(DATE) return "DATE"
|
||||
if(DATETIME) return "DATETIME"
|
||||
if(TIMESTAMP) return "TIMESTAMP"
|
||||
if(TIME) return "TIME"
|
||||
if(STRING) return "STRING"
|
||||
if(BLOB) return "BLOB"
|
||||
if(TINYINT)
|
||||
return "TINYINT"
|
||||
if(SMALLINT)
|
||||
return "SMALLINT"
|
||||
if(MEDIUMINT)
|
||||
return "MEDIUMINT"
|
||||
if(INTEGER)
|
||||
return "INTEGER"
|
||||
if(BIGINT)
|
||||
return "BIGINT"
|
||||
if(FLOAT)
|
||||
return "FLOAT"
|
||||
if(DOUBLE)
|
||||
return "DOUBLE"
|
||||
if(DATE)
|
||||
return "DATE"
|
||||
if(DATETIME)
|
||||
return "DATETIME"
|
||||
if(TIMESTAMP)
|
||||
return "TIMESTAMP"
|
||||
if(TIME)
|
||||
return "TIME"
|
||||
if(STRING)
|
||||
return "STRING"
|
||||
if(BLOB)
|
||||
return "BLOB"
|
||||
|
||||
@@ -385,7 +385,8 @@ SUBSYSTEM_DEF(garbage)
|
||||
find_references(TRUE)
|
||||
|
||||
/datum/proc/DoSearchVar(X, Xname)
|
||||
if(usr && usr.client && !usr.client.running_find_references) return
|
||||
if(usr && usr.client && !usr.client.running_find_references)
|
||||
return
|
||||
if(istype(X, /datum))
|
||||
var/datum/D = X
|
||||
if(D.last_find_references == last_find_references)
|
||||
|
||||
@@ -26,13 +26,32 @@ PROCESSING_SUBSYSTEM_DEF(overlays)
|
||||
overlay_icon_cache = SSoverlays.overlay_icon_cache
|
||||
processing = SSoverlays.processing
|
||||
|
||||
#define COMPILE_OVERLAYS(A)\
|
||||
var/list/oo = A.our_overlays;\
|
||||
var/list/po = A.priority_overlays;\
|
||||
if(LAZYLEN(po)){\
|
||||
if(LAZYLEN(oo)){\
|
||||
A.overlays = oo + po;\
|
||||
}\
|
||||
else{\
|
||||
A.overlays = po;\
|
||||
}\
|
||||
}\
|
||||
else if(LAZYLEN(oo)){\
|
||||
A.overlays = oo;\
|
||||
}\
|
||||
else{\
|
||||
A.overlays.Cut();\
|
||||
}\
|
||||
A.flags_1 &= ~OVERLAY_QUEUED_1
|
||||
|
||||
/datum/controller/subsystem/processing/overlays/fire(resumed = FALSE, mc_check = TRUE)
|
||||
var/list/processing = src.processing
|
||||
while(processing.len)
|
||||
var/atom/thing = processing[processing.len]
|
||||
processing.len--
|
||||
if(thing)
|
||||
thing.compile_overlays()
|
||||
COMPILE_OVERLAYS(thing)
|
||||
if(mc_check)
|
||||
if(MC_TICK_CHECK)
|
||||
break
|
||||
@@ -44,19 +63,6 @@ PROCESSING_SUBSYSTEM_DEF(overlays)
|
||||
testing("Flushing [processing.len] overlays")
|
||||
fire(mc_check = FALSE) //pair this thread up with the MC to get extra compile time
|
||||
|
||||
/atom/proc/compile_overlays()
|
||||
var/list/oo = our_overlays
|
||||
var/list/po = priority_overlays
|
||||
if(LAZYLEN(po) && LAZYLEN(oo))
|
||||
overlays = oo + po
|
||||
else if(LAZYLEN(oo))
|
||||
overlays = oo
|
||||
else if(LAZYLEN(po))
|
||||
overlays = po
|
||||
else
|
||||
overlays.Cut()
|
||||
flags_1 &= ~OVERLAY_QUEUED_1
|
||||
|
||||
/proc/iconstate2appearance(icon, iconstate)
|
||||
var/static/image/stringbro = new()
|
||||
var/list/icon_states_cache = SSoverlays.overlay_icon_state_caches
|
||||
|
||||
Reference in New Issue
Block a user