mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
fix: fix APC behavior in unpowered areas (#25642)
* fix: make unpowered areas without APCs actually unpowered * Update code/modules/power/powernets/local_powernet.dm Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: warriorstar-orion <orion@snowfrost.garden> --------- Signed-off-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
This commit is contained in:
co-authored by
1080pCat
parent
37b08619b0
commit
5a2fd048b1
@@ -166,8 +166,15 @@
|
||||
|
||||
/obj/machinery/power/apc/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
var/area/A = get_area(src)
|
||||
|
||||
if(A.powernet && !A.powernet.powernet_apc)
|
||||
A.powernet.powernet_apc = src
|
||||
|
||||
if(!mapload)
|
||||
return
|
||||
|
||||
electronics_state = APC_ELECTRONICS_SECURED
|
||||
// is starting with a power cell installed, create it and set its charge level
|
||||
if(cell_type)
|
||||
@@ -175,9 +182,6 @@
|
||||
cell.maxcharge = cell_type // cell_type is maximum charge (old default was 1000 or 2500 (values one and two respectively)
|
||||
cell.charge = start_charge * cell.maxcharge / 100 // (convert percentage to actual value)
|
||||
|
||||
var/area/A = get_area(src)
|
||||
|
||||
|
||||
//if area isn't specified use current
|
||||
if(keep_preset_name)
|
||||
if(isarea(A))
|
||||
|
||||
Reference in New Issue
Block a user