mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Merge pull request #3745 from clusterfack/Bleeding-Edge-3
Powernet Hotfix
This commit is contained in:
@@ -12,7 +12,7 @@ var/global/list/power_machines = list()
|
||||
for(var/i = 1 to power_machines.len)
|
||||
if(i > power_machines.len)
|
||||
break
|
||||
var/obj/machinery/power/M = power_machines[i]
|
||||
var/obj/machinery/M = power_machines[i]
|
||||
if(istype(M) && !M.gcDestroyed)
|
||||
#ifdef PROFILE_MACHINES
|
||||
var/time_start = world.timeofday
|
||||
|
||||
@@ -615,3 +615,6 @@ Class Procs:
|
||||
if("buzz")
|
||||
src.visible_message("<span class='notice'>\icon[src] \The [src] buzzes.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 0)
|
||||
|
||||
/obj/machinery/proc/check_rebuild()
|
||||
return
|
||||
@@ -58,7 +58,7 @@
|
||||
check_rebuild()
|
||||
return powernet
|
||||
|
||||
/obj/machinery/power/proc/check_rebuild()
|
||||
/obj/machinery/power/check_rebuild()
|
||||
if(!build_status)
|
||||
return
|
||||
for(var/obj/structure/cable/C in src.loc)
|
||||
|
||||
@@ -147,10 +147,6 @@ var/global/powernets_broke = 0
|
||||
C.build_status = 0
|
||||
for(var/obj/machinery/power/P in NewPN.nodes)
|
||||
P.build_status = 0
|
||||
else
|
||||
if(build_status && !powernets_broke)
|
||||
powernets_broke = 1
|
||||
message_admins("Powernets tried to rebuild a network that already had a datum, tell a coder!")
|
||||
|
||||
///////////////////////////////////////////
|
||||
// GLOBAL PROCS for powernets handling
|
||||
@@ -187,9 +183,8 @@ var/global/powernets_broke = 0
|
||||
PN.set_to_build()
|
||||
powernets = list()
|
||||
|
||||
for(var/obj/structure/cable/PC in cable_list)
|
||||
if(PC.build_status)
|
||||
PC.rebuild_from()
|
||||
for(var/obj/structure/cable/C in cable_list)
|
||||
C.rebuild_from()
|
||||
|
||||
// remove the old powernet and replace it with a new one throughout the network.
|
||||
/proc/propagate_network(var/obj/O, var/datum/powernet/PN)
|
||||
|
||||
Reference in New Issue
Block a user