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
+4 -6
View File
@@ -2942,16 +2942,14 @@
if("flicklights")
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Flicker Lights")
while(!usr.stat)
//knock yourself out to stop the ghosts
//knock yourself out to stop the ghosts
for(var/mob/M in GLOB.player_list)
if(M.stat != 2 && prob(25))
var/area/AffectedArea = get_area(M)
if(AffectedArea.name != "Space" && AffectedArea.name != "Engine Walls" && AffectedArea.name != "Chemical Lab Test Chamber" && AffectedArea.name != "Escape Shuttle" && AffectedArea.name != "Arrival Area" && AffectedArea.name != "Arrival Shuttle" && AffectedArea.name != "start area" && AffectedArea.name != "Engine Combustion Chamber")
AffectedArea.power_light = 0
AffectedArea.power_change()
spawn(rand(55,185))
AffectedArea.power_light = 1
AffectedArea.power_change()
AffectedArea.powernet.set_power_channel(PW_CHANNEL_LIGHTING, FALSE)
spawn(rand(55, 185))
AffectedArea.powernet.set_power_channel(PW_CHANNEL_LIGHTING, TRUE)
var/Message = rand(1,4)
switch(Message)
if(1)