From 7c3926a0629fd63873fb97f0aff40c784df64294 Mon Sep 17 00:00:00 2001 From: iloveloopers <140007537+iloveloopers@users.noreply.github.com> Date: Sun, 5 May 2024 17:51:15 -0400 Subject: [PATCH 1/6] Update mortar_shells.dm --- .../equipment/mortar/mortar_shells.dm | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm index 45b3a6859d4a..eae2c6a15694 100644 --- a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm +++ b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm @@ -8,6 +8,8 @@ var/datum/cause_data/cause_data ground_offset_x = 7 ground_offset_y = 6 + /// is it currently on fire and about to explode? + var/burning = FALSE /obj/item/mortar_shell/Destroy() @@ -154,6 +156,31 @@ icon_state = initial(icon_state) +"_unlocked" playsound(loc, 'sound/items/Screwdriver2.ogg', 25, 0, 6) +/obj/item/mortar_shell/attack_hand(mob/user) + if(burning) + to_chat(user, SPAN_DANGER("\The [src] is on fire and might explode!")) + return + return ..() + +/obj/item/mortar_shell/flamer_fire_act(dam, datum/cause_data/flame_cause_data) + if(burning) + return + burning = TRUE + cause_data = flame_cause_data + handle_fire() + +/obj/item/mortar_shell/proc/handle_fire() + visible_message(SPAN_WARNING("\The [src] catches on fire and starts cooking off! It's gonna blow!")) + anchored = TRUE // don't want other explosions launching it elsewhere + + var/datum/effect_system/spark_spread/sparks = new() + sparks.set_up(n = 10, loca = loc) + sparks.start() + new /obj/effect/warning/explosive(loc, 5 SECONDS) + + addtimer(CALLBACK(src, PROC_REF(detonate), loc), 5 SECONDS) + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (src)), 5.1 SECONDS) + /obj/structure/closet/crate/secure/mortar_ammo name = "\improper M402 mortar ammo crate" desc = "A crate containing live mortar shells with various payloads. DO NOT DROP. KEEP AWAY FROM FIRE SOURCES." From 22e35ca812931d93912f23e9fb0ac222619f5999 Mon Sep 17 00:00:00 2001 From: iloveloopers <140007537+iloveloopers@users.noreply.github.com> Date: Sun, 5 May 2024 18:09:04 -0400 Subject: [PATCH 2/6] Update mortar_shells.dm --- code/modules/cm_marines/equipment/mortar/mortar_shells.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm index eae2c6a15694..215f1495ebe0 100644 --- a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm +++ b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm @@ -166,7 +166,7 @@ if(burning) return burning = TRUE - cause_data = flame_cause_data + cause_data = create_cause_data("Burning Mortar Shell", flame_cause_data.resolve_mob(), src) handle_fire() /obj/item/mortar_shell/proc/handle_fire() From 8bc26978fdf657994f8289d9b7280caf90bc4f2c Mon Sep 17 00:00:00 2001 From: iloveloopers <140007537+iloveloopers@users.noreply.github.com> Date: Sat, 11 May 2024 13:45:38 -0400 Subject: [PATCH 3/6] Update mortar_shells.dm --- code/modules/cm_marines/equipment/mortar/mortar_shells.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm index 215f1495ebe0..ef63baa254d8 100644 --- a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm +++ b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm @@ -172,6 +172,7 @@ /obj/item/mortar_shell/proc/handle_fire() visible_message(SPAN_WARNING("\The [src] catches on fire and starts cooking off! It's gonna blow!")) anchored = TRUE // don't want other explosions launching it elsewhere + indestructible = TRUE // thou shall not runtime var/datum/effect_system/spark_spread/sparks = new() sparks.set_up(n = 10, loca = loc) From 0c1405a03a4c3e87361e3bd855daa7158d817cbc Mon Sep 17 00:00:00 2001 From: iloveloopers <140007537+iloveloopers@users.noreply.github.com> Date: Sat, 11 May 2024 14:29:43 -0400 Subject: [PATCH 4/6] Update mortar_shells.dm --- code/modules/cm_marines/equipment/mortar/mortar_shells.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm index ef63baa254d8..34f02ee709f3 100644 --- a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm +++ b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm @@ -156,6 +156,10 @@ icon_state = initial(icon_state) +"_unlocked" playsound(loc, 'sound/items/Screwdriver2.ogg', 25, 0, 6) +/obj/item/mortar_shell/ex_act(severity, explosion_direction) + if(!burning) + return ..() + /obj/item/mortar_shell/attack_hand(mob/user) if(burning) to_chat(user, SPAN_DANGER("\The [src] is on fire and might explode!")) @@ -172,7 +176,6 @@ /obj/item/mortar_shell/proc/handle_fire() visible_message(SPAN_WARNING("\The [src] catches on fire and starts cooking off! It's gonna blow!")) anchored = TRUE // don't want other explosions launching it elsewhere - indestructible = TRUE // thou shall not runtime var/datum/effect_system/spark_spread/sparks = new() sparks.set_up(n = 10, loca = loc) From 9ed2ee316ebb0ef0ffa59596a392d41f90b6de9c Mon Sep 17 00:00:00 2001 From: iloveloopers <140007537+iloveloopers@users.noreply.github.com> Date: Sat, 11 May 2024 14:33:03 -0400 Subject: [PATCH 5/6] Update mortar_shells.dm --- code/modules/cm_marines/equipment/mortar/mortar_shells.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm index 34f02ee709f3..420b98f80b76 100644 --- a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm +++ b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm @@ -183,7 +183,7 @@ new /obj/effect/warning/explosive(loc, 5 SECONDS) addtimer(CALLBACK(src, PROC_REF(detonate), loc), 5 SECONDS) - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (src)), 5.1 SECONDS) + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (src)), 5.5 SECONDS) /obj/structure/closet/crate/secure/mortar_ammo name = "\improper M402 mortar ammo crate" From 8884482cac5e211f0c5c7c7e1a924aedfe4c0369 Mon Sep 17 00:00:00 2001 From: Drathek <76988376+Drulikar@users.noreply.github.com> Date: Sun, 12 May 2024 19:30:07 -0700 Subject: [PATCH 6/6] Apply suggestions from code review --- code/modules/cm_marines/equipment/mortar/mortar_shells.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm index 420b98f80b76..dae0910cc9b4 100644 --- a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm +++ b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm @@ -162,7 +162,7 @@ /obj/item/mortar_shell/attack_hand(mob/user) if(burning) - to_chat(user, SPAN_DANGER("\The [src] is on fire and might explode!")) + to_chat(user, SPAN_DANGER("[src] is on fire and might explode!")) return return ..() @@ -174,7 +174,7 @@ handle_fire() /obj/item/mortar_shell/proc/handle_fire() - visible_message(SPAN_WARNING("\The [src] catches on fire and starts cooking off! It's gonna blow!")) + visible_message(SPAN_WARNING("[src] catches on fire and starts cooking off! It's gonna blow!")) anchored = TRUE // don't want other explosions launching it elsewhere var/datum/effect_system/spark_spread/sparks = new()