From 852793311547159b62d1a10d97337cd886e9d758 Mon Sep 17 00:00:00 2001 From: Tastyfish Date: Mon, 11 Jan 2016 04:08:46 -0500 Subject: [PATCH] Fixed tcomms machines to be deconstructable --- code/game/machinery/telecomms/broadcaster.dm | 2 +- .../machinery/telecomms/machine_interactions.dm | 7 ++----- code/game/machinery/telecomms/telecomunications.dm | 14 +++++++------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index 855d190f792..2694578ad29 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -20,7 +20,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept use_power = 1 idle_power_usage = 25 machinetype = 5 - circuitboard = "/obj/item/weapon/circuitboard/telecomms/broadcaster" + circuitboard = /obj/item/weapon/circuitboard/telecomms/broadcaster /obj/machinery/telecomms/broadcaster/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from) // Don't broadcast rejected signals diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 3cafaed9df8..04a88492cd2 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -71,15 +71,12 @@ I.crit_fail = 1 I.loc = src.loc else - // If the machine wasn't made during runtime, probably doesn't have components: // manually find the components and drop them! - var/newpath = text2path(circuitboard) - var/obj/item/weapon/circuitboard/C = new newpath + var/obj/item/weapon/circuitboard/C = new circuitboard for(var/I in C.req_components) for(var/i = 1, i <= C.req_components[I], i++) - newpath = text2path(I) - var/obj/item/s = new newpath + var/obj/item/s = new I s.loc = src.loc if(istype(s, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/A = s diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 4946d6c7944..c0ab1c0baa0 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -29,7 +29,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() var/toggled = 1 // Is it toggled on var/on = 1 var/long_range_link = 0 // Can you link it across Z levels or on the otherside of the map? (Relay & Hub) - var/circuitboard = null // string pointing to a circuitboard type + var/circuitboard = null // type pointing to a circuitboard type var/hide = 0 // Is it a hidden machine? var/listening_level = 0 // 0 = auto set in New() - this is the z level that the machine is listening to. Mtoollink = 1 @@ -224,7 +224,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() use_power = 1 idle_power_usage = 30 machinetype = 1 - circuitboard = "/obj/item/weapon/circuitboard/telecomms/receiver" + circuitboard = /obj/item/weapon/circuitboard/telecomms/receiver /obj/machinery/telecomms/receiver/receive_signal(datum/signal/signal) @@ -280,7 +280,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() use_power = 1 idle_power_usage = 80 machinetype = 7 - circuitboard = "/obj/item/weapon/circuitboard/telecomms/hub" + circuitboard = /obj/item/weapon/circuitboard/telecomms/hub long_range_link = 1 netspeed = 40 @@ -314,7 +314,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() use_power = 1 idle_power_usage = 30 machinetype = 8 - circuitboard = "/obj/item/weapon/circuitboard/telecomms/relay" + circuitboard = /obj/item/weapon/circuitboard/telecomms/relay netspeed = 5 long_range_link = 1 var/broadcasting = 1 @@ -365,7 +365,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() use_power = 1 idle_power_usage = 50 machinetype = 2 - circuitboard = "/obj/item/weapon/circuitboard/telecomms/bus" + circuitboard = /obj/item/weapon/circuitboard/telecomms/bus netspeed = 40 var/change_frequency = 0 @@ -417,7 +417,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() use_power = 1 idle_power_usage = 30 machinetype = 3 - circuitboard = "/obj/item/weapon/circuitboard/telecomms/processor" + circuitboard = /obj/item/weapon/circuitboard/telecomms/processor var/process_mode = 1 // 1 = Uncompress Signals, 0 = Compress Signals receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from) @@ -454,7 +454,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() use_power = 1 idle_power_usage = 15 machinetype = 4 - circuitboard = "/obj/item/weapon/circuitboard/telecomms/server" + circuitboard = /obj/item/weapon/circuitboard/telecomms/server var/list/log_entries = list() var/list/stored_names = list() var/list/TrafficActions = list()