Skip to content

Commit

Permalink
Adds and updates various logs (#5947)
Browse files Browse the repository at this point in the history
# About the pull request

This PR addresses several deficiencies with logging:
- Punching xenos now is attack logged (attack file & attack_log var)
- Flame projectiles (e.g. plasma sentry shots) now are attack logged
(attack file & attack_log var)
- Projectiles that hit mobs that don't do damage are now attack logged
(attack file & attack_log var); not sure what this may actually apply to
though
- Logs citing the source as SOMETHING?? should now more likely indicate
some atom that fired it
- Projectile logs now indicate what it was fired from (usually either
the gun, or the mob owner of a sentry)
- Sentries now create niche logs when they are configured (IFF, ROF,
renamed, powered on, powered off)
- Reagent overdoses now retain their last_source_mob; this means death
messages will indicate the last mob that contributed to an overdose in
death messages to everyone
- Tailstabbing attacks are now attack logged (attack file & attack_log
var)
- Devour and regurg is now interact logged
- Unnesting is now interact logged + niche logged for a xeno
- log_say now generally includes the area in the log
- Niche logs now have a chat file option in TGChat
- Temporary mute message/action attempts are now niche logged instead of
say logged

# Explain why it's good for the game

Should help with investigations greatly.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>


![image](https://github.com/cmss13-devs/cmss13/assets/76988376/4db11a8e-3a67-4075-9054-bce72789ba23)

![image](https://github.com/cmss13-devs/cmss13/assets/76988376/a0d8e41b-f117-4866-a440-3f4ba0eb3f6c)

![image](https://github.com/cmss13-devs/cmss13/assets/76988376/00fd3fc4-c013-472e-b4d4-07a641382ff2)

![image](https://github.com/cmss13-devs/cmss13/assets/76988376/5b58719c-7158-40a3-a52f-bf5fe027647a)

![niche](https://github.com/cmss13-devs/cmss13/assets/76988376/b2552aa8-8648-4061-a9e7-de8650d25282)

</details>


# Changelog
:cl: Drathek
fix: Overdose death messages will now mention last mob that contributed
to the OD
admin: Many additions to attack, say, interact, and niche logging
admin: Temporary muted messages/actions are now niche logged instead of
say logged
ui: Added niche log filtering to TGChat (still requires admin niche logs
preference)
/:cl:
  • Loading branch information
Drulikar committed Mar 18, 2024
1 parent 365e707 commit a81a557
Show file tree
Hide file tree
Showing 24 changed files with 75 additions and 37 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/chat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#define MESSAGE_TYPE_ADMINLOG "adminlog"
#define MESSAGE_TYPE_ATTACKLOG "attacklog"
#define MESSAGE_TYPE_DEBUG "debug"
#define MESSAGE_TYPE_NICHE "niche"

/// Adds a generic box around whatever message you're sending in chat. Really makes things stand out.
#define examine_block(str) ("<div class='examine_block'>" + str + "</div>")
8 changes: 4 additions & 4 deletions code/datums/components/temporary_mute.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
SIGNAL_HANDLER

if(!nolog)
log_say("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to say the following before their spawn mute ended: [message] (CKEY: [user.key]) (JOB: [user.job])")
msg_admin_niche("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to say the following before their spawn mute ended: [message] (CKEY: [user.key]) (JOB: [user.job]) (AREA: [get_area_name(user)])")
if(on_speak_message)
to_chat(parent, SPAN_BOLDNOTICE(on_speak_message))
return COMPONENT_OVERRIDE_SPEAK

/datum/component/temporary_mute/proc/on_hivemind(mob/user, message)
SIGNAL_HANDLER

log_say("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to hivemind the following before their spawn mute ended: [message] (CKEY: [user.key]) (JOB: [user.job])")
msg_admin_niche("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to hivemind the following before their spawn mute ended: [message] (CKEY: [user.key]) (JOB: [user.job]) (AREA: [get_area_name(user)])")
if(on_speak_message)
to_chat(parent, SPAN_BOLDNOTICE(on_speak_message))
return COMPONENT_OVERRIDE_HIVEMIND_TALK
Expand All @@ -78,15 +78,15 @@
if(!param && !istype(current_emote, /datum/emote/custom))
return

log_say("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to emote the following before their spawn mute ended: [param] (CKEY: [user.key]) (JOB: [user.job])")
msg_admin_niche("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to emote the following before their spawn mute ended: [param] (CKEY: [user.key]) (JOB: [user.job]) (AREA: [get_area_name(user)])")
if(on_emote_message)
to_chat(parent, SPAN_BOLDNOTICE(on_emote_message))
return COMPONENT_OVERRIDE_EMOTE

/datum/component/temporary_mute/proc/on_point(mob/user, atom/target)
SIGNAL_HANDLER

log_say("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to point at the following before their spawn mute ended: [target] (CKEY: [user.key]) (JOB: [user.job])")
msg_admin_niche("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to point at the following before their spawn mute ended: [target] (CKEY: [user.key]) (JOB: [user.job]) (AREA: [get_area_name(user)])")
if(on_emote_message)
to_chat(parent, SPAN_BOLDNOTICE(on_emote_message))
return COMPONENT_OVERRIDE_POINT
11 changes: 5 additions & 6 deletions code/game/objects/structures/stool_bed_chair_nest/xeno_nest.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@
playsound(loc, "alien_resin_move", 50)
if(ishuman(buckled_mob))
var/mob/living/carbon/human/H = buckled_mob
user.attack_log += "\[[time_stamp()]\]<font color='orange'> Unnested [key_name(H)] at [get_location_in_text(H)]</font>"
H.attack_log += "\[[time_stamp()]\]<font color='orange'> Unnested by [key_name(user)] at [get_location_in_text(H)]</font>"
log_interact(user, H, "[key_name(user)] unnested [key_name(H)] at [get_area_name(loc)]")
unbuckle()
return
if(is_sharp(W))
Expand All @@ -128,8 +127,7 @@
playsound(loc, "alien_resin_move", 50)
if(ishuman(buckled_mob))
var/mob/living/carbon/human/H = buckled_mob
user.attack_log += "\[[time_stamp()]\]<font color='orange'> Unnested [key_name(H)] at [get_location_in_text(H)]</font>"
H.attack_log += "\[[time_stamp()]\]<font color='orange'> Unnested by [key_name(user)] at [get_location_in_text(H)]</font>"
log_interact(user, H, "[key_name(user)] unnested [key_name(H)] at [get_area_name(loc)]")
unbuckle()
return
health = max(0, health - W.force)
Expand Down Expand Up @@ -178,8 +176,9 @@
playsound(loc, "alien_resin_move", 50)
if(ishuman(buckled_mob))
var/mob/living/carbon/human/H = buckled_mob
user.attack_log += "\[[time_stamp()]\]<font color='orange'> Unnested [key_name(H)] at [get_location_in_text(H)]</font>"
H.attack_log += "\[[time_stamp()]\]<font color='orange'> Unnested by [key_name(user)] at [get_location_in_text(H)]</font>"
if(isxeno(user))
msg_admin_niche("[key_name(user)] unnested [key_name(H)] at [get_location_in_text(H)] [ADMIN_JMP(loc)]")
log_interact(user, H, "[key_name(user)] unnested [key_name(H)] at [get_area_name(loc)]")
unbuckle()
return

Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

/proc/msg_admin_niche(msg) //Toggleable Niche Messages
log_admin(msg)
msg = SPAN_ADMIN("<span class=\"prefix\">ADMIN NICHE LOG:</span> [msg]")
msg = SPAN_NICHE("<span class=\"prefix\">ADMIN NICHE LOG:</span> [msg]")
for(var/client/C as anything in GLOB.admins)
if(C && C.admin_holder && (R_MOD & C.admin_holder.rights))
if(C.prefs.toggles_chat & CHAT_NICHELOGS)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/cm_preds/yaut_bracers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@
if(!drain_power(caller, 50))
return

log_say("[caller.name != "Unknown" ? caller.name : "([caller.real_name])"] \[Yautja Translator\]: [msg] (CKEY: [caller.key]) (JOB: [caller.job])")
log_say("[caller.name != "Unknown" ? caller.name : "([caller.real_name])"] \[Yautja Translator\]: [msg] (CKEY: [caller.key]) (JOB: [caller.job]) (AREA: [get_area_name(caller)])")

var/list/heard = get_mobs_in_view(7, caller)
for(var/mob/M in heard)
Expand Down
4 changes: 3 additions & 1 deletion code/modules/defenses/defenses.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@
if(!(placed||static))
return FALSE

msg_admin_niche("[key_name(usr)] turned on [src] at [get_location_in_text(src)] [ADMIN_JMP(loc)]")
turned_on = TRUE
power_on_action()
update_icon()

/obj/structure/machinery/defenses/proc/power_off()
msg_admin_niche("[key_name(usr)] turned off [src] at [get_location_in_text(src)] [ADMIN_JMP(loc)]")
turned_on = FALSE
power_off_action()
update_icon()
Expand All @@ -113,6 +115,7 @@
* @param selection: configuration value for category.
*/
/obj/structure/machinery/defenses/proc/update_choice(mob/user, category, selection)
msg_admin_niche("[key_name(user)] changed the [category] of [src] at [get_location_in_text(src)] to [selection] [ADMIN_JMP(loc)]")
if(category in selected_categories)
selected_categories[category] = selection
switch(category)
Expand All @@ -124,7 +127,6 @@
switch(category)
if("nickname")
nickname = selection
message_admins("[key_name_admin(user)] has labelled structure to [nickname]", user.x, user.y, user.z)
return TRUE
return FALSE

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/language/language.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/datum/language/proc/broadcast(mob/living/speaker, message, speaker_mask)

log_say("[key_name(speaker)] : ([name]) [message]")
log_say("[key_name(speaker)] : ([name]) [message] (AREA: [get_area_name(speaker)])")

for(var/mob/player in GLOB.player_list)

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/language/languages.dm
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@

GLOB.STUI.game.Add("\[[time_stamp()]]<font color='#FFFF00'>APOLLO: [key_name(speaker)] : [message]</font><br>")
GLOB.STUI.processing |= STUI_LOG_GAME_CHAT
log_say("[speaker.name != "Unknown" ? speaker.name : "([speaker.real_name])"] \[APOLLO\]: [message] (CKEY: [speaker.key]) (JOB: [speaker.job])")
log_say("[speaker.name != "Unknown" ? speaker.name : "([speaker.real_name])"] \[APOLLO\]: [message] (CKEY: [speaker.key]) (JOB: [speaker.job]) (AREA: [get_area_name(speaker)])")
log_ares_apollo(speaker.real_name, message)
for (var/mob/dead in GLOB.dead_mob_list)
if(!istype(dead,/mob/new_player) && !istype(dead,/mob/living/brain)) //No meta-evesdropping
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/powers/human_powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
to_chat(src, "Not even a [species.name] can speak to the dead.")
return

log_say("[key_name(src)] communed to [key_name(M)]: [text]")
log_say("[key_name(src)] communed to [key_name(M)]: [text] (AREA: [get_area_name(loc)])")

to_chat(M, SPAN_NOTICE(" Like lead slabs crashing into the ocean, alien thoughts drop into your mind: [text]"))
if(istype(M,/mob/living/carbon/human))
Expand All @@ -185,7 +185,7 @@

var/whisper = strip_html(input("Message:", "Psychic Whisper") as text|null)
if(whisper)
log_say("PsychicWhisper: [key_name(src)]->[target_mob.key] : [whisper]")
log_say("PsychicWhisper: [key_name(src)]->[target_mob.key] : [whisper] (AREA: [get_area_name(loc)])")
to_chat(target_mob, SPAN_XENOWARNING(" You hear a strange, alien voice in your head... <i>[whisper]</i>"))
to_chat(src, SPAN_XENOWARNING(" You said: \"[whisper]\" to [target_mob]"))
for (var/mob/dead/observer/ghost as anything in GLOB.observer_list)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/whisper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
spawn(30)
if(client) client.images -= speech_bubble
if(not_dead_speaker)
log_say("[name != "Unknown" ? name : "([real_name])"] \[Whisper\]: [message] (CKEY: [key]) (JOB: [job])")
log_say("[name != "Unknown" ? name : "([real_name])"] \[Whisper\]: [message] (CKEY: [key]) (JOB: [job]) (AREA: [get_area_name(loc)])")
for(var/mob/M in listening)
if(M.client) M.client.images -= speech_bubble
for(var/mob/M in eavesdropping)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/xenomorph/Abilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@

var/whisper = strip_html(input("Message:", "Psychic Whisper") as text|null)
if(whisper)
log_say("PsychicWhisper: [key_name(xeno_player)]->[target_mob.key] : [whisper]")
log_say("PsychicWhisper: [key_name(xeno_player)]->[target_mob.key] : [whisper] (AREA: [get_area_name(target_mob)])")
if(!istype(target_mob, /mob/living/carbon/xenomorph))
to_chat(target_mob, SPAN_XENOQUEEN("You hear a strange, alien voice in your head. \"[whisper]\""))
else
Expand Down Expand Up @@ -259,7 +259,7 @@
return
var/targetstring = english_list(target_list)
to_chat(xeno_player, SPAN_XENONOTICE("You said: \"[whisper]\" to [targetstring]"))
log_say("PsychicRadiance: [key_name(xeno_player)]->[targetstring] : [whisper]")
log_say("PsychicRadiance: [key_name(xeno_player)]->[targetstring] : [whisper] (AREA: [get_area_name(xeno_player)])")
for (var/mob/dead/observer/ghost as anything in GLOB.observer_list)
if(!ghost.client || isnewplayer(ghost))
continue
Expand Down
6 changes: 5 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@
damage += attack.damage > 5 ? attack.damage : 0

playsound(loc, attack.attack_sound, 25, 1)
visible_message(SPAN_DANGER("[M] [pick(attack.attack_verb)]ed [src]!"), null, null, 5, CHAT_TYPE_MELEE_HIT)
var/picked_verb = pick(attack.attack_verb)
visible_message(SPAN_DANGER("[M] [picked_verb]ed [src]!"), null, null, 5, CHAT_TYPE_MELEE_HIT)
log_attack("[key_name(M)] [picked_verb]ed [key_name(src)] at [get_area_name(M)]")
attack_log += text("\[[time_stamp()]\] <font color='orange'>was [picked_verb]ed by [key_name(M)]</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>[picked_verb]ed [key_name(src)]</font>")
apply_damage(damage, BRUTE)
updatehealth()
else
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/XenoProcs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@
visible_message(SPAN_XENOWARNING("[src] hurls out the contents of their stomach!"), \
SPAN_XENOWARNING("We hurl out the contents of our stomach!"), null, 5)
playsound(get_true_location(loc), 'sound/voice/alien_drool2.ogg', 50, 1)
log_interact(src, victim, "[key_name(src)] regurgitated [key_name(victim)] at [get_area_name(loc)]")

if (stuns)
victim.adjust_effect(2, STUN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,9 @@
// The xeno flips around for a second to impale the target with their tail. These look awsome.
stab_direction = turn(get_dir(stabbing_xeno, target), 180)
stab_overlay = "tail"
log_attack("[key_name(stabbing_xeno)] tailstabbed [key_name(target)] at [get_area_name(stabbing_xeno)]")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>was tailstabbed by [key_name(stabbing_xeno)]</font>")
stabbing_xeno.attack_log += text("\[[time_stamp()]\] <font color='red'>tailstabbed [key_name(target)]</font>")

stabbing_xeno.setDir(stab_direction)
stabbing_xeno.emote("tail")
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/living/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
if(message_mode) // we are talking into a radio
if(message_mode == "headset") // default value, means general
message_mode = "General"
log_say("[name != "Unknown" ? name : "([real_name])"] \[[message_mode]\]: [message] (CKEY: [key]) (JOB: [job])")
log_say("[name != "Unknown" ? name : "([real_name])"] \[[message_mode]\]: [message] (CKEY: [key]) (JOB: [job]) (AREA: [get_area_name(loc)])")
else // we talk normally
log_say("[name != "Unknown" ? name : "([real_name])"]: [message] (CKEY: [key]) (JOB: [job])")
log_say("[name != "Unknown" ? name : "([real_name])"]: [message] (CKEY: [key]) (JOB: [job]) (AREA: [get_area_name(loc)])")
else
log_say("[name != "Unknown" ? name : "([real_name])"]: [message] (CKEY: [key])")
log_say("[name != "Unknown" ? name : "([real_name])"]: [message] (CKEY: [key]) (AREA: [get_area_name(loc)])")

return 1

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/mob_grab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@

xeno.visible_message(SPAN_WARNING("[xeno] devours [pulled]!"), \
SPAN_WARNING("We devour [pulled]!"), null, 5)
log_interact(xeno, pulled, "[key_name(xeno)] devoured [key_name(pulled)] at [get_area_name(xeno)]")

if(ishuman(pulled))
var/mob/living/carbon/human/pulled_human = pulled
Expand Down
23 changes: 12 additions & 11 deletions code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -910,8 +910,8 @@
apply_effects(arglist(P.ammo.debilitate))

. = TRUE
bullet_message(P, damaging = damage)
if(damage)
bullet_message(P)
apply_damage(damage, P.ammo.damage_type, P.def_zone, 0, 0, P)
P.play_hit_effect(src)

Expand Down Expand Up @@ -1042,6 +1042,7 @@

if((ammo_flags & AMMO_FLAME) && (src.caste.fire_immunity & FIRE_IMMUNITY_NO_IGNITE|FIRE_IMMUNITY_NO_DAMAGE))
to_chat(src, SPAN_AVOIDHARM("You shrug off the glob of flame."))
bullet_message(P, damaging = FALSE)
return

if(isxeno(P.firer))
Expand Down Expand Up @@ -1216,23 +1217,23 @@
/// People getting shot by a large amount of bullets in a very short period of time can lag them out, with chat messages being one cause, so a 1s cooldown per hit message is introduced to assuage that
/mob/var/shot_cooldown = 0

/mob/proc/bullet_message(obj/projectile/P)
/mob/proc/bullet_message(obj/projectile/P, damaging = TRUE)
if(!P)
return
if(COOLDOWN_FINISHED(src, shot_cooldown))
if(damaging && COOLDOWN_FINISHED(src, shot_cooldown))
visible_message(SPAN_DANGER("[src] is hit by the [P.name] in the [parse_zone(P.def_zone)]!"), \
SPAN_HIGHDANGER("[isxeno(src) ? "We" : "You"] are hit by the [P.name] in the [parse_zone(P.def_zone)]!"), null, 4, CHAT_TYPE_TAKING_HIT)
COOLDOWN_START(src, shot_cooldown, 1 SECONDS)


var/shot_from = P.shot_from ? " from \a [P.shot_from]" : ""
last_damage_data = P.weapon_cause_data
if(P.firer && ismob(P.firer))
var/mob/firingMob = P.firer
var/area/A = get_area(src)
if(ishuman(firingMob) && ishuman(src) && faction == firingMob.faction && !A?.statistic_exempt) //One human shot another, be worried about it but do everything basically the same //special_role should be null or an empty string if done correctly
if(!istype(P.ammo, /datum/ammo/energy/taser))
GLOB.round_statistics.total_friendly_fire_instances++
var/ff_msg = "[key_name(firingMob)] shot [key_name(src)] with \a [P.name] in [get_area(firingMob)] [ADMIN_JMP(firingMob)] [ADMIN_PM(firingMob)]"
var/ff_msg = "[key_name(firingMob)] shot [key_name(src)] with \a [P][shot_from] in [get_area(firingMob)] [ADMIN_JMP(firingMob)] [ADMIN_PM(firingMob)]"
var/ff_living = TRUE
if(src.stat == DEAD)
ff_living = FALSE
Expand All @@ -1241,15 +1242,15 @@
var/mob/living/carbon/human/H = firingMob
H.track_friendly_fire(P.weapon_cause_data.cause_name)
else
msg_admin_attack("[key_name(firingMob)] tased [key_name(src)] in [get_area(firingMob)] ([firingMob.x],[firingMob.y],[firingMob.z]).", firingMob.x, firingMob.y, firingMob.z)
msg_admin_attack("[key_name(firingMob)] tased [key_name(src)][shot_from] in [get_area(firingMob)] ([firingMob.x],[firingMob.y],[firingMob.z]).", firingMob.x, firingMob.y, firingMob.z)
else
msg_admin_attack("[key_name(firingMob)] shot [key_name(src)] with \a [P.name] in [get_area(firingMob)] ([firingMob.x],[firingMob.y],[firingMob.z]).", firingMob.x, firingMob.y, firingMob.z)
attack_log += "\[[time_stamp()]\] <b>[key_name(firingMob)]</b> shot <b>[key_name(src)]</b> with \a <b>[P]</b> in [get_area(firingMob)]."
firingMob.attack_log += "\[[time_stamp()]\] <b>[key_name(firingMob)]</b> shot <b>[key_name(src)]</b> with \a <b>[P]</b> in [get_area(firingMob)]."
msg_admin_attack("[key_name(firingMob)] shot [key_name(src)] with \a [P][shot_from] in [get_area(firingMob)] ([firingMob.x],[firingMob.y],[firingMob.z]).", firingMob.x, firingMob.y, firingMob.z)
attack_log += "\[[time_stamp()]\] <b>[key_name(firingMob)]</b> shot <b>[key_name(src)]</b> with \a <b>[P]</b>[shot_from] in [get_area(firingMob)]."
firingMob.attack_log += "\[[time_stamp()]\] <b>[key_name(firingMob)]</b> shot <b>[key_name(src)]</b> with \a <b>[P]</b>[shot_from] in [get_area(firingMob)]."
return

attack_log += "\[[time_stamp()]\] <b>SOMETHING??</b> shot <b>[key_name(src)]</b> with a <b>[P]</b>"
msg_admin_attack("SOMETHING?? shot [key_name(src)] with \a [P] in [get_area(src)] ([loc.x],[loc.y],[loc.z]).", loc.x, loc.y, loc.z)
attack_log += "\[[time_stamp()]\] <b>[P.firer ? P.firer : "SOMETHING??"]</b> shot <b>[key_name(src)]</b> with a <b>[P]</b>[shot_from]"
msg_admin_attack("[P.firer ? P.firer : "SOMETHING??"] shot [key_name(src)] with \a [P][shot_from] in [get_area(src)] ([loc.x],[loc.y],[loc.z]).", loc.x, loc.y, loc.z)

//Abby -- Just check if they're 1 tile horizontal or vertical, no diagonals
/proc/get_adj_simple(atom/Loc1,atom/Loc2)
Expand Down
4 changes: 4 additions & 0 deletions code/modules/reagents/Chemistry-Holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,13 @@
if(specific_reagent)
if(istype(R, specific_reagent))
R.last_source_mob = WEAKREF(new_source_mob)
if(R.data_properties)
R.data_properties["last_source_mob"] = R.last_source_mob
return
continue
R.last_source_mob = WEAKREF(new_source_mob)
if(R.data_properties)
R.data_properties["last_source_mob"] = R.last_source_mob

/datum/reagents/proc/copy_to(obj/target, amount=1, multiplier=1, preserve_data=1, safety = 0)
if(!target)
Expand Down
1 change: 1 addition & 0 deletions code/span_macros.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#define SPAN_MENTORHELP(X) ("<span class='mentorhelp'>" + X + "</span>")
#define SPAN_MENTORSAY(X) ("<span class='mentorsay'>" + X + "</span>")
#define SPAN_MENTORBODY(X) ("<span class='mentorbody'>" + X + "</span>")
#define SPAN_NICHE(X) "<span class='niche'>[X]</span>"

#define SPAN_PM(X) "<span class='pm'>[X]</span>"

Expand Down
1 change: 1 addition & 0 deletions code/stylesheet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ em {font-style: normal; font-weight: bold;}
.mentorstaff {color: #b5850d; font-weight: bold;}
.staffsay {color: #b5850d; font-weight: bold;}
.staff_ic {color: #000099;}
.niche {color: #386aff; font-weight: bold;}

.name { font-weight: bold;}

Expand Down
8 changes: 8 additions & 0 deletions tgui/packages/tgui-panel/chat/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const MESSAGE_TYPE_EVENTCHAT = 'eventchat';
export const MESSAGE_TYPE_ADMINLOG = 'adminlog';
export const MESSAGE_TYPE_ATTACKLOG = 'attacklog';
export const MESSAGE_TYPE_DEBUG = 'debug';
export const MESSAGE_TYPE_NICHE = 'niche';

// Metadata for each message type
export const MESSAGE_TYPES = [
Expand Down Expand Up @@ -164,4 +165,11 @@ export const MESSAGE_TYPES = [
selector: '.debuginfo',
admin: true,
},
{
type: MESSAGE_TYPE_NICHE,
name: 'Niche Log',
description: 'ADMIN NICHE LOG: Urist McTraitor stuttered while saying: Boo',
selector: '.niche',
admin: true,
},
];
6 changes: 6 additions & 0 deletions tgui/packages/tgui-panel/styles/goon/chat-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ a.popt {
.looc,
.adminooc,
.admin,
.niche,
.medal,
.yell {
font-weight: bold;
Expand Down Expand Up @@ -290,6 +291,11 @@ em {
font-weight: bold;
}

.niche {
color: #5975da;
font-weight: bold;
}

.name {
font-weight: bold;
}
Expand Down
6 changes: 6 additions & 0 deletions tgui/packages/tgui-panel/styles/goon/chat-light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ a.popt {
.looc,
.adminooc,
.admin,
.niche,
.medal,
.yell {
font-weight: bold;
Expand Down Expand Up @@ -308,6 +309,11 @@ em {
font-weight: bold;
}

.niche {
color: #4473ff;
font-weight: bold;
}

.name {
font-weight: bold;
}
Expand Down
4 changes: 2 additions & 2 deletions tgui/public/tgui-panel.bundle.css

Large diffs are not rendered by default.

0 comments on commit a81a557

Please sign in to comment.