Merge branch 'release' of https://github.com/VOREStation/VOREStation into izac-voreupdate

This commit is contained in:
izac112
2020-05-13 10:21:49 +02:00
87 changed files with 1016 additions and 793 deletions

View File

@@ -57,23 +57,23 @@ var/datum/controller/failsafe/Failsafe
if(4,5)
--defcon
if(3)
to_chat(admins, "<span class='adminnotice'>Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks.</span>")
to_chat(GLOB.admins, "<span class='adminnotice'>Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks.</span>")
--defcon
if(2)
to_chat(admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.</span>")
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.</span>")
--defcon
if(1)
to_chat(admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...</span>")
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...</span>")
--defcon
var/rtn = Recreate_MC()
if(rtn > 0)
defcon = 4
master_iteration = 0
to_chat(admins, "<span class='adminnotice'>MC restarted successfully</span>")
to_chat(GLOB.admins, "<span class='adminnotice'>MC restarted successfully</span>")
else if(rtn < 0)
log_world("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0")
to_chat(admins, "<span class='boldannounce'>ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.</span>")
to_chat(GLOB.admins, "<span class='boldannounce'>ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.</span>")
//if the return number was 0, it just means the mc was restarted too recently, and it just needs some time before we try again
//no need to handle that specially when defcon 0 can handle it
if(0) //DEFCON 0! (mc failed to restart)
@@ -81,7 +81,7 @@ var/datum/controller/failsafe/Failsafe
if(rtn > 0)
defcon = 4
master_iteration = 0
to_chat(admins, "<span class='adminnotice'>MC restarted successfully</span>")
to_chat(GLOB.admins, "<span class='adminnotice'>MC restarted successfully</span>")
else
defcon = min(defcon + 1,5)
master_iteration = Master.iteration

View File

@@ -64,7 +64,7 @@ SUBSYSTEM_DEF(nightshift)
announce("Good evening, crew. To reduce power consumption and stimulate the circadian rhythms of some species, all of the lights aboard the station have been dimmed for the night.")
else
announce("Good morning, crew. As it is now day time, all of the lights aboard the station have been restored to their former brightness.")
for(var/obj/machinery/power/apc/apc in machines)
for(var/obj/machinery/power/apc/apc in GLOB.apcs)
if(apc.z in using_map.station_levels)
apc.set_nightshift(active, TRUE)
CHECK_TICK

View File

@@ -45,6 +45,17 @@ SUBSYSTEM_DEF(persist)
var/department_earning = J.pto_type
clear_unused_pto(M)
// Determine special PTO types and convert properly
if(department_earning == PTO_CYBORG)
if(isrobot(M))
var/mob/living/silicon/robot/C = M
if(C?.module?.pto_type)
department_earning = C.module.pto_type
if(department_earning == PTO_CYBORG)
if (MC_TICK_CHECK)
return
continue
// Update client whatever
var/client/C = M.client
var/wait_in_hours = wait / (1 HOUR)
@@ -100,4 +111,4 @@ SUBSYSTEM_DEF(persist)
LAZYINITLIST(C.department_hours)
if(C.department_hours[DEPARTMENT_COMMAND])
C.department_hours[DEPARTMENT_COMMAND] = null
C.department_hours.Remove(DEPARTMENT_COMMAND)
C.department_hours.Remove(DEPARTMENT_COMMAND)