Skip to content

Commit

Permalink
Adds logging to nearly all player deaths, gibs, suicides and dusts. P…
Browse files Browse the repository at this point in the history
…orts INVESTIGATE_DEATHS (#9991)

* tgstation/tgstation#71112

* requested changes

* oops
  • Loading branch information
Tsar-Salat authored Oct 20, 2023
1 parent 59e525c commit cc4e426
Show file tree
Hide file tree
Showing 166 changed files with 454 additions and 335 deletions.
35 changes: 18 additions & 17 deletions code/__DEFINES/logging.dm
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
//Investigate logging defines
#define INVESTIGATE_ATMOS "atmos"
#define INVESTIGATE_BOTANY "botany"
#define INVESTIGATE_CARGO "cargo"
#define INVESTIGATE_EXPERIMENTOR "experimentor"
#define INVESTIGATE_GRAVITY "gravity"
#define INVESTIGATE_RECORDS "records"
#define INVESTIGATE_ENGINES "engines"
#define INVESTIGATE_TELESCI "telesci"
#define INVESTIGATE_WIRES "wires"
#define INVESTIGATE_PORTAL "portals"
#define INVESTIGATE_RESEARCH "research"
#define INVESTIGATE_HALLUCINATIONS "hallucinations"
#define INVESTIGATE_RADIATION "radiation"
#define INVESTIGATE_EXONET "exonet"
#define INVESTIGATE_NANITES "nanites"
#define INVESTIGATE_PRESENTS "presents"
#define INVESTIGATE_ITEMS "items"
#define INVESTIGATE_ATMOS "atmos"
#define INVESTIGATE_BOTANY "botany"
#define INVESTIGATE_CARGO "cargo"
#define INVESTIGATE_DEATHS "deaths"
#define INVESTIGATE_ENGINES "engines"
#define INVESTIGATE_EXONET "exonet"
#define INVESTIGATE_EXPERIMENTOR "experimentor"
#define INVESTIGATE_GRAVITY "gravity"
#define INVESTIGATE_HALLUCINATIONS "hallucinations"
#define INVESTIGATE_ITEMS "items"
#define INVESTIGATE_NANITES "nanites"
#define INVESTIGATE_PORTAL "portals"
#define INVESTIGATE_PRESENTS "presents"
#define INVESTIGATE_RADIATION "radiation"
#define INVESTIGATE_RECORDS "records"
#define INVESTIGATE_RESEARCH "research"
#define INVESTIGATE_TELESCI "telesci"
#define INVESTIGATE_WIRES "wires"

#define INVESTIGATE_VERB_PICKEDUP "picked up"
#define INVESTIGATE_VERB_DROPPED "dropped"
Expand Down
5 changes: 2 additions & 3 deletions code/_onclick/telekinesis.dm
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,8 @@
focus.layer = old_layer
focus.plane = old_plane

/obj/item/tk_grab/suicide_act(mob/user)
/obj/item/tk_grab/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] is using [user.p_their()] telekinesis to choke [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (OXYLOSS)

return OXYLOSS

#undef TK_MAXRANGE
1 change: 1 addition & 0 deletions code/datums/ai/hunting_behavior/hunting_behaviors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
if(isliving(hunted)) // Are we hunting a living mob?
var/mob/living/living_target = hunted
hunter.manual_emote("[hunt_emote] [living_target]!")
living_target.investigate_log("has been killed by [key_name(hunter)].", INVESTIGATE_DEATHS)
living_target.death()

else if(IS_EDIBLE(hunted))
Expand Down
2 changes: 2 additions & 0 deletions code/datums/components/butchering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@
"<span class='notice'>You butcher [meat].</span>")
ButcherEffects(meat)
meat.harvest(butcher)
meat.log_message("has been butchered by [key_name(butcher)]", LOG_ATTACK)
meat.investigate_log("was gibbed via butchering", INVESTIGATE_DEATHS)
meat.gib(FALSE, FALSE, TRUE)

/datum/component/butchering/proc/ButcherEffects(mob/living/meat) //extra effects called on butchering, override this via subtypes
Expand Down
1 change: 1 addition & 0 deletions code/datums/components/storage/concrete/bag_of_holding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
message_admins("[ADMIN_LOOKUPFLW(user)] detonated a bag of holding at [ADMIN_VERBOSEJMP(loccheck)].")
log_game("[key_name(user)] detonated a bag of holding at [loc_name(loccheck)].")

user.investigate_log("has been gibbed by a bag of holding recursive insertion.", INVESTIGATE_DEATHS)
user.gib(TRUE, TRUE, TRUE)
new/obj/boh_tear(loccheck)
qdel(A)
Expand Down
1 change: 1 addition & 0 deletions code/datums/diseases/gbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
if(4)
to_chat(affected_mob, "<span class='userdanger'>Your body feels as if it's trying to rip itself apart!</span>")
if(prob(50))
affected_mob.investigate_log("has been gibbed by GBS.", INVESTIGATE_DEATHS)
affected_mob.gib()
else
return
4 changes: 4 additions & 0 deletions code/datums/dna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,14 @@
else
switch(rand(0,5))
if(0)
investigate_log("has been gibbed by DNA instability.", INVESTIGATE_DEATHS)
gib()
if(1)
investigate_log("has been dusted by DNA instability.", INVESTIGATE_DEATHS)
dust()

if(2)
investigate_log("has been killed by DNA instability.", INVESTIGATE_DEATHS)
death()
petrify(INFINITY)
if(3)
Expand All @@ -678,6 +681,7 @@
if(BP)
BP.dismember()
else
investigate_log("has been gibbed by DNA instability.", INVESTIGATE_DEATHS)
gib()
else
set_species(/datum/species/dullahan)
Expand Down
1 change: 1 addition & 0 deletions code/datums/status_effects/buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@
healSnake.desc = "A mystical snake previously trapped upon the Rod of Asclepius, now freed of its burden. Unlike the average snake, its bites contain chemicals with minor healing properties."
new /obj/effect/decal/cleanable/ash(owner.loc)
new /obj/item/rod_of_asclepius(owner.loc)
owner.investigate_log("has been consumed by the Rod of Asclepius.", INVESTIGATE_DEATHS)
qdel(owner)
else
if(iscarbon(owner))
Expand Down
6 changes: 3 additions & 3 deletions code/game/gamemodes/clown_ops/clown_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
/obj/item/melee/transforming/energy/sword/bananium/ignition_effect(atom/A, mob/user)
return ""

/obj/item/melee/transforming/energy/sword/bananium/suicide_act(mob/user)
/obj/item/melee/transforming/energy/sword/bananium/suicide_act(mob/living/user)
if(!active)
transform_weapon(user, TRUE)
user.visible_message("<span class='suicide'>[user] is [pick("slitting [user.p_their()] stomach open with", "falling on")] [src]! It looks like [user.p_theyre()] trying to commit seppuku, but the blade slips off of [user.p_them()] harmlessly!</span>")
Expand Down Expand Up @@ -213,11 +213,11 @@
. = ..()
QDEL_NULL(bomb)

/obj/item/grown/bananapeel/bombanana/suicide_act(mob/user)
/obj/item/grown/bananapeel/bombanana/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] is deliberately slipping on the [src.name]! It looks like \he's trying to commit suicide.</span>")
playsound(loc, 'sound/misc/slip.ogg', 50, 1, -1)
bomb.preprime(user, 0, FALSE)
return (BRUTELOSS)
return BRUTELOSS

//TEARSTACHE GRENADE

Expand Down
4 changes: 4 additions & 0 deletions code/game/machinery/computer/arcade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(
temp = "You have been crushed! GAME OVER"
playsound(loc, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff_exponent = 10)
if(obj_flags & EMAGGED)
usr.investigate_log("has been gibbed by an emagged Orion Trail game.", INVESTIGATE_DEATHS)
usr.gib()
SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "hp", (obj_flags & EMAGGED ? "emagged":"normal")))

Expand Down Expand Up @@ -530,6 +531,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(

if(obj_flags & EMAGGED)
to_chat(user, "<span class='userdanger'>You're never going to make it to Orion...</span>")
user.investigate_log("has been killed by an emagged Orion Trail game.", INVESTIGATE_DEATHS)
user.death()
obj_flags &= ~EMAGGED //removes the emagged status after you lose
gameStatus = ORION_STATUS_START
Expand Down Expand Up @@ -737,6 +739,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(
if(settlers.len == 0 || alive == 0)
say("The last crewmember [sheriff], shot themselves, GAME OVER!")
if(obj_flags & EMAGGED)
usr.investigate_log("has been killed by an emagged Orion Trail game.", INVESTIGATE_DEATHS)
usr.death(0)
obj_flags &= EMAGGED
gameStatus = ORION_STATUS_GAMEOVER
Expand All @@ -749,6 +752,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(
else if(obj_flags & EMAGGED)
if(usr.name == sheriff)
say("The crew of the ship chose to kill [usr.name]!")
usr.investigate_log("has been killed by an emagged Orion Trail game.", INVESTIGATE_DEATHS)
usr.death(0)

if(event == ORION_TRAIL_LING) //only ends the ORION_TRAIL_LING event, since you can do this action in multiple places
Expand Down
13 changes: 7 additions & 6 deletions code/game/machinery/computer/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@
data["cyborgs"] += list(cyborg_data)

data["drones"] = list()
for(var/mob/living/simple_animal/drone/D in GLOB.drones_list)
if(D.hacked)
for(var/mob/living/simple_animal/drone/drone in GLOB.drones_list)
if(drone.hacked)
continue
if(get_virtual_z_level() != (get_turf(D)).get_virtual_z_level())
if(get_virtual_z_level() != (get_turf(drone)).get_virtual_z_level())
continue
var/list/drone_data = list(
name = D.name,
status = D.stat,
ref = REF(D)
name = drone.name,
status = drone.stat,
ref = REF(drone)
)
data["drones"] += list(drone_data)

Expand Down Expand Up @@ -168,6 +168,7 @@
s.set_up(3, TRUE, D)
s.start()
D.visible_message("<span class='danger'>\the [D] self-destructs!</span>")
D.investigate_log("has been gibbed by a robotics console.", INVESTIGATE_DEATHS)
D.gib()
if("extract")
if(!GLOB.upload_code)
Expand Down
3 changes: 1 addition & 2 deletions code/game/machinery/newscaster/newspaper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ I am begging someone to remake this to be more like the paper UI, it's so bad.
var/wantedPhoto
var/creation_time

/obj/item/newspaper/suicide_act(mob/user)
/obj/item/newspaper/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] is focusing intently on [src]! It looks like [user.p_theyre()] trying to commit sudoku... until [user.p_their()] eyes light up with realization!</span>")
user.say(";JOURNALISM IS MY CALLING! EVERYBODY APPRECIATES UNBIASED REPORTI-GLORF", forced="newspaper suicide")
var/mob/living/carbon/human/H = user
var/obj/W = new /obj/item/reagent_containers/food/drinks/bottle/whiskey(H.loc)
playsound(H.loc, 'sound/items/drink.ogg', rand(10,50), TRUE)
W.reagents.trans_to(H, W.reagents.total_volume, transfered_by = user)
user.visible_message("<span class='suicide'>[user] downs the contents of [W.name] in one gulp! Shoulda stuck to sudoku!</span>")

return TOXLOSS

/obj/item/newspaper/attack_self(mob/user)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/pipe/construction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Buildable meters
..()
T.flipped = flipped

/obj/item/pipe/directional/suicide_act(mob/user)
/obj/item/pipe/directional/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] shoves [src] in [user.p_their()] mouth and turns it on! It looks like [user.p_theyre()] trying to commit suicide!</span>")
if(iscarbon(user))
var/mob/living/carbon/C = user
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/shieldgen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@
setDir(get_dir(gen_primary, gen_secondary))
for(var/mob/living/L in get_turf(src))
visible_message("<span class='danger'>\The [src] is suddenly occupying the same space as \the [L]!</span>")
L.investigate_log("has been gibbed by [src].", INVESTIGATE_DEATHS)
L.gib()
RegisterSignal(src, COMSIG_ATOM_SINGULARITY_TRY_MOVE, PROC_REF(block_singularity))

Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/washing_machine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ GLOBAL_LIST_INIT(dye_registry, list(

/mob/living/simple_animal/pet/machine_wash(obj/machinery/washing_machine/WM)
WM.bloody_mess = TRUE
investigate_log("has been gibbed by a washing machine.", INVESTIGATE_DEATHS)
gib()

/obj/item/machine_wash(obj/machinery/washing_machine/WM)
Expand Down
1 change: 1 addition & 0 deletions code/game/mecha/equipment/tools/mining_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering)
butchering.Butcher(chassis, target)
else
investigate_log("has been gibbed by [src] (attached to [chassis]).", INVESTIGATE_DEATHS)
target.gib()
else
//drill makes a hole
Expand Down
10 changes: 6 additions & 4 deletions code/game/mecha/mecha.dm
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@
if(occupant)
occupant.SetSleeping(destruction_sleep_duration)
go_out()
var/mob/living/silicon/ai/AI
var/mob/living/silicon/ai/ai
for(var/mob/M in src) //Let's just be ultra sure
if(isAI(M))
occupant = null
AI = M //AIs are loaded into the mech computer itself. When the mech dies, so does the AI. They can be recovered with an AI card from the wreck.
ai = M //AIs are loaded into the mech computer itself. When the mech dies, so does the AI. They can be recovered with an AI card from the wreck.
else
M.forceMove(loc)
for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
Expand All @@ -185,8 +185,9 @@
qdel(capacitor)
if(internal_tank)
qdel(internal_tank)
if(AI)
AI.gib() //No wreck, no AI to recover
if(ai)
ai.investigate_log("has been gibbed by having their mech destroyed.", INVESTIGATE_DEATHS)
ai.gib() //No wreck, no AI to recover
STOP_PROCESSING(SSobj, src)
equipment.Cut()
cell = null
Expand Down Expand Up @@ -1055,6 +1056,7 @@
var/mob/living/silicon/ai/AI = occupant
if(forced)//This should only happen if there are multiple AIs in a round, and at least one is Malf.
RemoveActions(occupant)
occupant.investigate_log("has been gibbed by being forced out of their mech by another AI.", INVESTIGATE_DEATHS)
occupant.gib() //If one Malf decides to steal a mech from another AI (even other Malfs!), they are destroyed, as they have nowhere to go when replaced.
occupant = null
silicon_pilot = FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
//TOXLOSS = 4
//OXYLOSS = 8
//Output a creative message and then return the damagetype done
/obj/item/proc/suicide_act(mob/user)
/obj/item/proc/suicide_act(mob/living/user)
return

/obj/item/set_greyscale(list/colors, new_config, new_worn_config, new_inhand_left, new_inhand_right)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/RCD.dm
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ RLD
/// Integrated airlock electronics for setting access to a newly built airlocks
var/obj/item/electronics/airlock/airlock_electronics

/obj/item/construction/rcd/suicide_act(mob/user)
/obj/item/construction/rcd/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] sets the RCD to 'Wall' and points it down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide..</span>")
return (BRUTELOSS)
return BRUTELOSS

/obj/item/construction/rcd/verb/toggle_window_type_verb()
set name = "RCD : Toggle Window Type"
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/RPD.dm
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,11 @@ GLOBAL_LIST_INIT(fluid_duct_recipes, list(
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
qdel(rpd_up)

/obj/item/pipe_dispenser/suicide_act(mob/user)
/obj/item/pipe_dispenser/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] points the end of the RPD down [user.p_their()] throat and presses a button! It looks like [user.p_theyre()] trying to commit suicide...</span>")
playsound(get_turf(user), 'sound/machines/click.ogg', 50, 1)
playsound(get_turf(user), 'sound/items/deconstruct.ogg', 50, 1)
return(BRUTELOSS)
return BRUTELOSS

/obj/item/pipe_dispenser/ui_assets(mob/user)
return list(
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/airlock_painter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
else
return TRUE

/obj/item/airlock_painter/suicide_act(mob/user)
/obj/item/airlock_painter/suicide_act(mob/living/user)
var/obj/item/organ/lungs/L = user.getorganslot(ORGAN_SLOT_LUNGS)

if(can_use(user) && L)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/chainsaw.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
else
user.visible_message("<span class='suicide'>[user] smashes [src] into [user.p_their()] neck, destroying [user.p_their()] esophagus! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(src, 'sound/weapons/genhit1.ogg', 100, TRUE)
return(BRUTELOSS)
return BRUTELOSS

/obj/item/chainsaw/attack_self(mob/user)
on = !on
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/cigs_lighters.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/smoke_all = FALSE /// Should we smoke all of the chems in the cig before it runs out. Splits each puff to take a portion of the overall chems so by the end you'll always have consumed all of the chems inside.
var/list/list_reagents = list(/datum/reagent/drug/nicotine = 15)

/obj/item/clothing/mask/cigarette/suicide_act(mob/user)
/obj/item/clothing/mask/cigarette/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] is huffing [src] as quickly as [user.p_they()] can! It looks like [user.p_theyre()] trying to give [user.p_them()]self cancer.</span>")
return (TOXLOSS|OXYLOSS)

Expand Down Expand Up @@ -840,7 +840,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/screw = FALSE // kinky
var/super = FALSE //for the fattest vapes dude.

/obj/item/clothing/mask/vape/suicide_act(mob/user)
/obj/item/clothing/mask/vape/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] is puffin hard on dat vape, [user.p_they()] trying to join the vape life on a whole notha plane!</span>")//it doesn't give you cancer, it is cancer
return (TOXLOSS|OXYLOSS)

Expand Down
8 changes: 4 additions & 4 deletions code/game/objects/items/clown_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@
icon_state = "soapsyndie"
cleanspeed = 5 //faster than mop so it is useful for traitors who want to clean crime scenes

/obj/item/soap/suicide_act(mob/user)
/obj/item/soap/suicide_act(mob/living/user)
user.say(";FFFFFFFFFFFFFFFFUUUUUUUDGE!!", forced="soap suicide")
user.visible_message("<span class='suicide'>[user] lifts [src] to [user.p_their()] mouth and gnaws on it furiously, producing a thick froth! [user.p_they(TRUE)]'ll never get that BB gun now!</span>")
new /obj/effect/particle_effect/foam(loc)
return (TOXLOSS)
return TOXLOSS

/obj/item/soap/proc/decreaseUses(mob/user)
uses--
Expand Down Expand Up @@ -168,10 +168,10 @@
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "honk", /datum/mood_event/honk)
return ..()

/obj/item/bikehorn/suicide_act(mob/user)
/obj/item/bikehorn/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] solemnly points [src] at [user.p_their()] temple! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(src, 'sound/items/bikehorn.ogg', 50, TRUE)
return (BRUTELOSS)
return BRUTELOSS

//air horn
/obj/item/bikehorn/airhorn
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/cosmetics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@
var/extended_throwforce = 7
var/extended_icon_state = "straightrazor_open"

/obj/item/razor/straightrazor/suicide_act(mob/user)
/obj/item/razor/straightrazor/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] is slitting [user.p_their()] own throat with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (BRUTELOSS)
return BRUTELOSS

/obj/item/razor/attack(mob/M, mob/user)
. = ..()
Expand Down
Loading

0 comments on commit cc4e426

Please sign in to comment.