diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm index 90c44fdfa5b..51cebd65e49 100644 --- a/code/game/gamemodes/events/space_ninja.dm +++ b/code/game/gamemodes/events/space_ninja.dm @@ -140,10 +140,11 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp var/list/candidates = list() //list of candidate keys for(var/mob/dead/observer/G in player_list) - if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5) + if(G.client && !G.client.holder && ((G.client.inactivity/10)/60) <= 5) if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) candidates += G.key if(!candidates.len) return + candidates = shuffle(candidates)//Incorporating Donkie's list shuffle //The ninja will be created on the right spawn point or at late join. diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 8acfe1740a2..dad383d0d0d 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -1008,6 +1008,9 @@ table tr:first-child th:first-child { border: none;} spawn(rand(0,15)) update_icon() +/obj/machinery/firealarm + var/last_process = 0 + /obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume) if(src.detecting) if(temperature > T0C+200) @@ -1039,26 +1042,28 @@ table tr:first-child th:first-child { border: none;} src.add_fingerprint(user) return -/obj/machinery/firealarm/process() +/obj/machinery/firealarm/process()//Note: this processing was mostly phased out due to other code, and only runs when needed if(stat & (NOPOWER|BROKEN)) return - var/area/A = src.loc - A = A.loc +// var/area/A = src.loc +// A = A.loc - if(A.fire) - src.icon_state = "fire1" - else - src.icon_state = "fire0" +// if(A.fire) +// src.icon_state = "fire1" +// else +// src.icon_state = "fire0" - if (src.timing) - if (src.time > 0) - src.time = round(src.time) - 1 + if(src.timing) + if(src.time > 0) + src.time = src.time - ((world.timeofday - last_process)/10) else - alarm() + src.alarm() src.time = 0 src.timing = 0 + processing_objects.Remove(src) src.updateDialog() + last_process = world.timeofday return /obj/machinery/firealarm/power_change() @@ -1089,8 +1094,8 @@ table tr:first-child th:first-child { border: none;} d2 = text("Stop Time Lock", src) else d2 = text("Initiate Time Lock", src) - var/second = src.time % 60 - var/minute = (src.time - second) / 60 + var/second = round(src.time) % 60 + var/minute = (round(src.time) - second) / 60 var/dat = "
Fire alarm [d1]\n