mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-04 14:01:22 +00:00
[MIRROR] Some nightshift fixes [MDB IGNORE] (#15126)
* Some nightshift fixes (#68566) Fixes APC night shift manual cycling balloon alert; update_nightshift uses the correct variable * Some nightshift fixes Co-authored-by: Profakos <profakos@gmail.com>
This commit is contained in:
@@ -56,6 +56,6 @@ SUBSYSTEM_DEF(nightshift)
|
|||||||
for(var/obj/machinery/power/apc/APC as anything in currentrun)
|
for(var/obj/machinery/power/apc/APC as anything in currentrun)
|
||||||
currentrun -= APC
|
currentrun -= APC
|
||||||
if (APC.area && (APC.area.type in GLOB.the_station_areas))
|
if (APC.area && (APC.area.type in GLOB.the_station_areas))
|
||||||
APC.set_nightshift(active)
|
APC.set_nightshift(nightshift_active)
|
||||||
if(MC_TICK_CHECK)
|
if(MC_TICK_CHECK)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -328,7 +328,7 @@
|
|||||||
toggle_breaker(usr)
|
toggle_breaker(usr)
|
||||||
. = TRUE
|
. = TRUE
|
||||||
if("toggle_nightshift")
|
if("toggle_nightshift")
|
||||||
toggle_nightshift_lights()
|
toggle_nightshift_lights(usr)
|
||||||
. = TRUE
|
. = TRUE
|
||||||
if("charge")
|
if("charge")
|
||||||
chargemode = !chargemode
|
chargemode = !chargemode
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
terminal.setDir(dir)
|
terminal.setDir(dir)
|
||||||
terminal.master = src
|
terminal.master = src
|
||||||
|
|
||||||
/obj/machinery/power/apc/proc/toggle_nightshift_lights(mob/living/user)
|
/obj/machinery/power/apc/proc/toggle_nightshift_lights(mob/user)
|
||||||
if(last_nightshift_switch > world.time - 100) //~10 seconds between each toggle to prevent spamming
|
if(last_nightshift_switch > world.time - 10 SECONDS) //~10 seconds between each toggle to prevent spamming
|
||||||
balloon_alert(user, "night breaker is cycling!")
|
balloon_alert(user, "night breaker is cycling!")
|
||||||
return
|
return
|
||||||
last_nightshift_switch = world.time
|
last_nightshift_switch = world.time
|
||||||
|
|||||||
Reference in New Issue
Block a user