From 5dbfc9a5146873185ff64991978d85c99341bbdd Mon Sep 17 00:00:00 2001 From: TrilbySpaceClone Date: Sat, 8 Feb 2020 03:25:09 -0500 Subject: [PATCH 1/4] Yay --- code/modules/projectiles/pins.dm | 16 +++++++++++++--- code/modules/research/designs/weapon_designs.dm | 10 ++++++++++ code/modules/research/techweb/all_nodes.dm | 2 +- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index 0465a611cd..a99a3bf45d 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -69,13 +69,10 @@ if(gun) qdel(gun) - - /obj/item/firing_pin/magic name = "magic crystal shard" desc = "A small enchanted shard which allows magical weapons to fire." - // Test pin, works only near firing range. /obj/item/firing_pin/test_range name = "test-range firing pin" @@ -229,3 +226,16 @@ if(gun) gun.pin = null return ..() + +//Station Locked + +/obj/item/firing_pin/away + name = "station locked pin" + desc = "A firing pin that only will fire when off the station." + +/obj/item/firing_pin/away/pin_auth(mob/living/user) + var/station_zlevel = get_area(src) + if(station_zlevel in GLOB.the_station_areas) + to_chat(user, "The pin beeps, refusing to fire.") + return FALSE + return TRUE diff --git a/code/modules/research/designs/weapon_designs.dm b/code/modules/research/designs/weapon_designs.dm index 1d65edbe9a..467679fea6 100644 --- a/code/modules/research/designs/weapon_designs.dm +++ b/code/modules/research/designs/weapon_designs.dm @@ -225,6 +225,16 @@ category = list("Firing Pins") departmental_flags = DEPARTMENTAL_FLAG_SECURITY +/datum/design/pin_away + name = "Station Locked Pin" + desc = "This is a security firing pin which only authorizes users who are off station." + id = "pin_away" + build_type = PROTOLATHE + materials = list(MAT_METAL = 1500, MAT_GLASS = 2000) + build_path = /obj/item/firing_pin/away + category = list("Firing Pins") + departmental_flags = DEPARTMENTAL_FLAG_SECURITY + ////////////// //Guns//////// ////////////// diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index e1abfedde6..acc278d3e6 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -666,7 +666,7 @@ display_name = "Weapon Development Technology" description = "Our researchers have found new to weaponize just about everything now." prereq_ids = list("engineering") - design_ids = list("pin_testing", "tele_shield", "lasercarbine") + design_ids = list("pin_testing", "tele_shield", "lasercarbine", "pin_away") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 7500) export_price = 5000 From 612b5c5da353646261e7cb84e59a99762b97c150 Mon Sep 17 00:00:00 2001 From: TrilbySpaceClone Date: Sat, 8 Feb 2020 03:27:43 -0500 Subject: [PATCH 2/4] better name --- code/modules/projectiles/pins.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index a99a3bf45d..0a27eb31ed 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -234,8 +234,8 @@ desc = "A firing pin that only will fire when off the station." /obj/item/firing_pin/away/pin_auth(mob/living/user) - var/station_zlevel = get_area(src) - if(station_zlevel in GLOB.the_station_areas) + var/station_area = get_area(src) + if(station_area in GLOB.the_station_areas) to_chat(user, "The pin beeps, refusing to fire.") return FALSE return TRUE From a4a128f9dd89e731976fe23c6e5ebfd1881ccfe4 Mon Sep 17 00:00:00 2001 From: Trilbyspaceclone <30435998+Trilbyspaceclone@users.noreply.github.com> Date: Tue, 11 Feb 2020 15:55:54 -0500 Subject: [PATCH 3/4] Ok? Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/modules/projectiles/pins.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index 0a27eb31ed..e1f50b708f 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -235,7 +235,7 @@ /obj/item/firing_pin/away/pin_auth(mob/living/user) var/station_area = get_area(src) - if(station_area in GLOB.the_station_areas) + if(!station_area || is_station_level(station_area.z)) to_chat(user, "The pin beeps, refusing to fire.") return FALSE return TRUE From 49a765740420e0db0b3265305f571d4daa65883d Mon Sep 17 00:00:00 2001 From: Trilbyspaceclone <30435998+Trilbyspaceclone@users.noreply.github.com> Date: Wed, 12 Feb 2020 14:26:29 -0500 Subject: [PATCH 4/4] Correction Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/modules/projectiles/pins.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index e1f50b708f..70551d07b6 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -234,7 +234,7 @@ desc = "A firing pin that only will fire when off the station." /obj/item/firing_pin/away/pin_auth(mob/living/user) - var/station_area = get_area(src) + var/area/station_area = get_area(src) if(!station_area || is_station_level(station_area.z)) to_chat(user, "The pin beeps, refusing to fire.") return FALSE