Merge branch 'master' into upstream-merge-31371

This commit is contained in:
LetterJay
2017-10-08 15:37:46 -04:00
committed by GitHub
43 changed files with 256 additions and 87 deletions
@@ -49,7 +49,6 @@ GLOBAL_PROTECT(config_dir)
if(initial(E.abstract_type) == I)
continue
E = new I
_entries_by_type[I] = E
var/esname = E.name
var/datum/config_entry/test = _entries[esname]
if(test)
@@ -57,6 +56,7 @@ GLOBAL_PROTECT(config_dir)
qdel(E)
continue
_entries[esname] = E
_entries_by_type[I] = E
.[E.resident_file] = TRUE
/datum/controller/configuration/proc/RemoveEntry(datum/config_entry/CE)
@@ -268,3 +268,8 @@ CONFIG_DEF(flag/allow_extended_miscreants)
GLOB.MAX_EX_LIGHT_RANGE = value
GLOB.MAX_EX_FLASH_RANGE = value
GLOB.MAX_EX_FLAME_RANGE = value
CONFIG_DEF(number/emergency_shuttle_autocall_threshold)
min_val = 0
max_val = 1
integer = FALSE
+10
View File
@@ -573,3 +573,13 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
for(var/S in subsystems)
var/datum/controller/subsystem/SS = S
SS.StopLoadingMap()
/datum/controller/master/proc/UpdateTickRate()
if (!processing)
return
var/client_count = length(GLOB.clients)
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)
+27 -1
View File
@@ -136,6 +136,7 @@ SUBSYSTEM_DEF(shuttle)
if(changed_transit)
color_space()
#endif
CheckAutoEvac()
while(transit_requesters.len)
var/requester = popleft(transit_requesters)
@@ -148,7 +149,32 @@ SUBSYSTEM_DEF(shuttle)
var/obj/docking_port/mobile/M = requester
M.transit_failure()
if(MC_TICK_CHECK)
return
break
/datum/controller/subsystem/shuttle/proc/CheckAutoEvac()
if(emergencyNoEscape || emergencyNoRecall || !emergency)
return
var/threshold = CONFIG_GET(number/emergency_shuttle_autocall_threshold)
if(!threshold)
return
var/alive = 0
for(var/I in GLOB.player_list)
var/mob/M = I
if(M.stat != DEAD)
++alive
var/total = GLOB.joined_player_list.len
if(alive / total <= threshold)
var/msg = "Automatically dispatching shuttle due to crew death."
message_admins(msg)
log_game("[msg] Alive: [alive], Roundstart: [total], Threshold: [threshold]")
emergencyNoRecall = TRUE
priority_announce("Catastrophic casualties detected: crisis shuttle protocols activated - jamming recall signals across all frequencies.")
if(emergency.timeLeft(1) > emergencyCallTime * 0.4)
emergency.request(null, set_coefficient = 0.4)
/datum/controller/subsystem/shuttle/proc/getShuttle(id)
for(var/obj/docking_port/mobile/M in mobile)
+6 -6
View File
@@ -258,7 +258,7 @@ SUBSYSTEM_DEF(ticker)
//Deleting Startpoints but we need the ai point to AI-ize people later
if(S.name != "AI")
qdel(S)
//assign crew objectives and generate miscreants
if(CONFIG_GET(flag/allow_extended_miscreants) && GLOB.master_mode == "extended")
GLOB.miscreants_allowed = TRUE
@@ -282,7 +282,7 @@ SUBSYSTEM_DEF(ticker)
qdel(bomb)
if(epi)
explosion(epi, 0, 256, 512, 0, TRUE, TRUE, 0, TRUE)
/datum/controller/subsystem/ticker/proc/create_characters()
for(var/mob/dead/new_player/player in GLOB.player_list)
if(player.ready == PLAYER_READY_TO_PLAY && player.mind)
@@ -472,13 +472,13 @@ SUBSYSTEM_DEF(ticker)
if(!crewMind.current || !crewMind.objectives.len)
continue
for(var/datum/objective/miscreant/MO in crewMind.objectives)
miscreants += "<B>[crewMind.current.real_name]</B> (Played by: <B>[crewMind.key]</B>). <B>Objective</B>: [MO.explanation_text]"
miscreants += "<B>[crewMind.current.real_name]</B> (Played by: <B>[crewMind.key]</B>)<BR><B>Objective</B>: [MO.explanation_text] <font color='grey'>(Optional)</font><BR>"
for(var/datum/objective/crew/CO in crewMind.objectives)
if(CO.check_completion())
to_chat(crewMind.current, "<br><B>Your objective</B>: [CO.explanation_text] <font color='green'><B>Success!</B></font>")
successfulCrew += "<B>[crewMind.current.real_name]</B> (Played by: <B>[crewMind.key]</B>). <B>Objective</B>: [CO.explanation_text]"
to_chat(crewMind.current, "<br><B>Your optional objective</B>: [CO.explanation_text] <font color='green'><B>Success!</B></font>")
successfulCrew += "<B>[crewMind.current.real_name]</B> (Played by: <B>[crewMind.key]</B>)<BR><B>Objective</B>: [CO.explanation_text] <font color='green'><B>Success!</B></font> <font color='grey'>(Optional)</font><BR>"
else
to_chat(crewMind.current, "<br><B>Your objective</B>: [CO.explanation_text] <font color='red'><B>Failed.</B></font>")
to_chat(crewMind.current, "<br><B>Your optional objective</B>: [CO.explanation_text] <font color='red'><B>Failed.</B></font>")
if (successfulCrew.len)
var/completedObjectives = "<B>The following crew members completed their Crew Objectives:</B><BR>"