mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fixes drone runtime.
Spawning drones no longer cause runtimes. Fixes #9909.
This commit is contained in:
@@ -11,6 +11,7 @@ var/global/list/station_networks = list(
|
|||||||
NETWORK_MINE,
|
NETWORK_MINE,
|
||||||
NETWORK_RESEARCH,
|
NETWORK_RESEARCH,
|
||||||
NETWORK_RESEARCH_OUTPOST,
|
NETWORK_RESEARCH_OUTPOST,
|
||||||
|
NETWORK_ROBOTS,
|
||||||
NETWORK_PRISON,
|
NETWORK_PRISON,
|
||||||
NETWORK_SECURITY
|
NETWORK_SECURITY
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -57,15 +57,13 @@
|
|||||||
updateicon()
|
updateicon()
|
||||||
|
|
||||||
/mob/living/silicon/robot/drone/init()
|
/mob/living/silicon/robot/drone/init()
|
||||||
|
aiCamera = new/obj/item/device/camera/siliconcam/drone_camera(src)
|
||||||
|
|
||||||
if(!laws) laws = new law_type
|
if(!laws) laws = new law_type
|
||||||
if(!module) module = new module_type(src)
|
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!'"
|
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)
|
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...
|
//Redefining some robot procs...
|
||||||
/mob/living/silicon/robot/drone/SetName(pickedName as text)
|
/mob/living/silicon/robot/drone/SetName(pickedName as text)
|
||||||
|
|||||||
@@ -125,15 +125,14 @@
|
|||||||
radio = new /obj/item/device/radio/borg(src)
|
radio = new /obj/item/device/radio/borg(src)
|
||||||
common_radio = radio
|
common_radio = radio
|
||||||
|
|
||||||
init()
|
|
||||||
|
|
||||||
if(!scrambledcodes && !camera)
|
if(!scrambledcodes && !camera)
|
||||||
camera = new /obj/machinery/camera(src)
|
camera = new /obj/machinery/camera(src)
|
||||||
camera.c_tag = real_name
|
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))
|
if(wires.IsIndexCut(BORG_WIRE_CAMERA))
|
||||||
camera.status = 0
|
camera.status = 0
|
||||||
|
|
||||||
|
init()
|
||||||
initialize_components()
|
initialize_components()
|
||||||
//if(!unfinished)
|
//if(!unfinished)
|
||||||
// Create all the robot parts.
|
// Create all the robot parts.
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ var/global/list/robot_modules = list(
|
|||||||
added_languages.Cut()
|
added_languages.Cut()
|
||||||
|
|
||||||
/obj/item/weapon/robot_module/proc/add_camera_networks(var/mob/living/silicon/robot/R)
|
/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)
|
for(var/network in networks)
|
||||||
if(!(network in R.camera.network))
|
if(!(network in R.camera.network))
|
||||||
R.camera.add_network(network)
|
R.camera.add_network(network)
|
||||||
@@ -646,6 +646,7 @@ var/global/list/robot_modules = list(
|
|||||||
/obj/item/weapon/robot_module/drone
|
/obj/item/weapon/robot_module/drone
|
||||||
name = "drone module"
|
name = "drone module"
|
||||||
no_slip = 1
|
no_slip = 1
|
||||||
|
networks = list(NETWORK_ENGINEERING)
|
||||||
|
|
||||||
/obj/item/weapon/robot_module/drone/New()
|
/obj/item/weapon/robot_module/drone/New()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -938,6 +938,7 @@ var/list/be_special_flags = list(
|
|||||||
#define NETWORK_MINE "MINE"
|
#define NETWORK_MINE "MINE"
|
||||||
#define NETWORK_RESEARCH "Research"
|
#define NETWORK_RESEARCH "Research"
|
||||||
#define NETWORK_RESEARCH_OUTPOST "Research Outpost"
|
#define NETWORK_RESEARCH_OUTPOST "Research Outpost"
|
||||||
|
#define NETWORK_ROBOTS "Robots"
|
||||||
#define NETWORK_PRISON "Prison"
|
#define NETWORK_PRISON "Prison"
|
||||||
#define NETWORK_SECURITY "Security"
|
#define NETWORK_SECURITY "Security"
|
||||||
#define NETWORK_TELECOM "Tcomsat"
|
#define NETWORK_TELECOM "Tcomsat"
|
||||||
|
|||||||
Reference in New Issue
Block a user