mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 10:01:40 +00:00
Make it so the code doesn't rebuild (propagate_network()) the wire network X times when singulo/explosion destroys a line of X cables at once.
This commit is contained in:
@@ -432,12 +432,15 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
P.disconnect_from_network() //remove from current network (and delete powernet)
|
||||
return
|
||||
|
||||
var/obj/O = P_list[1]
|
||||
// remove the cut cable from its turf and powernet, so that it doesn't get count in propagate_network worklist
|
||||
loc = null
|
||||
powernet.remove_cable(src) //remove the cut cable from its powernet
|
||||
|
||||
var/datum/powernet/newPN = new()// creates a new powernet...
|
||||
propagate_network(P_list[1], newPN)//... and propagates it to the other side of the cable
|
||||
spawn(0) //so we don't rebuild the network X times when singulo/explosion destroys a line of X cables
|
||||
if(O && !qdeleted(O))
|
||||
var/datum/powernet/newPN = new()// creates a new powernet...
|
||||
propagate_network(O, newPN)//... and propagates it to the other side of the cable
|
||||
|
||||
// Disconnect machines connected to nodes
|
||||
if(d1 == 0) // if we cut a node (O-X) cable
|
||||
|
||||
Reference in New Issue
Block a user