mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-13 11:12:14 +00:00
Merge pull request #11392 from phil235/SinguloCableNetRebuildFix
An attempt to reduce singulo lag from power wires destruction. 2nd attempt.
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)
|
P.disconnect_from_network() //remove from current network (and delete powernet)
|
||||||
return
|
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
|
// remove the cut cable from its turf and powernet, so that it doesn't get count in propagate_network worklist
|
||||||
loc = null
|
loc = null
|
||||||
powernet.remove_cable(src) //remove the cut cable from its powernet
|
powernet.remove_cable(src) //remove the cut cable from its powernet
|
||||||
|
|
||||||
var/datum/powernet/newPN = new()// creates a new powernet...
|
spawn(0) //so we don't rebuild the network X times when singulo/explosion destroys a line of X cables
|
||||||
propagate_network(P_list[1], newPN)//... and propagates it to the other side of the cable
|
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
|
// Disconnect machines connected to nodes
|
||||||
if(d1 == 0) // if we cut a node (O-X) cable
|
if(d1 == 0) // if we cut a node (O-X) cable
|
||||||
|
|||||||
Reference in New Issue
Block a user