mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-20 19:42:34 +01:00
Moved makepowernets() into SSmachines initialization proc.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user