mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Logging system refactor and improvement (#39521)
* Refactor several log lines to use datum_info_line and atom_loc_line * Add default return strings from datum_info_line and atom_loc_line * Add parentheses around atom_loc_line data * Change more logs to use atom_loc_line * Add check in atom_loc_line for turfs to avoid calling get_turf on them * Re-add removed 'at' * Replace datum_info_line with key_name and atom_loc_line with loc_name * Refactor logging functions * Avoid double-logging self-interactions * Fallback to simple stringification if all else fails in key_name() * Rewrite muscle spasm logging to use log_message * Standardize logging of martial arts * Tweak individual logging panel look * Fix individual logging panel source * When I typed || I really meant && * Fix Telecomms logging always showing client logs in the panel * Reverts addition of buggy ownership log to panel * Remove colon * Fix missing log_directed_talk tag * Add warning for missing type in log_direted_talk * Change warnings to stack_traces * Add square brackets around fallthrough key_name() case to help parsing * Allow atom arguments/src in log_*() functions * Change log_combat call with null argument to log_message * Change mecha types' log_message() arguments to match atom and mob version * Add key_name() case for atoms * Fix resist_grab() unsetting pulledby before log_combat gets a chance to use it * Fix log_globally logic * Add logging for hitting objects with items * Move log_combat() to atoms.dm * Use utility functions for object stringification in log_combat() * Use utility functions for object stringification in log_combat() * Add missing logs for interacting with display cases * Rewrite log_combat() comment * Add missing space in log_combat() * Add logging for hitting grilles barehanded * Add missing ..()
This commit is contained in:
@@ -100,7 +100,7 @@
|
||||
playsound(T,'sound/weapons/resonator_blast.ogg',50,1)
|
||||
for(var/mob/living/L in T)
|
||||
if(creator)
|
||||
add_logs(creator, L, "used a resonator field on", "resonator")
|
||||
log_combat(creator, L, "used a resonator field on", "resonator")
|
||||
to_chat(L, "<span class='userdanger'>[src] ruptured with you in it!</span>")
|
||||
L.apply_damage(resonance_damage, BRUTE)
|
||||
qdel(src)
|
||||
|
||||
@@ -975,7 +975,7 @@
|
||||
to_chat(user, "<span class='notice'>You shatter the bottle!</span>")
|
||||
playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, 1)
|
||||
message_admins("<span class='adminnotice'>[ADMIN_LOOKUPFLW(user)] has activated a bottle of mayhem!</span>")
|
||||
add_logs(user, null, "activated a bottle of mayhem", src)
|
||||
log_combat(user, null, "activated a bottle of mayhem", src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/blood_contract
|
||||
@@ -1019,7 +1019,7 @@
|
||||
var/datum/objective/survive/survive = new
|
||||
survive.owner = L.mind
|
||||
L.mind.objectives += survive
|
||||
add_logs(user, L, "took out a blood contract on", src)
|
||||
log_combat(user, L, "took out a blood contract on", src)
|
||||
to_chat(L, "<span class='userdanger'>You've been marked for death! Don't let the demons get you! KILL THEM ALL!</span>")
|
||||
L.add_atom_colour("#FF0000", ADMIN_COLOUR_PRIORITY)
|
||||
var/obj/effect/mine/pickup/bloodbath/B = new(L)
|
||||
@@ -1105,7 +1105,7 @@
|
||||
timer = world.time + CLICK_CD_MELEE //by default, melee attacks only cause melee blasts, and have an accordingly short cooldown
|
||||
if(proximity_flag)
|
||||
INVOKE_ASYNC(src, .proc/aoe_burst, T, user)
|
||||
add_logs(user, target, "fired 3x3 blast at", src)
|
||||
log_combat(user, target, "fired 3x3 blast at", src)
|
||||
else
|
||||
if(ismineralturf(target) && get_dist(user, target) < 6) //target is minerals, we can hit it(even if we can't see it)
|
||||
INVOKE_ASYNC(src, .proc/cardinal_blasts, T, user)
|
||||
@@ -1117,10 +1117,10 @@
|
||||
var/obj/effect/temp_visual/hierophant/chaser/C = new(get_turf(user), user, target, chaser_speed, friendly_fire_check)
|
||||
C.damage = 30
|
||||
C.monster_damage_boost = FALSE
|
||||
add_logs(user, target, "fired a chaser at", src)
|
||||
log_combat(user, target, "fired a chaser at", src)
|
||||
else
|
||||
INVOKE_ASYNC(src, .proc/cardinal_blasts, T, user) //otherwise, just do cardinal blast
|
||||
add_logs(user, target, "fired cardinal blast at", src)
|
||||
log_combat(user, target, "fired cardinal blast at", src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>That target is out of range!</span>" )
|
||||
timer = world.time
|
||||
@@ -1232,7 +1232,7 @@
|
||||
INVOKE_ASYNC(src, .proc/prepare_icon_update)
|
||||
beacon.icon_state = "hierophant_tele_off"
|
||||
return
|
||||
add_logs(user, beacon, "teleported self from [AREACOORD(source)] to")
|
||||
user.log_message("teleported self from [AREACOORD(source)] to [beacon]")
|
||||
new /obj/effect/temp_visual/hierophant/telegraph/teleport(T, user)
|
||||
new /obj/effect/temp_visual/hierophant/telegraph/teleport(source, user)
|
||||
for(var/t in RANGE_TURFS(1, T))
|
||||
@@ -1279,7 +1279,7 @@
|
||||
return
|
||||
M.visible_message("<span class='hierophant_warning'>[M] fades in!</span>")
|
||||
if(user != M)
|
||||
add_logs(user, M, "teleported", null, "from [AREACOORD(source)]")
|
||||
log_combat(user, M, "teleported", null, "from [AREACOORD(source)]")
|
||||
|
||||
/obj/item/hierophant_club/proc/cardinal_blasts(turf/T, mob/living/user) //fire cardinal cross blasts with a delay
|
||||
if(!T)
|
||||
|
||||
Reference in New Issue
Block a user