Fixes drone runtime.

Spawning drones no longer cause runtimes. Fixes #9909.
This commit is contained in:
PsiOmega
2015-06-28 18:47:06 +02:00
parent 6a808e5394
commit 7e33beab0f
5 changed files with 8 additions and 8 deletions

View File

@@ -11,6 +11,7 @@ var/global/list/station_networks = list(
NETWORK_MINE,
NETWORK_RESEARCH,
NETWORK_RESEARCH_OUTPOST,
NETWORK_ROBOTS,
NETWORK_PRISON,
NETWORK_SECURITY
)

View File

@@ -57,15 +57,13 @@
updateicon()
/mob/living/silicon/robot/drone/init()
aiCamera = new/obj/item/device/camera/siliconcam/drone_camera(src)
if(!laws) laws = new law_type
if(!module) module = new module_type(src)
aiCamera = new/obj/item/device/camera/siliconcam/drone_camera(src)
flavor_text = "It's a tiny little repair drone. The casing is stamped with an NT logo and the subscript: 'NanoTrasen Recursive Repair Systems: Fixing Tomorrow's Problem, Today!'"
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
spawn(1)
if(camera && ("Robots" in camera.network))
camera.add_network("Engineering")
//Redefining some robot procs...
/mob/living/silicon/robot/drone/SetName(pickedName as text)

View File

@@ -125,15 +125,14 @@
radio = new /obj/item/device/radio/borg(src)
common_radio = radio
init()
if(!scrambledcodes && !camera)
camera = new /obj/machinery/camera(src)
camera.c_tag = real_name
camera.replace_networks(list("SS13","Robots"))
camera.replace_networks(list(NETWORK_EXODUS,NETWORK_ROBOTS))
if(wires.IsIndexCut(BORG_WIRE_CAMERA))
camera.status = 0
init()
initialize_components()
//if(!unfinished)
// Create all the robot parts.

View File

@@ -108,7 +108,7 @@ var/global/list/robot_modules = list(
added_languages.Cut()
/obj/item/weapon/robot_module/proc/add_camera_networks(var/mob/living/silicon/robot/R)
if(R.camera && "Robots" in R.camera.network)
if(R.camera && (NETWORK_ROBOTS in R.camera.network))
for(var/network in networks)
if(!(network in R.camera.network))
R.camera.add_network(network)
@@ -646,6 +646,7 @@ var/global/list/robot_modules = list(
/obj/item/weapon/robot_module/drone
name = "drone module"
no_slip = 1
networks = list(NETWORK_ENGINEERING)
/obj/item/weapon/robot_module/drone/New()
..()

View File

@@ -938,6 +938,7 @@ var/list/be_special_flags = list(
#define NETWORK_MINE "MINE"
#define NETWORK_RESEARCH "Research"
#define NETWORK_RESEARCH_OUTPOST "Research Outpost"
#define NETWORK_ROBOTS "Robots"
#define NETWORK_PRISON "Prison"
#define NETWORK_SECURITY "Security"
#define NETWORK_TELECOM "Tcomsat"