mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-16 05:02:42 +00:00
Fixed the following.
runtime error: Cannot read null.netnum proc name: mergeConnectedNetworksOnTurf (/obj/cable/proc/mergeConnectedNetworksOnTurf) source file: cable.dm,497 usr: Sergio Mitchell (/mob/living/carbon/human) src: the cable (/obj/cable) call stack: git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1926 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -455,6 +455,10 @@
|
|||||||
TB = get_step(src, direction)
|
TB = get_step(src, direction)
|
||||||
|
|
||||||
for(var/obj/cable/TC in TB)
|
for(var/obj/cable/TC in TB)
|
||||||
|
|
||||||
|
if(!TC)
|
||||||
|
continue
|
||||||
|
|
||||||
if(src == TC)
|
if(src == TC)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@@ -480,6 +484,10 @@
|
|||||||
|
|
||||||
for(var/obj/cable/C in loc)
|
for(var/obj/cable/C in loc)
|
||||||
|
|
||||||
|
|
||||||
|
if(!C)
|
||||||
|
continue
|
||||||
|
|
||||||
if(C == src)
|
if(C == src)
|
||||||
continue
|
continue
|
||||||
if(netnum == 0)
|
if(netnum == 0)
|
||||||
@@ -495,20 +503,28 @@
|
|||||||
|
|
||||||
for(var/obj/machinery/power/M in loc)
|
for(var/obj/machinery/power/M in loc)
|
||||||
|
|
||||||
if(M.netnum < 0)
|
if(!M)
|
||||||
continue
|
continue
|
||||||
if(M.netnum == 0)
|
|
||||||
|
if(!M.netnum)
|
||||||
var/datum/powernet/PN = powernets[netnum]
|
var/datum/powernet/PN = powernets[netnum]
|
||||||
PN.nodes += M
|
PN.nodes += M
|
||||||
M.netnum = netnum
|
M.netnum = netnum
|
||||||
M.powernet = powernets[M.netnum]
|
M.powernet = powernets[M.netnum]
|
||||||
|
|
||||||
|
if(M.netnum < 0)
|
||||||
|
continue
|
||||||
|
|
||||||
var/datum/powernet/PN = powernets[netnum]
|
var/datum/powernet/PN = powernets[netnum]
|
||||||
var/datum/powernet/TPN = powernets[M.netnum]
|
var/datum/powernet/TPN = powernets[M.netnum]
|
||||||
|
|
||||||
PN.merge_powernets(TPN)
|
PN.merge_powernets(TPN)
|
||||||
|
|
||||||
for(var/obj/machinery/power/apc/N in loc)
|
for(var/obj/machinery/power/apc/N in loc)
|
||||||
|
|
||||||
|
if(!N)
|
||||||
|
continue
|
||||||
|
|
||||||
var/obj/machinery/power/M
|
var/obj/machinery/power/M
|
||||||
M = N.terminal
|
M = N.terminal
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user