From 3e9456125ad411647e59dff441215d55e3c461df Mon Sep 17 00:00:00 2001 From: Heroman Date: Thu, 15 Aug 2019 20:12:59 +1000 Subject: [PATCH 1/3] Restricts friendly manhack grenades to offstation use --- .../weapons/grenades/spawnergrenade_vr.dm | 30 +++++++++++++++++++ vorestation.dme | 1 + 2 files changed, 31 insertions(+) create mode 100644 code/game/objects/items/weapons/grenades/spawnergrenade_vr.dm diff --git a/code/game/objects/items/weapons/grenades/spawnergrenade_vr.dm b/code/game/objects/items/weapons/grenades/spawnergrenade_vr.dm new file mode 100644 index 0000000000..f6e3301d4b --- /dev/null +++ b/code/game/objects/items/weapons/grenades/spawnergrenade_vr.dm @@ -0,0 +1,30 @@ +/obj/item/weapon/grenade/spawnergrenade/manhacks/station/locked + desc = "It is set to detonate in 5 seconds. It will deploy three weaponized survey drones. This one has a safety interlock that self-destructs if used while in proximity to the facility." + req_access = list(access_armory) //for toggling safety + var/locked = 1 + +/obj/item/weapon/grenade/spawnergrenade/manhacks/station/locked/detonate() + if(locked) + var/turf/T = get_turf(src) + if(T.z in using_map.map_levels) + visible_message("\The [src] lets out a loud negative beep and instead of releasing the robots, implodes on itself.") + qdel(src) + return 0 + return ..() + +/obj/item/weapon/grenade/spawnergrenade/manhacks/station/locked/attackby(obj/item/I, mob/user) + var/obj/item/weapon/card/id/id = I.GetID() + if(istype(id)) + if(check_access(id)) + locked = !locked + to_chat(user, "You [locked ? "enable" : "disable"] the safety lock on \the [src].") + else + to_chat(user, "Access denied.") + user.visible_message("[user] swipes \the [I] against \the [src].") + else + return ..() + +/obj/item/weapon/grenade/spawnergrenade/manhacks/station/locked/emag_act(var/remaining_charges,var/mob/user) + ..() + locked = !locked + to_chat(user, "You [locked ? "enable" : "disable"] the safety lock on \the [src]!") \ No newline at end of file diff --git a/vorestation.dme b/vorestation.dme index 1dbc976d6c..77b0866961 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1117,6 +1117,7 @@ #include "code\game\objects\items\weapons\grenades\projectile.dm" #include "code\game\objects\items\weapons\grenades\smokebomb.dm" #include "code\game\objects\items\weapons\grenades\spawnergrenade.dm" +#include "code\game\objects\items\weapons\grenades\spawnergrenade_vr.dm" #include "code\game\objects\items\weapons\grenades\supermatter.dm" #include "code\game\objects\items\weapons\id cards\cards.dm" #include "code\game\objects\items\weapons\id cards\station_ids.dm" From e0138738f476de79258068c16dda35fc86679faf Mon Sep 17 00:00:00 2001 From: Heroman Date: Sat, 17 Aug 2019 12:35:44 +1000 Subject: [PATCH 2/3] Limits new equipment properly --- .../game/objects/items/weapons/explosives_vr.dm | 17 +++++++++++++++++ .../items/weapons/grenades/spawnergrenade_vr.dm | 6 +++--- .../catalogue/rewards/equipment_vendor.dm | 2 +- .../ore_redemption_machine/equipment_vendor.dm | 4 ++-- vorestation.dme | 1 + 5 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 code/game/objects/items/weapons/explosives_vr.dm diff --git a/code/game/objects/items/weapons/explosives_vr.dm b/code/game/objects/items/weapons/explosives_vr.dm new file mode 100644 index 0000000000..939ff65406 --- /dev/null +++ b/code/game/objects/items/weapons/explosives_vr.dm @@ -0,0 +1,17 @@ +/obj/item/weapon/plastique/seismic/locked + desc = "Used to dig holes in specific areas without too much extra hole. Has extra mechanism that safely implodes the bomb if its used in close proximity to the facility." + +/obj/item/weapon/plastique/seismic/locked/explode(var/location) + if(!target) + target = get_atom_on_turf(src) + if(!target) + target = src + + var/turf/T = get_turf(target) + if(T.z in using_map.map_levels) + target.visible_message("\The [src] lets out a loud beep as safeties trigger, before imploding and falling apart.") + target.overlays -= image_overlay + qdel(src) + return 0 + else + return ..() \ No newline at end of file diff --git a/code/game/objects/items/weapons/grenades/spawnergrenade_vr.dm b/code/game/objects/items/weapons/grenades/spawnergrenade_vr.dm index f6e3301d4b..56204be984 100644 --- a/code/game/objects/items/weapons/grenades/spawnergrenade_vr.dm +++ b/code/game/objects/items/weapons/grenades/spawnergrenade_vr.dm @@ -1,5 +1,5 @@ /obj/item/weapon/grenade/spawnergrenade/manhacks/station/locked - desc = "It is set to detonate in 5 seconds. It will deploy three weaponized survey drones. This one has a safety interlock that self-destructs if used while in proximity to the facility." + desc = "It is set to detonate in 5 seconds. It will deploy three weaponized survey drones. This one has a safety interlock that prevents release if used while in proximity to the facility." req_access = list(access_armory) //for toggling safety var/locked = 1 @@ -7,8 +7,8 @@ if(locked) var/turf/T = get_turf(src) if(T.z in using_map.map_levels) - visible_message("\The [src] lets out a loud negative beep and instead of releasing the robots, implodes on itself.") - qdel(src) + icon_state = initial(icon_state) + active = 0 return 0 return ..() diff --git a/code/modules/catalogue/rewards/equipment_vendor.dm b/code/modules/catalogue/rewards/equipment_vendor.dm index 96b636b8be..6260f014f0 100644 --- a/code/modules/catalogue/rewards/equipment_vendor.dm +++ b/code/modules/catalogue/rewards/equipment_vendor.dm @@ -36,7 +36,7 @@ new /datum/data/exploration_equipment("Jump Boots", /obj/item/clothing/shoes/bhop, 250), new /datum/data/exploration_equipment("Luxury Shelter Capsule", /obj/item/device/survivalcapsule/luxury, 310), new /datum/data/exploration_equipment("Defense Equipment - Smoke Bomb",/obj/item/weapon/grenade/smokebomb, 10), - new /datum/data/exploration_equipment("Defense Equipment - Razor Drone Deployer",/obj/item/weapon/grenade/spawnergrenade/manhacks/station, 100), + new /datum/data/exploration_equipment("Defense Equipment - Razor Drone Deployer",/obj/item/weapon/grenade/spawnergrenade/manhacks/station/locked, 100), new /datum/data/exploration_equipment("Defense Equipment - Sentry Drone Deployer",/obj/item/weapon/grenade/spawnergrenade/ward, 150), new /datum/data/exploration_equipment("Fishing Net", /obj/item/weapon/material/fishing_net, 50), new /datum/data/exploration_equipment("Titanium Fishing Rod", /obj/item/weapon/material/fishing_rod/modern, 100), diff --git a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm index bf4ef87738..eee528a45a 100644 --- a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm +++ b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm @@ -66,14 +66,14 @@ new /datum/data/mining_equipment("Fine Excavation Kit - Chisels",/obj/item/weapon/storage/excavation, 500), new /datum/data/mining_equipment("Fine Excavation Kit - Measuring Tape",/obj/item/device/measuring_tape, 125), new /datum/data/mining_equipment("Fine Excavation Kit - Hand Pick",/obj/item/weapon/pickaxe/hand, 375), - new /datum/data/mining_equipment("Explosive Excavation Kit - Plastic Charge",/obj/item/weapon/plastique/seismic, 750), + new /datum/data/mining_equipment("Explosive Excavation Kit - Plastic Charge",/obj/item/weapon/plastique/seismic/locked, 750), new /datum/data/mining_equipment("Injector (L) - Glucose",/obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/glucose, 500), new /datum/data/mining_equipment("Injector (L) - Panacea",/obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/purity, 500), new /datum/data/mining_equipment("Injector (L) - Trauma",/obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/brute, 500), new /datum/data/mining_equipment("Nanopaste Tube", /obj/item/stack/nanopaste, 1000), new /datum/data/mining_equipment("Misc: Graviton Visor", /obj/item/clothing/glasses/graviton, 1500), new /datum/data/mining_equipment("Defense Equipment - Smoke Bomb",/obj/item/weapon/grenade/smokebomb, 100), - new /datum/data/mining_equipment("Defense Equipment - Razor Drone Deployer",/obj/item/weapon/grenade/spawnergrenade/manhacks/station, 1000), + new /datum/data/mining_equipment("Defense Equipment - Razor Drone Deployer",/obj/item/weapon/grenade/spawnergrenade/manhacks/station/locked, 1000), new /datum/data/mining_equipment("Defense Equipment - Sentry Drone Deployer",/obj/item/weapon/grenade/spawnergrenade/ward, 1500), new /datum/data/mining_equipment("Defense Equipment - Plasteel Machete", /obj/item/weapon/material/knife/machete, 500), new /datum/data/mining_equipment("Fishing Net", /obj/item/weapon/material/fishing_net, 500), diff --git a/vorestation.dme b/vorestation.dme index 77b0866961..fe4d1b6bcb 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1051,6 +1051,7 @@ #include "code\game\objects\items\weapons\cosmetics.dm" #include "code\game\objects\items\weapons\dna_injector.dm" #include "code\game\objects\items\weapons\explosives.dm" +#include "code\game\objects\items\weapons\explosives_vr.dm" #include "code\game\objects\items\weapons\extinguisher.dm" #include "code\game\objects\items\weapons\flamethrower.dm" #include "code\game\objects\items\weapons\gift_wrappaper.dm" From 4b0cc1810e1f38ee3eda77939e149e4922fcc8a1 Mon Sep 17 00:00:00 2001 From: Heroman Date: Sun, 18 Aug 2019 05:34:13 +1000 Subject: [PATCH 3/3] Fixes a typo --- code/game/objects/items/weapons/explosives_vr.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/explosives_vr.dm b/code/game/objects/items/weapons/explosives_vr.dm index 939ff65406..a82ca02bbc 100644 --- a/code/game/objects/items/weapons/explosives_vr.dm +++ b/code/game/objects/items/weapons/explosives_vr.dm @@ -1,5 +1,5 @@ /obj/item/weapon/plastique/seismic/locked - desc = "Used to dig holes in specific areas without too much extra hole. Has extra mechanism that safely implodes the bomb if its used in close proximity to the facility." + desc = "Used to dig holes in specific areas without too much extra hole. Has extra mechanism that safely implodes the bomb if it is used in close proximity to the facility." /obj/item/weapon/plastique/seismic/locked/explode(var/location) if(!target)