APC & Machinery Refactor + Local Powernets (#19991)

* local powernet and machine power refactor

* some fixes

* more tweaks + powerchange() refactor

* fixes var edited apcs on meatpackers.dmm

* fixes issue with power channels

* Reviews

* delta fix

* Update code/game/machinery/portable_turret.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* removed area power change proc

* damn morgues

* requested changes

* request changes

* deconfliction

* mapping fixes

* some fixes from TM

---------

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
Ryan
2023-01-30 22:28:10 +00:00
committed by GitHub
co-authored by Henri215
parent caee0ec975
commit 7c3cd86f14
190 changed files with 2613 additions and 2556 deletions
@@ -17,10 +17,9 @@
var/ert_reason
anchored = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 2
active_power_usage = 6
power_channel = ENVIRON
idle_power_consumption = 2
active_power_consumption = 6
power_channel = PW_CHANNEL_ENVIRONMENT
req_access = list(ACCESS_KEYCARD_AUTH)
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
@@ -71,10 +70,8 @@
return ..()
/obj/machinery/keycard_auth/power_change()
if(powered(ENVIRON))
stat &= ~NOPOWER
else
stat |= NOPOWER
if(!..())
return
update_icon()
/obj/machinery/keycard_auth/attack_ghost(mob/user)
@@ -180,7 +180,7 @@ GLOBAL_DATUM_INIT(security_announcement, /datum/announcer, new(config_type = /da
continue
A.emergency_lights = FALSE
AR.area_emergency_mode = TRUE
for(var/obj/machinery/light/L in A.area)
for(var/obj/machinery/light/L in A.apc_area)
if(L.status)
continue
if(GLOB.security_level == SEC_LEVEL_DELTA)