From 4f772f0425109ca46cbeaa7eb8e0ec1e4bec5fa2 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Thu, 27 Jul 2023 20:58:30 +0100 Subject: [PATCH 1/9] Ahelp defer, I-F speech, chestburst loc --- code/modules/admin/verbs/adminhelp.dm | 1 + code/modules/mob/camera/imaginary_friend.dm | 1 + code/modules/mob/living/carbon/xenomorph/Embryo.dm | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 03d2ae517354..3d50b50e414c 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -519,6 +519,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) AddInteraction("Deferred to Mentors by [key_name_admin(usr)].", player_message = "Deferred to Mentors.") to_chat(initiator, SPAN_ADMINHELP("Your ticket has been deferred to Mentors.")) + log_admin_private("Ticket [TicketHref("#[id]")] deferred to mentors by [usr.key].") log_ahelp(id, "Defer", "Deferred to mentors by [usr.key]", null, usr.ckey) Close(silent = TRUE) diff --git a/code/modules/mob/camera/imaginary_friend.dm b/code/modules/mob/camera/imaginary_friend.dm index 054dd6ea8ff4..a78de70a7e15 100644 --- a/code/modules/mob/camera/imaginary_friend.dm +++ b/code/modules/mob/camera/imaginary_friend.dm @@ -200,6 +200,7 @@ to_chat(owner, "[rendered]") to_chat(src, "[rendered]") + log_say("Imaginary Friend: [dead_rendered]") if(!hidden) var/list/send_to = list() if(!owner.client?.prefs.lang_chat_disabled) diff --git a/code/modules/mob/living/carbon/xenomorph/Embryo.dm b/code/modules/mob/living/carbon/xenomorph/Embryo.dm index e390cd15dca2..d2a8244a85ec 100644 --- a/code/modules/mob/living/carbon/xenomorph/Embryo.dm +++ b/code/modules/mob/living/carbon/xenomorph/Embryo.dm @@ -286,8 +286,8 @@ if(larva_embryo.client) larva_embryo.set_lighting_alpha_from_prefs(larva_embryo.client) - larva_embryo.attack_log += "\[[time_stamp()]\] chestbursted from [key_name(victim)]" - victim.attack_log += "\[[time_stamp()]\] Was chestbursted, larva was [key_name(larva_embryo)]" + larva_embryo.attack_log += "\[[time_stamp()]\] chestbursted from [key_name(victim)] in [get_area_name(larva_embryo)] at X[victim.x], Y[victim.y], Z[victim.z]" + victim.attack_log += "\[[time_stamp()]\] Was chestbursted in [get_area_name(larva_embryo)] at X[victim.x], Y[victim.y], Z[victim.z]. The larva was [key_name(larva_embryo)]." if(burstcount) step(larva_embryo, pick(cardinal)) @@ -308,7 +308,7 @@ if(!victim.first_xeno) to_chat(larva_embryo, SPAN_XENOHIGHDANGER("The Queen's will overwhelms your instincts...")) to_chat(larva_embryo, SPAN_XENOHIGHDANGER("\"[hive.hive_orders]\"")) - log_attack("[key_name(victim)] chestbursted, the larva was [key_name(larva_embryo)].") //this is so that admins are not spammed with los logs + log_attack("[key_name(victim)] chestbursted in [get_area_name(larva_embryo)] at X[victim.x], Y[victim.y], Z[victim.z]. The larva was [key_name(larva_embryo)].") //this is so that admins are not spammed with los logs for(var/obj/item/alien_embryo/AE in victim) qdel(AE) From 299201afacd09f2395b313e16d06e23d13c6f8dd Mon Sep 17 00:00:00 2001 From: forest2001 Date: Thu, 27 Jul 2023 21:06:15 +0100 Subject: [PATCH 2/9] narrow miss --- code/modules/projectiles/projectile.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 2fc04e35f399..e2d5364350ac 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -501,13 +501,14 @@ if(ammo.sound_miss) playsound_client(L.client, ammo.sound_miss, get_turf(L), 75, TRUE) L.visible_message(SPAN_AVOIDHARM("[src] misses [L]!"), SPAN_AVOIDHARM("[src] narrowly misses you!"), null, 4, CHAT_TYPE_TAKING_HIT) - log_attack("[src] narrowly missed [key_name(L)]") + var/log_message = "[src] narrowly missed [key_name(L)]" var/mob/living/carbon/shotby = firer if(istype(shotby)) L.attack_log += "[time_stamp()]\] [src], fired by [key_name(firer)], narrowly missed [key_name(L)]" shotby.attack_log += "[time_stamp()]\] [src], fired by [key_name(shotby)], narrowly missed [key_name(L)]" - + log_message = "[src], fired by [key_name(firer)], narrowly missed [key_name(L)]" + log_attack(log_message) #if DEBUG_HIT_CHANCE to_world(SPAN_DEBUG("([L]) Missed.")) From ed2c5c57e231a35f69e2867c2720570783ba6998 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Thu, 27 Jul 2023 21:20:47 +0100 Subject: [PATCH 3/9] phone calls --- code/modules/cm_phone/phone.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/cm_phone/phone.dm b/code/modules/cm_phone/phone.dm index ac00e717f79a..b3e0ecd87206 100644 --- a/code/modules/cm_phone/phone.dm +++ b/code/modules/cm_phone/phone.dm @@ -312,6 +312,7 @@ GLOBAL_LIST_EMPTY_TYPED(transmitters, /obj/structure/transmitter) P.handle_hear(message, L, speaking) attached_to.handle_hear(message, L, speaking) + log_say("TELEPHONE: [key_name(speaking)] on Phone '[phone_id]' to '[T.phone_id]' said '[message]'") /obj/structure/transmitter/attackby(obj/item/W, mob/user) if(W == attached_to) From 07560cd12386a791a4934519e126f0c7bd5830fb Mon Sep 17 00:00:00 2001 From: forest2001 Date: Thu, 27 Jul 2023 22:07:54 +0100 Subject: [PATCH 4/9] Baton slug and timestamp fix --- .../items/explosives/grenades/marines.dm | 33 ++++++++++--------- code/modules/projectiles/guns/specialist.dm | 21 ++++++------ code/modules/projectiles/projectile.dm | 4 +-- 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/code/game/objects/items/explosives/grenades/marines.dm b/code/game/objects/items/explosives/grenades/marines.dm index 1892c7543414..a6f9b434dddb 100644 --- a/code/game/objects/items/explosives/grenades/marines.dm +++ b/code/game/objects/items/explosives/grenades/marines.dm @@ -547,31 +547,32 @@ ram_distance -- //for max pinballing. icon_state = inactive_icon -/obj/item/explosive/grenade/slug/proc/impact_mob(mob/living/M) - var/direction = Get_Angle(src,M) - var/target_turf = get_angle_target_turf(src,direction,throw_max) - var/fling = rand(throw_min,throw_max) //WEEEEEEEEEEEEEEEEEEEE What is going to be put into throw_atom +/obj/item/explosive/grenade/slug/proc/impact_mob(mob/living/smacked) + var/direction = Get_Angle(src, smacked) + var/target_turf = get_angle_target_turf(src,direction, throw_max) + var/fling = rand(throw_min, throw_max) //WEEEEEEEEEEEEEEEEEEEE What is going to be put into throw_atom var/random_tile = 0 //random tile for bounce - playsound(M.loc, impact_sound, 75, 1) - M.apply_damage(impact_damage, BRUTE) + playsound(smacked.loc, impact_sound, 75, 1) + smacked.apply_damage(impact_damage, BRUTE) + smacked.attack_log += "[\[time_stamp()]\] [src], fired by [fingerprintslast], struck [key_name(smacked)]." random_tile = get_random_turf_in_range(src,ram_distance,ram_distance) //getting random tile for bounce src.throw_atom(random_tile,ram_distance,SPEED_FAST,src,TRUE,NORMAL_LAUNCH,NO_FLAGS) //time for a little trolling - if(isyautja(M)|| issynth(M)) - M.apply_effect(slowdown_time * 0.5, SLOW) - M.apply_effect(dazed_time * 0.5, DAZE) + if(isyautja(smacked)|| issynth(smacked)) + smacked.apply_effect(slowdown_time * 0.5, SLOW) + smacked.apply_effect(dazed_time * 0.5, DAZE) - if(M.mob_size >= MOB_SIZE_BIG)//big xenos not KO'ed - M.apply_effect(slowdown_time * 1.2, SLOW)//They are slowed more :trol: - M.apply_effect(dazed_time * 1.2, DAZE) + if(smacked.mob_size >= MOB_SIZE_BIG)//big xenos not KO'ed + smacked.apply_effect(slowdown_time * 1.2, SLOW)//They are slowed more :trol: + smacked.apply_effect(dazed_time * 1.2, DAZE) return - M.apply_effect(knockout_time, WEAKEN)//but little xenos and humans are - M.throw_atom(target_turf,fling,SPEED_AVERAGE,M,TRUE) - M.apply_effect(slowdown_time, SLOW) - M.apply_effect(dazed_time, DAZE) + smacked.apply_effect(knockout_time, WEAKEN)//but little xenos and humans are + smacked.throw_atom(target_turf, fling, SPEED_AVERAGE, smacked, TRUE) + smacked.apply_effect(slowdown_time, SLOW) + smacked.apply_effect(dazed_time, DAZE) return /obj/item/explosive/grenade/slug/baton diff --git a/code/modules/projectiles/guns/specialist.dm b/code/modules/projectiles/guns/specialist.dm index 22fb290878e9..66456f4e21fc 100644 --- a/code/modules/projectiles/guns/specialist.dm +++ b/code/modules/projectiles/guns/specialist.dm @@ -829,26 +829,27 @@ muzzle_flash(angle,user) simulate_recoil(0, user) - var/obj/item/explosive/grenade/F = cylinder.contents[1] - cylinder.remove_from_storage(F, user.loc) + var/obj/item/explosive/grenade/fired = cylinder.contents[1] + cylinder.remove_from_storage(fired, user.loc) var/pass_flags = NO_FLAGS if(is_lobbing) - if(istype(F, /obj/item/explosive/grenade/slug/baton)) + if(istype(fired, /obj/item/explosive/grenade/slug/baton)) if(ishuman(user)) var/mob/living/carbon/human/human_user = user - human_user.remember_dropped_object(F) + human_user.remember_dropped_object(fired) + fired.fingerprintslast = key_name(user) pass_flags |= PASS_MOB_THRU_HUMAN|PASS_MOB_IS_OTHER|PASS_OVER else pass_flags |= PASS_MOB_THRU|PASS_HIGH_OVER - msg_admin_attack("[key_name_admin(user)] fired a grenade ([F.name]) from \a ([name]).") + msg_admin_attack("[key_name_admin(user)] fired a grenade ([fired.name]) from \a ([name]).") log_game("[key_name_admin(user)] used a grenade ([name]).") - F.throw_range = 20 - F.det_time = min(10, F.det_time) - F.activate(user, FALSE) - F.forceMove(get_turf(src)) - F.throw_atom(target, 20, SPEED_VERY_FAST, user, null, NORMAL_LAUNCH, pass_flags) + fired.throw_range = 20 + fired.det_time = min(10, fired.det_time) + fired.activate(user, FALSE) + fired.forceMove(get_turf(src)) + fired.throw_atom(target, 20, SPEED_VERY_FAST, user, null, NORMAL_LAUNCH, pass_flags) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index e2d5364350ac..c02b19d457c7 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -505,8 +505,8 @@ var/mob/living/carbon/shotby = firer if(istype(shotby)) - L.attack_log += "[time_stamp()]\] [src], fired by [key_name(firer)], narrowly missed [key_name(L)]" - shotby.attack_log += "[time_stamp()]\] [src], fired by [key_name(shotby)], narrowly missed [key_name(L)]" + L.attack_log += "[\[time_stamp()]\] [src], fired by [key_name(firer)], narrowly missed [key_name(L)]" + shotby.attack_log += "[\[time_stamp()]\] [src], fired by [key_name(shotby)], narrowly missed [key_name(L)]" log_message = "[src], fired by [key_name(firer)], narrowly missed [key_name(L)]" log_attack(log_message) From 99847d579c03852916013a8452f32380a0891498 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Thu, 27 Jul 2023 22:13:35 +0100 Subject: [PATCH 5/9] timestamp fix fix --- code/game/objects/items/explosives/grenades/marines.dm | 2 +- code/modules/projectiles/projectile.dm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/explosives/grenades/marines.dm b/code/game/objects/items/explosives/grenades/marines.dm index a6f9b434dddb..a8e0e1803a33 100644 --- a/code/game/objects/items/explosives/grenades/marines.dm +++ b/code/game/objects/items/explosives/grenades/marines.dm @@ -555,7 +555,7 @@ playsound(smacked.loc, impact_sound, 75, 1) smacked.apply_damage(impact_damage, BRUTE) - smacked.attack_log += "[\[time_stamp()]\] [src], fired by [fingerprintslast], struck [key_name(smacked)]." + smacked.attack_log += "\[[time_stamp()]\] [src], fired by [fingerprintslast], struck [key_name(smacked)]." random_tile = get_random_turf_in_range(src,ram_distance,ram_distance) //getting random tile for bounce src.throw_atom(random_tile,ram_distance,SPEED_FAST,src,TRUE,NORMAL_LAUNCH,NO_FLAGS) //time for a little trolling diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index c02b19d457c7..e4251f5f6b31 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -505,8 +505,8 @@ var/mob/living/carbon/shotby = firer if(istype(shotby)) - L.attack_log += "[\[time_stamp()]\] [src], fired by [key_name(firer)], narrowly missed [key_name(L)]" - shotby.attack_log += "[\[time_stamp()]\] [src], fired by [key_name(shotby)], narrowly missed [key_name(L)]" + L.attack_log += "\[[time_stamp()]\] [src], fired by [key_name(firer)], narrowly missed [key_name(L)]" + shotby.attack_log += "\[[time_stamp()]\] [src], fired by [key_name(shotby)], narrowly missed [key_name(L)]" log_message = "[src], fired by [key_name(firer)], narrowly missed [key_name(L)]" log_attack(log_message) From 909eae1ade72b70fb167f9f3c1f88ff9845b1b2f Mon Sep 17 00:00:00 2001 From: forest2001 Date: Fri, 28 Jul 2023 22:25:00 +0100 Subject: [PATCH 6/9] log death --- code/datums/statistics/entities/death_stats.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/datums/statistics/entities/death_stats.dm b/code/datums/statistics/entities/death_stats.dm index 7e26e92ae135..68b5d876360a 100644 --- a/code/datums/statistics/entities/death_stats.dm +++ b/code/datums/statistics/entities/death_stats.dm @@ -65,13 +65,15 @@ ) /mob/proc/track_mob_death(datum/cause_data/cause_data, turf/death_loc) - if(!mind || statistic_exempt) - return - if(cause_data && !istype(cause_data)) stack_trace("track_mob_death called with string cause ([cause_data]) instead of datum") cause_data = create_cause_data(cause_data) + attack_log += "\[[time_stamp()]\] died to [cause_data.cause_name]" + + if(!mind || statistic_exempt) + return + var/datum/entity/statistic/death/new_death = DB_ENTITY(/datum/entity/statistic/death) var/datum/entity/player/player_entity = get_player_from_key(mind.ckey) if(player_entity) From 7c674ede6297fa792d7e773d138787473d016688 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Mon, 31 Jul 2023 12:42:53 +0100 Subject: [PATCH 7/9] catch for no cause data --- code/datums/statistics/entities/death_stats.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/datums/statistics/entities/death_stats.dm b/code/datums/statistics/entities/death_stats.dm index 68b5d876360a..5c65c8b390b1 100644 --- a/code/datums/statistics/entities/death_stats.dm +++ b/code/datums/statistics/entities/death_stats.dm @@ -69,7 +69,10 @@ stack_trace("track_mob_death called with string cause ([cause_data]) instead of datum") cause_data = create_cause_data(cause_data) - attack_log += "\[[time_stamp()]\] died to [cause_data.cause_name]" + var/log_message = "\[[time_stamp()]\] [key_name(src)] died" + if(cause_data) + log_message += " to [cause_data.cause_name]" + attack_log += "[log_message]." if(!mind || statistic_exempt) return From 7801f5f39266551bb5a3ed3979afad3cc761531d Mon Sep 17 00:00:00 2001 From: forest2001 Date: Mon, 31 Jul 2023 12:59:02 +0100 Subject: [PATCH 8/9] better logging on who killed someone. --- code/datums/statistics/entities/death_stats.dm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/code/datums/statistics/entities/death_stats.dm b/code/datums/statistics/entities/death_stats.dm index 5c65c8b390b1..4a01e4e9d72b 100644 --- a/code/datums/statistics/entities/death_stats.dm +++ b/code/datums/statistics/entities/death_stats.dm @@ -69,9 +69,16 @@ stack_trace("track_mob_death called with string cause ([cause_data]) instead of datum") cause_data = create_cause_data(cause_data) - var/log_message = "\[[time_stamp()]\] [key_name(src)] died" + var/log_message = "\[[time_stamp()]\] [key_name(src)] died to " if(cause_data) - log_message += " to [cause_data.cause_name]" + log_message += "[cause_data.cause_name]" + else + log_message += "unknown causes" + var/mob/cause_mob = cause_data?.resolve_mob() + if(cause_mob) + log_message += " from [key_name(cause_data.resolve_mob())]" + cause_mob.attack_log += "\[[time_stamp()]\] [key_name(cause_mob)] killed [key_name(src)] with [cause_data.cause_name]." + attack_log += "[log_message]." if(!mind || statistic_exempt) @@ -101,7 +108,6 @@ new_death.cause_role_name = cause_data?.role new_death.cause_faction_name = cause_data?.faction - var/mob/cause_mob = cause_data?.resolve_mob() if(cause_mob) cause_mob.life_kills_total += life_value From 0c7bf41d0dfab4ddd68306b2e108944b9a76800a Mon Sep 17 00:00:00 2001 From: forest2001 Date: Mon, 31 Jul 2023 13:35:21 +0100 Subject: [PATCH 9/9] dropship logs --- code/__HELPERS/logging.dm | 6 +++-- .../shuttle/computers/dropship_computer.dm | 22 +++++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/code/__HELPERS/logging.dm b/code/__HELPERS/logging.dm index 32da4c953188..5ecbff108725 100644 --- a/code/__HELPERS/logging.dm +++ b/code/__HELPERS/logging.dm @@ -108,8 +108,10 @@ if (CONFIG_GET(flag/log_interact)) WRITE_LOG(GLOB.world_game_log, "INTERACT: [msg]") LOG_REDIS("interact", "\[[time]\] [msg]") - origin.attack_log += "\[[time]\] [msg] " - target.attack_log += "\[[time]\] [msg] " + if(origin) + origin.attack_log += "\[[time]\] [msg] " + if(target) + target.attack_log += "\[[time]\] [msg] " GLOB.STUI.attack.Add("\[[time]]INTERACT: [msg]") GLOB.STUI.processing |= STUI_LOG_ATTACK diff --git a/code/modules/shuttle/computers/dropship_computer.dm b/code/modules/shuttle/computers/dropship_computer.dm index 50449b32fcb9..5ad84e17f159 100644 --- a/code/modules/shuttle/computers/dropship_computer.dm +++ b/code/modules/shuttle/computers/dropship_computer.dm @@ -362,6 +362,9 @@ update_equipment(is_optimised) if(is_set_flyby) to_chat(user, SPAN_NOTICE("You begin the launch sequence for a flyby.")) + var/log = "[key_name(user)] launched the dropship [src.shuttleId] on flyby." + msg_admin_niche(log) + log_interact(user, msg = "[log]") shuttle.send_for_flyby() return TRUE var/dockId = params["target"] @@ -387,6 +390,9 @@ return TRUE SSshuttle.moveShuttle(shuttle.id, dock.id, TRUE) to_chat(user, SPAN_NOTICE("You begin the launch sequence to [dock].")) + var/log = "[key_name(user)] launched the dropship [src.shuttleId] on transport." + msg_admin_niche(log) + log_interact(user, msg = "[log]") return TRUE if("button-push") playsound(loc, get_sfx("terminal_button"), KEYBOARD_SOUND_VOLUME, 1) @@ -403,10 +409,14 @@ to_chat(user, SPAN_WARNING("Door controls have been overridden. Please call technical support.")) if("set-ferry") is_set_flyby = FALSE - msg_admin_niche("[key_name_admin(usr)] set the dropship [src.shuttleId] into transport") + var/log = "[key_name(user)] set the dropship [src.shuttleId] into transport" + msg_admin_niche(log) + log_interact(user, msg = "[log]") if("set-flyby") is_set_flyby = TRUE - msg_admin_niche("[key_name_admin(usr)] set the dropship [src.shuttleId] into flyby") + var/log = "[key_name(user)] set the dropship [src.shuttleId] into flyby." + msg_admin_niche(log) + log_interact(user, msg = "[log]") if("set-automate") var/almayer_lz = params["hangar_id"] var/ground_lz = params["ground_id"] @@ -426,7 +436,9 @@ shuttle.automated_lz_id = ground_lz shuttle.automated_delay = delay playsound(loc, get_sfx("terminal_button"), KEYBOARD_SOUND_VOLUME, 1) - message_admins("[key_name_admin(usr)] has set auto pilot on '[shuttle.name]'") + var/log = "[key_name(user)] has enabled auto pilot on '[shuttle.name]'" + message_admins(log) + log_interact(user, msg = "[log]") return /* TODO if(!dropship.automated_launch) //If we're toggling it on... @@ -440,7 +452,9 @@ shuttle.automated_lz_id = null shuttle.automated_delay = null playsound(loc, get_sfx("terminal_button"), KEYBOARD_SOUND_VOLUME, 1) - message_admins("[key_name_admin(usr)] has removed auto pilot on '[shuttle.name]'") + var/log = "[key_name(user)] has disabled auto pilot on '[shuttle.name]'" + message_admins(log) + log_interact(user, msg = "[log]") return if("cancel-flyby")