Moved makepowernets() into SSmachines initialization proc.

This commit is contained in:
Leshana
2017-12-28 15:21:14 -05:00
parent a97a574278
commit a1734c97e9
7 changed files with 8 additions and 24 deletions
+1 -1
View File
@@ -84,7 +84,7 @@
user << "<font color='blue'>You secure the generator to the floor.</font>"
else
user << "<font color='blue'>You unsecure the generator from the floor.</font>"
makepowernets()
SSmachines.makepowernets()
else if(istype(O, /obj/item/weapon/screwdriver))
open = !open
playsound(loc, O.usesound, 50, 1)
-16
View File
@@ -230,22 +230,6 @@
. += C
return .
/hook/startup/proc/buildPowernets()
return makepowernets()
// rebuild all power networks from scratch - only called at world creation or by the admin verb
/proc/makepowernets()
for(var/datum/powernet/PN in powernets)
qdel(PN)
powernets.Cut()
for(var/obj/structure/cable/PC in cable_list)
if(!PC.powernet)
var/datum/powernet/NewPN = new()
NewPN.add_cable(PC)
propagate_network(PC,PC.powernet)
return 1
//remove the old powernet and replace it with a new one throughout the network.
/proc/propagate_network(var/obj/O, var/datum/powernet/PN)
//world.log << "propagating new network"