From cf10da20c845e7b25597744727e7bd09232a7794 Mon Sep 17 00:00:00 2001 From: ToasterBiome Date: Sun, 5 Jun 2022 04:54:48 -0500 Subject: [PATCH 1/5] adds it --- .../mining/equipment/mining_charges.dm | 46 ++++++++++++++++++- code/modules/uplink/uplink_items.dm | 9 ++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/code/modules/mining/equipment/mining_charges.dm b/code/modules/mining/equipment/mining_charges.dm index f5a6b668b978..4e817877e3f6 100644 --- a/code/modules/mining/equipment/mining_charges.dm +++ b/code/modules/mining/equipment/mining_charges.dm @@ -5,22 +5,35 @@ det_time = 5 //uses real world seconds cause screw you i guess boom_sizes = list(1,3,5) alert_admins = FALSE + var/hacked = FALSE /obj/item/grenade/plastic/miningcharge/Initialize() . = ..() plastic_overlay = mutable_appearance(icon, "[icon_state]_active", ON_EDGED_TURF_LAYER) +/obj/item/grenade/plastic/miningcharge/examine(mob/user) + . = ..() + if(hacked) + . += "Its wiring is haphazardly changed." + + + /obj/item/grenade/plastic/miningcharge/attack_self(mob/user) if(nadeassembly) nadeassembly.attack_self(user) /obj/item/grenade/plastic/miningcharge/afterattack(atom/movable/AM, mob/user, flag, notify_ghosts = FALSE) - if(ismineralturf(AM)) + if(ismineralturf(AM) || hacked) ..() else to_chat(user,span_warning("The charge only works on rocks!")) /obj/item/grenade/plastic/miningcharge/prime() + if(hacked) //big boom override + var/turf/location = get_turf(target) + explosion(location, boom_sizes[1], boom_sizes[2], boom_sizes[3]) + qdel(src) + return //don't know if this is needed... var/turf/closed/mineral/location = get_turf(target) location.attempt_drill(null,TRUE,3) //orange says it doesnt include the actual middle for(var/turf/closed/mineral/rock in circlerangeturfs(location,boom_sizes[3])) @@ -43,3 +56,34 @@ /obj/item/grenade/plastic/miningcharge/deconstruct(disassembled = TRUE) //no gibbing a miner with pda bombs if(!QDELETED(src)) qdel(src) + +/obj/item/grenade/plastic/miningcharge/proc/override_safety() + hacked = TRUE + boom_sizes[1] = max(boom_sizes[1]/2, 1) //sorry, too powerful otherwise. + boom_sizes[2] = max(boom_sizes[2]/2, 1) + boom_sizes[3] = max(boom_sizes[3]/2, 1) + + +//MINING CHARGE HACKER +/obj/item/t_scanner/adv_mining_scanner/syndicate + +/obj/item/t_scanner/adv_mining_scanner/syndicate/examine(mob/user) + . = ..() + if(is_syndicate(user)) //helpful to other syndicates + . += "This scanner has an extra port for overriding mining charge safeties." + +/obj/item/t_scanner/adv_mining_scanner/syndicate/afterattack(atom/target, mob/user, proximity_flag, click_parameters) + if(!is_syndicate(user)) + . = ..() //just a normal scanner... + return + if(istype(target,/obj/item/grenade/plastic/miningcharge)) + var/obj/item/grenade/plastic/miningcharge/charge = target + if(charge.hacked) + to_chat(span_notice("[src] is already overridden!")) + return + charge.override_safety() + visible_message(span_warning("Sparks fly out of [src]!"), span_notice("You override [src], disabling its safeties.")) + playsound(src, "sparks", 50, 1) + + + diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 14ab23d692cc..1ea215e40a84 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -2145,6 +2145,15 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) item = /obj/item/hierophant_antenna restricted_roles = list("Shaft Miner") +/datum/uplink_item/role_restricted/mining_charge_hacker + name = "Mining Charge Hacker" + desc = "Looks and functions like an advanced mining scanner, but allows mining charges to be placed anywhere and destroy more than rocks. \ + Use it on a mining charge to override its safeties. Reduces explosive power of mining charges due to the modification of their internals." + cost = 6 + manufacturer = /datum/corporation/traitor/cybersun + item = /obj/item/t_scanner/adv_mining_scanner/syndicate + restricted_roles = list("Shaft Miner","Quartermaster","Mining Medic") + // Pointless /datum/uplink_item/badass category = "(Pointless) Badassery" From 4851da416c6b272941a76a651374f08df80d190f Mon Sep 17 00:00:00 2001 From: ToasterBiome Date: Sun, 5 Jun 2022 05:01:57 -0500 Subject: [PATCH 2/5] Update mining_charges.dm --- code/modules/mining/equipment/mining_charges.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/mining/equipment/mining_charges.dm b/code/modules/mining/equipment/mining_charges.dm index 4e817877e3f6..f1b46208f097 100644 --- a/code/modules/mining/equipment/mining_charges.dm +++ b/code/modules/mining/equipment/mining_charges.dm @@ -59,9 +59,10 @@ /obj/item/grenade/plastic/miningcharge/proc/override_safety() hacked = TRUE - boom_sizes[1] = max(boom_sizes[1]/2, 1) //sorry, too powerful otherwise. - boom_sizes[2] = max(boom_sizes[2]/2, 1) - boom_sizes[3] = max(boom_sizes[3]/2, 1) + boom_sizes[1] = max(boom_sizes[1]/3, 1) //sorry, too powerful otherwise. + boom_sizes[2] = max(boom_sizes[2]/3, 1) + boom_sizes[3] = max(boom_sizes[3]/3, 1) + alert_admins = TRUE //i'm telling teacher you're gibbing clown! //MINING CHARGE HACKER From 53892874efba2743a29d32785ef97e28deb351ba Mon Sep 17 00:00:00 2001 From: ToasterBiome Date: Sun, 5 Jun 2022 05:04:40 -0500 Subject: [PATCH 3/5] Update mining_charges.dm --- code/modules/mining/equipment/mining_charges.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/modules/mining/equipment/mining_charges.dm b/code/modules/mining/equipment/mining_charges.dm index f1b46208f097..370d6afa9d1e 100644 --- a/code/modules/mining/equipment/mining_charges.dm +++ b/code/modules/mining/equipment/mining_charges.dm @@ -67,6 +67,7 @@ //MINING CHARGE HACKER /obj/item/t_scanner/adv_mining_scanner/syndicate + var/charges = 6 /obj/item/t_scanner/adv_mining_scanner/syndicate/examine(mob/user) . = ..() @@ -82,9 +83,15 @@ if(charge.hacked) to_chat(span_notice("[src] is already overridden!")) return + if(charges <= 0) + to_chat(span_notice("Its overriding function is depleted.")) + return charge.override_safety() visible_message(span_warning("Sparks fly out of [src]!"), span_notice("You override [src], disabling its safeties.")) playsound(src, "sparks", 50, 1) + charges-- + if(charges <= 0) + to_chat(span_warning("[src]'s internal battery for overriding mining charges has run dry!")) From 32ee090e2167c916e936708a60187262b99d66c6 Mon Sep 17 00:00:00 2001 From: ToasterBiome Date: Sun, 5 Jun 2022 05:07:45 -0500 Subject: [PATCH 4/5] what if 4 tc --- code/modules/uplink/uplink_items.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 1ea215e40a84..6d5eb13bf00b 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -2149,7 +2149,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) name = "Mining Charge Hacker" desc = "Looks and functions like an advanced mining scanner, but allows mining charges to be placed anywhere and destroy more than rocks. \ Use it on a mining charge to override its safeties. Reduces explosive power of mining charges due to the modification of their internals." - cost = 6 + cost = 4 manufacturer = /datum/corporation/traitor/cybersun item = /obj/item/t_scanner/adv_mining_scanner/syndicate restricted_roles = list("Shaft Miner","Quartermaster","Mining Medic") From 51f4bb51181711e2f62f4d4dbc4ad4aaa5183c8f Mon Sep 17 00:00:00 2001 From: Jamie D <993128+JamieD1@users.noreply.github.com> Date: Sat, 11 Jun 2022 15:12:42 +0100 Subject: [PATCH 5/5] Apply suggestions from code review --- code/modules/mining/equipment/mining_charges.dm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/code/modules/mining/equipment/mining_charges.dm b/code/modules/mining/equipment/mining_charges.dm index 370d6afa9d1e..1dda7f2b10c9 100644 --- a/code/modules/mining/equipment/mining_charges.dm +++ b/code/modules/mining/equipment/mining_charges.dm @@ -16,8 +16,6 @@ if(hacked) . += "Its wiring is haphazardly changed." - - /obj/item/grenade/plastic/miningcharge/attack_self(mob/user) if(nadeassembly) nadeassembly.attack_self(user) @@ -64,7 +62,6 @@ boom_sizes[3] = max(boom_sizes[3]/3, 1) alert_admins = TRUE //i'm telling teacher you're gibbing clown! - //MINING CHARGE HACKER /obj/item/t_scanner/adv_mining_scanner/syndicate var/charges = 6 @@ -93,5 +90,3 @@ if(charges <= 0) to_chat(span_warning("[src]'s internal battery for overriding mining charges has run dry!")) - -