Adds more reasons to explosion logging (#28812)

* explos

* yeah good enough

* shorten that

* use ckey

* forgot this cause

* unfuck it
This commit is contained in:
Contrabang
2025-03-28 18:49:57 +00:00
committed by GitHub
parent c63dc53202
commit fde22d1c43
77 changed files with 120 additions and 117 deletions
@@ -120,7 +120,7 @@
for(var/mob/M in viewers(8, location))
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
explosion(location, devastation, heavy, light, flash)
explosion(location, devastation, heavy, light, flash, cause = "Reagents Explosion")
/datum/effect_system/reagents_explosion/proc/holder_damage(atom/holder)
if(holder)
+7 -7
View File
@@ -243,7 +243,7 @@ GLOBAL_LIST_INIT(meteors_gore, list(/obj/effect/meteor/meaty = 5, /obj/effect/me
/obj/effect/meteor/medium/meteor_effect()
..()
explosion(loc, 0, 1, 2, 3, 0)
explosion(loc, 0, 1, 2, 3, 0, cause = name)
//Large-sized
/obj/effect/meteor/big
@@ -255,7 +255,7 @@ GLOBAL_LIST_INIT(meteors_gore, list(/obj/effect/meteor/meaty = 5, /obj/effect/me
/obj/effect/meteor/big/meteor_effect()
..()
explosion(loc, 1, 2, 3, 4, 0)
explosion(loc, 1, 2, 3, 4, 0, cause = name)
//Flaming meteor
/obj/effect/meteor/flaming
@@ -268,7 +268,7 @@ GLOBAL_LIST_INIT(meteors_gore, list(/obj/effect/meteor/meaty = 5, /obj/effect/me
/obj/effect/meteor/flaming/meteor_effect()
..()
explosion(loc, 1, 2, 3, 4, 0, 0, 5)
explosion(loc, 1, 2, 3, 4, 0, 0, 5, cause = name)
//Radiation meteor
/obj/effect/meteor/irradiated
@@ -280,7 +280,7 @@ GLOBAL_LIST_INIT(meteors_gore, list(/obj/effect/meteor/meaty = 5, /obj/effect/me
/obj/effect/meteor/irradiated/meteor_effect()
..()
explosion(loc, 0, 0, 4, 3, 0)
explosion(loc, 0, 0, 4, 3, 0, cause = name)
new /obj/effect/decal/cleanable/greenglow(get_turf(src))
radiation_pulse(src, 20000, 7, ALPHA_RAD)
for(var/turf/target_turf in range(loc, 3))
@@ -296,7 +296,7 @@ GLOBAL_LIST_INIT(meteors_gore, list(/obj/effect/meteor/meaty = 5, /obj/effect/me
/obj/effect/meteor/bananium/meteor_effect()
..()
explosion(loc, 0, 0, 3, 2, 0)
explosion(loc, 0, 0, 3, 2, 0, cause = name)
var/turf/current_turf = get_turf(src)
new /obj/item/grown/bananapeel(current_turf)
for(var/obj/target in range(4, current_turf))
@@ -321,12 +321,12 @@ GLOBAL_LIST_INIT(meteors_gore, list(/obj/effect/meteor/meaty = 5, /obj/effect/me
/obj/effect/meteor/tunguska/meteor_effect()
..()
explosion(loc, 5, 10, 15, 20, 0)
explosion(loc, 5, 10, 15, 20, 0, cause = "[name]: End explosion")
/obj/effect/meteor/tunguska/Bump()
..()
if(prob(20))
explosion(loc, 2, 4, 6, 8)
explosion(loc, 2, 4, 6, 8, cause = "[name]: Bump explosion")
//Meaty Ore
/obj/effect/meteor/meaty
+2 -2
View File
@@ -51,7 +51,7 @@
var/range_flash = 3
/obj/effect/mine/explosive/mineEffect(mob/living/victim)
explosion(loc, range_devastation, range_heavy, range_light, range_flash)
explosion(loc, range_devastation, range_heavy, range_light, range_flash, cause = name)
/obj/effect/mine/stun
name = "stun mine"
@@ -68,7 +68,7 @@
var/area/syndicate_depot/core/depotarea = get_area(src)
if(istype(depotarea))
if(depotarea.mine_triggered(victim))
explosion(loc, 1, 0, 0, 1) // devastate the tile you are on, but leave everything else untouched
explosion(loc, 1, 0, 0, 1, cause = "depot sentry mine") // devastate the tile you are on, but leave everything else untouched
/obj/effect/mine/dnascramble
name = "Radiation Mine"
+3 -3
View File
@@ -8,7 +8,7 @@
#define FREQ_UPPER 40 //The upper limit for the randomly selected frequency.
#define FREQ_LOWER 25 //The lower of the above.
/proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, ignorecap = 0, flame_range = 0, silent = 0, smoke = 1, cause = null, breach = TRUE)
/proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, ignorecap = 0, flame_range = 0, silent = 0, smoke = 1, cause = "Unknown Cause!", breach = TRUE)
epicenter = get_turf(epicenter)
if(!epicenter)
return
@@ -49,8 +49,8 @@
var/list/cached_exp_block = list()
if(adminlog)
message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])" : ""] [ADMIN_COORDJMP(epicenter)] ")
log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])" : ""] [COORD(epicenter)] ")
message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] (Cause: [cause]) [ADMIN_COORDJMP(epicenter)] ")
log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] (Cause: [cause]) [COORD(epicenter)] ")
var/x0 = epicenter.x
var/y0 = epicenter.y
+1 -1
View File
@@ -147,7 +147,7 @@
if(power_drained >= max_power)
STOP_PROCESSING(SSobj, src)
explosion(src.loc, 4,8,16,32)
explosion(src.loc, 4,8,16,32, cause = "Powersink Explosion")
qdel(src)
#undef DISCONNECTED
+3 -3
View File
@@ -1111,11 +1111,11 @@
/obj/item/toy/plushie/borgplushie/item_interaction(mob/living/user, obj/item/used, list/modifiers)
if(!istype(used, /obj/item/borg/upgrade/reset))
return ..()
if(!plushie_module_selected)
to_chat(user, "<span class='warning'>[src] is already in standard mode!</span>")
return ITEM_INTERACT_COMPLETE
borg_plushie_overlay = "plushie_borgassist"
update_icon()
to_chat(user, "<span class='notice'>The fabric on [src] changes color, reverting it back to standard mode.</span>")
@@ -1232,7 +1232,7 @@
visible_message("<span class='danger'>[src] explodes!</span>")
if(grenade)
explosive_betrayal(grenade)
explosion(get_turf(src), -1, 0, 1, 1, flame_range = 1)
explosion(get_turf(src), -1, 0, 1, 1, flame_range = 1, cause = "Plasmaman plushie caught on fire")
if(!QDELETED(src))
qdel(src)
+1 -1
View File
@@ -702,7 +702,7 @@
* Called in `/obj/item/rcd/proc/detonate_pulse()` via callback.
*/
/obj/item/rcd/proc/detonate_pulse_explode()
explosion(src, 0, 0, 3, 1, flame_range = 1)
explosion(src, 0, 0, 3, 1, flame_range = 1, cause = "RCD Explosion")
qdel(src)
/obj/item/rcd/preloaded
@@ -40,7 +40,7 @@
if(!imp_in)
return
explosion(src, heavy, medium, weak, weak, flame_range = weak)
explosion(src, heavy, medium, weak, weak, flame_range = weak, cause = name)
// In case something happens to the implantee between now and the
// self-destruct
+1 -1
View File
@@ -54,7 +54,7 @@
if(C.m_intent != MOVE_INTENT_WALK)
visible_message("[src] beeps, \"Sign says walk, asshole.\"")
playsound(src, 'sound/misc/sign_says_walk.ogg', 40)
explosion(src.loc,-1,0,2)
explosion(src.loc,-1,0,2, cause = "Exploding wet floor sign")
if(ishuman(C))
dead_legs(C)
if(src)
+2 -2
View File
@@ -221,7 +221,7 @@
if(8)
//Fueltank Explosion
T.visible_message("<span class='userdanger'>An explosion bursts into existence around [user]!</span>")
explosion(get_turf(user), -1, 0, 2, flame_range = 2)
explosion(get_turf(user), -1, 0, 2, flame_range = 2, cause = "Die of fate: fuel tank explosion")
if(9)
//Cold
var/datum/disease/D = new /datum/disease/cold()
@@ -406,7 +406,7 @@
var/turf/epicenter = get_turf(src)
var/area/A = get_area(epicenter)
explosion(epicenter, round(result * 0.25), round(result * 0.5), round(result), round(result * 1.5), TRUE, capped)
explosion(epicenter, round(result * 0.25), round(result * 0.5), round(result), round(result * 1.5), TRUE, capped, cause = "E20 explosion")
investigate_log("E20 detonated at [A.name] ([epicenter.x],[epicenter.y],[epicenter.z]) with a roll of [actual_result]. Triggered by: [key_name(user)]", INVESTIGATE_BOMB)
log_game("E20 detonated at [A.name] ([epicenter.x],[epicenter.y],[epicenter.z]) with a roll of [actual_result]. Triggered by: [key_name(user)]")
add_attack_logs(user, src, "detonated with a roll of [actual_result]", ATKLOG_FEW)
@@ -203,7 +203,7 @@
if(location)
if(shaped && aim_dir)
location = get_step(get_step(location, aim_dir), aim_dir) //Move the explosion location two steps away from the target when using a shaped c4
explosion(location, ex_devastate, ex_heavy, ex_light, breach = ex_breach)
explosion(location, ex_devastate, ex_heavy, ex_light, breach = ex_breach, cause = name)
qdel(src)
@@ -13,7 +13,7 @@
/obj/item/grenade/frag/prime()
update_mob()
explosion(loc, 0, 1, DEFAULT_SHRAPNEL_RANGE, breach = FALSE)
explosion(loc, 0, 1, DEFAULT_SHRAPNEL_RANGE, cause = name, breach = FALSE)
create_shrapnel(loc, shrapnel_contained, shrapnel_type = embedded_type)
qdel(src)
@@ -63,5 +63,5 @@
/obj/item/grenade/iedcasing/prime() //Blowing that can up
update_mob()
explosion(loc, -1, -1, 2, flame_range = 4) // small explosion, plus a very large fireball.
explosion(loc, -1, -1, 2, flame_range = 4, cause = "IED grenade") // small explosion, plus a very large fireball.
qdel(src)
@@ -5,14 +5,16 @@
icon_state = "syndicate"
item_state = "grenade"
origin_tech = "materials=3;magnets=4;syndicate=3"
var/explosion_cause = "Syndicate minibomb"
/obj/item/grenade/syndieminibomb/prime()
update_mob()
explosion(loc, 1, 2, 4, flame_range = 2)
explosion(loc, 1, 2, 4, flame_range = 2, cause = explosion_cause)
qdel(src)
/obj/item/grenade/syndieminibomb/fake
origin_tech = "materials=3;magnets=4;syndicate=1" // no clown, this bomb not exactly the same
explosion_cause = "Trick Syndicate minibomb"
/obj/item/grenade/syndieminibomb/fake/examine(mob/user)
. = ..()
@@ -32,6 +34,7 @@
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "pen"
item_state = "pen"
explosion_cause = "Syndicate minibomb (disguised as a black pen)"
/obj/item/grenade/syndieminibomb/pen/attack_self__legacy__attackchain(mob/user)
if(!active)
@@ -91,7 +91,7 @@
/obj/item/storage/backpack/holding/singularity_act(current_size)
var/dist = max((current_size - 2), 1)
explosion(loc, dist, (dist * 2), (dist * 4))
explosion(loc, dist, (dist * 2), (dist * 4), cause = "Bag of Holding (singularity_act)")
/obj/item/storage/backpack/santabag
name = "Santa's Gift Bag"
@@ -250,7 +250,7 @@
// to_chat(world, "<span class='notice'>Exploding Pressure: [pressure] kPa, intensity: [range]</span>")
explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5))
explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5), cause = "Exploding tank rupture")
if(istype(loc,/obj/item/transfer_valve))
qdel(loc)
else
@@ -205,7 +205,7 @@
add_attack_logs(user, src, "has detonated", ATKLOG_MOST)
for(var/atom/movable/AM in src)
qdel(AM)
explosion(get_turf(src), 0, 1, 5, 5)
explosion(get_turf(src), 0, 1, 5, 5, cause = "Tamper-proof secure crate")
qdel(src)
/obj/structure/closet/crate/secure/can_open()
@@ -113,7 +113,7 @@
M.gib()
for(var/obj/mecha/E in range(30, T))
E.take_damage(E.max_integrity)
explosion(get_turf(src), 25, 35, 45, 55, 1, 1, 60, 0)
explosion(get_turf(src), 25, 35, 45, 55, 1, 1, 60, 0, cause = "Depot Explosion")
STOP_PROCESSING(SSobj, src)
qdel(src)
@@ -124,7 +124,7 @@
/obj/machinery/grey_autocloner/proc/messy_explode()
if(occupant)
occupant.forceMove(get_turf(src))
explosion(get_turf(src), 1, 2, 4, flame_range = 2)
explosion(get_turf(src), 1, 2, 4, flame_range = 2, cause = "Grey Autocloner Self-destruct")
qdel(src)
/obj/machinery/grey_autocloner/deconstruct(disassembled)