mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Merge pull request #11862 from Ty-Omaha/grid-check-fix
Fixes Grid Check
This commit is contained in:
@@ -45,6 +45,11 @@
|
||||
continue
|
||||
if(C.cell)
|
||||
C.cell.charge = 0
|
||||
for(var/obj/machinery/power/P in GLOB.machines)
|
||||
var/area/current_area = get_area(P)
|
||||
if((current_area.type in skipped_areas_apc) || (current_area.type in skipped_areas) || !is_station_level(P.z))
|
||||
continue
|
||||
P.malfunction = TRUE
|
||||
|
||||
/proc/power_restore(var/announce = 1)
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai)
|
||||
@@ -67,6 +72,8 @@
|
||||
S.input_attempt = S.last_input_attempt
|
||||
S.update_icon()
|
||||
S.power_change()
|
||||
for(var/obj/machinery/power/P in GLOB.machines)
|
||||
P.malfunction = FALSE
|
||||
|
||||
/proc/power_restore_quick(var/announce = 1)
|
||||
if(announce)
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
use_power = NO_POWER_USE
|
||||
idle_power_usage = 0
|
||||
active_power_usage = 0
|
||||
var/malfunction = FALSE
|
||||
|
||||
/obj/machinery/power/Destroy()
|
||||
disconnect_from_network()
|
||||
@@ -30,7 +31,7 @@
|
||||
// Non-machines should use add_delayedload(), delayed_surplus(), newavail()
|
||||
|
||||
/obj/machinery/power/proc/add_avail(amount)
|
||||
if(powernet)
|
||||
if(powernet && !malfunction)
|
||||
powernet.newavail += amount
|
||||
return TRUE
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user