From a7330745a26742d1d9c85c10cd0a8bd916003e63 Mon Sep 17 00:00:00 2001 From: monster860 Date: Sat, 14 May 2016 18:09:47 -0400 Subject: [PATCH 1/4] Adds permanent teleporter --- code/game/machinery/constructable_frame.dm | 11 ++++ code/game/machinery/teleporter.dm | 69 ++++++++++++++++++++++ 2 files changed, 80 insertions(+) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 6b13dbe95e3..4c820d26857 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -698,6 +698,17 @@ obj/item/weapon/circuitboard/rdserver /obj/item/weapon/stock_parts/capacitor = 2, /obj/item/weapon/stock_parts/console_screen = 1) +/obj/item/weapon/circuitboard/teleporter_perma + name = "circuit board (Permanent Teleporter)" + build_path = /obj/machinery/teleport/perma + board_type = "machine" + origin_tech = "programming=3;engineering=5;bluespace=5;materials=4" + frame_desc = "Requires 3 Bluespace Crystals and 1 Matter Bin." + req_components = list( + /obj/item/weapon/ore/bluespace_crystal = 3, + /obj/item/weapon/stock_parts/matter_bin = 1) + var/target + /obj/item/weapon/circuitboard/telesci_pad name = "Circuit board (Telepad)" build_path = /obj/machinery/telepad diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 6dd9954046b..4ab4ca1d27e 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -370,6 +370,70 @@ else icon_state = "tele0" +/obj/machinery/teleport/perma + name = "permanent teleporter" + desc = "A teleporter with the target pre-set on the circuit board." + icon_state = "tele0" + var/recalibrating = 0 + use_power = 1 + idle_power_usage = 10 + active_power_usage = 2000 + + var/target + var/tele_delay = 50 + +/obj/machinery/teleport/perma/RefreshParts() + for(var/obj/item/weapon/circuitboard/teleporter_perma/C in component_parts) + target = C.target + var/A = 40 + for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts) + A -= M.rating * 10 + tele_delay = max(A, 0) + update_icon() + +/obj/machinery/teleport/perma/Bumped(M as mob|obj) + if(stat & (BROKEN|NOPOWER)) + return + if(z == ZLEVEL_CENTCOMM) + to_chat(M, "You can't use this here.") + if(target && !recalibrating && !panel_open) + //--FalseIncarnate + //Prevents AI cores from using the teleporter, prints out failure messages for clarity + if(istype(M, /mob/living/silicon/ai) || istype(M, /obj/structure/AIcore)) + visible_message("\red The teleporter rejects the AI unit.") + if(istype(M, /mob/living/silicon/ai)) + var/mob/living/silicon/ai/T = M + var/list/TPError = list("\red Firmware instructions dictate you must remain on your assigned station!", + "\red You cannot interface with this technology and get rejected!", + "\red External firewalls prevent you from utilizing this machine!", + "\red Your AI core's anti-bluespace failsafes trigger and prevent teleportation!") + to_chat(T, "[pick(TPError)]") + return + else + do_teleport(M, target) + use_power(5000) + + if(tele_delay) + recalibrating = 1 + update_icon() + spawn(tele_delay) + recalibrating = 0 + update_icon() + //--FalseIncarnate + return + +/obj/machinery/teleport/perma/power_change() + ..() + update_icon() + +/obj/machinery/teleport/perma/update_icon() + if(panel_open) + icon_state = "tele-o" + else if(target && !recalibrating && !(stat & (BROKEN|NOPOWER))) + icon_state = "tele1" + else + icon_state = "tele0" + /obj/machinery/teleport/station name = "station" desc = "The power control station for a bluespace teleporter." @@ -457,6 +521,11 @@ link_console_and_hub() to_chat(user, "You reconnect the station to nearby machinery.") return + if(istype(W, /obj/item/weapon/circuitboard/teleporter_perma)) + var/obj/item/weapon/circuitboard/teleporter_perma/C = W + C.target = teleporter_console.target + to_chat(user, "You copy the targeting information from \the [src] to \the [W]") + return /obj/machinery/teleport/station/attack_ai() src.attack_hand() From be6c65efc375177369279e92f9639ea353d6b563 Mon Sep 17 00:00:00 2001 From: monster860 Date: Sat, 14 May 2016 18:10:08 -0400 Subject: [PATCH 2/4] adds it to rnd --- code/modules/research/designs/machine_designs.dm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm index d2da596b692..385969c3f3f 100644 --- a/code/modules/research/designs/machine_designs.dm +++ b/code/modules/research/designs/machine_designs.dm @@ -92,6 +92,16 @@ build_path = /obj/item/weapon/circuitboard/teleporter_station category = list ("Teleportation Machinery") +/datum/design/teleport_perma + name = "Machine Board (Permanent Teleporter)" + desc = "Allows for the construction of circuit boards used to build a Permanent Teleporter." + id = "tele_perma" + req_tech = list("programming" = 3, "bluespace" = 5, "materials" = 4, "engineering" = 5) + build_type = IMPRINTER + materials = list(MAT_GLASS = 1000, "sacid" = 20) + build_path = /obj/item/weapon/circuitboard/teleporter_perma + category = list ("Teleportation Machinery") + /datum/design/bodyscanner name = "Machine Board (Body Scanner)" desc = "Allows for the construction of circuit boards used to build a Body Scanner." From 63574226c6113a7602972ffa2f2cd95ec3129bbc Mon Sep 17 00:00:00 2001 From: monster860 Date: Sat, 14 May 2016 18:26:58 -0400 Subject: [PATCH 3/4] spans --- code/game/machinery/teleporter.dm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 4ab4ca1d27e..60924f4c4e3 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -323,13 +323,13 @@ //--FalseIncarnate //Prevents AI cores from using the teleporter, prints out failure messages for clarity if(istype(M, /mob/living/silicon/ai) || istype(M, /obj/structure/AIcore)) - visible_message("\red The teleporter rejects the AI unit.") + visible_message("The teleporter rejects the AI unit.") if(istype(M, /mob/living/silicon/ai)) var/mob/living/silicon/ai/T = M - var/list/TPError = list("\red Firmware instructions dictate you must remain on your assigned station!", - "\red You cannot interface with this technology and get rejected!", - "\red External firewalls prevent you from utilizing this machine!", - "\red Your AI core's anti-bluespace failsafes trigger and prevent teleportation!") + var/list/TPError = list("Firmware instructions dictate you must remain on your assigned station!", + "You cannot interface with this technology and get rejected!", + "External firewalls prevent you from utilizing this machine!", + "Your AI core's anti-bluespace failsafes trigger and prevent teleportation!") to_chat(T, "[pick(TPError)]") return else @@ -400,13 +400,13 @@ //--FalseIncarnate //Prevents AI cores from using the teleporter, prints out failure messages for clarity if(istype(M, /mob/living/silicon/ai) || istype(M, /obj/structure/AIcore)) - visible_message("\red The teleporter rejects the AI unit.") + visible_message("The teleporter rejects the AI unit.") if(istype(M, /mob/living/silicon/ai)) var/mob/living/silicon/ai/T = M - var/list/TPError = list("\red Firmware instructions dictate you must remain on your assigned station!", - "\red You cannot interface with this technology and get rejected!", - "\red External firewalls prevent you from utilizing this machine!", - "\red Your AI core's anti-bluespace failsafes trigger and prevent teleportation!") + var/list/TPError = list("Firmware instructions dictate you must remain on your assigned station!", + "You cannot interface with this technology and get rejected!", + "External firewalls prevent you from utilizing this machine!", + "Your AI core's anti-bluespace failsafes trigger and prevent teleportation!") to_chat(T, "[pick(TPError)]") return else From 3dcbe81b6b06d0c31898113516ecbee439ec3845 Mon Sep 17 00:00:00 2001 From: monster860 Date: Sat, 14 May 2016 18:45:44 -0400 Subject: [PATCH 4/4] adds return --- code/game/machinery/teleporter.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 60924f4c4e3..3052d5a28ce 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -319,6 +319,7 @@ /obj/machinery/teleport/hub/Bumped(M as mob|obj) if(z == ZLEVEL_CENTCOMM) to_chat(M, "You can't use this here.") + return if(power_station && power_station.engaged && !panel_open) //--FalseIncarnate //Prevents AI cores from using the teleporter, prints out failure messages for clarity @@ -396,6 +397,7 @@ return if(z == ZLEVEL_CENTCOMM) to_chat(M, "You can't use this here.") + return if(target && !recalibrating && !panel_open) //--FalseIncarnate //Prevents AI cores from using the teleporter, prints out failure messages for clarity