[MIRROR] Fixes powernets improperly rebuilding when a ship moves (#501)

* Fixes powernets imporoperly rebuilding when a ship moves (#53132)

* Fixes powernets improperly rebuilding when a ship moves

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-08-25 00:01:16 +02:00
committed by GitHub
co-authored by LemonInTheDark
parent 664d153a3f
commit 2a7405c449
+2 -3
View File
@@ -332,13 +332,12 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
var/datum/powernet/newPN = new()// creates a new powernet...
propagate_network(O, newPN)//... and propagates it to the other side of the cable
//Makes a new network for the cable and propgates it.
//If it finds another network in the process, aborts and uses that one and propagates off of it instead
//Makes a new network for the cable and propgates it. If we already have one, just die
/obj/structure/cable/proc/propagate_if_no_network()
if(powernet)
return
var/datum/powernet/newPN = new()
propagate_network(src, newPN, TRUE)
propagate_network(src, newPN)
// cut the cable's powernet at this cable and updates the powergrid
/obj/structure/cable/proc/cut_cable_from_powernet(remove = TRUE)