Adds and improves logging for various shit. (#81738)

## About The Pull Request
Adds logging for RCD construction and deconstruction. Hallucinated
projectiles no longer causes logs. Flamethrowers log gas mixture
information, the flamethrower, the gas tank, tank distribution pressure
and whether it was lit. Adds a lot more logging to records consoles.
Frozen objects now log when they get shattered.
## Why It's Good For The Game
Closes #68452 
Closes #71798 
Closes #78008 
Closes #81098 
Closes #81130 
## Changelog
🆑 Pickle-Coding and Rhials
admin: RCD construction and deconstruction are logged.
admin: Hallucinated projectiles no longer log.
admin: Gives more detail to flamethrower logging.
admin: More actions are logged for records consoles usage.
admin: Frozen object shattering is logged.
/🆑

---------

Co-authored-by: Rhials <Datguy33456@gmail.com>
This commit is contained in:
Pickle-Coding
2024-03-10 19:49:26 +00:00
committed by GitHub
co-authored by Rhials
parent c8232fa892
commit 0a17a2d0f1
11 changed files with 92 additions and 24 deletions
+9 -6
View File
@@ -182,6 +182,8 @@
var/catastropic_dismemberment = FALSE //If TRUE, this projectile deals its damage to the chest if it dismembers a limb.
var/impact_effect_type //what type of impact effect to show when hitting something
var/log_override = FALSE //is this type spammed enough to not log? (KAs)
/// If true, the projectile won't cause any logging. Used for hallucinations and shit.
var/do_not_log = FALSE
/// We ignore mobs with these factions.
var/list/ignored_factions
@@ -359,7 +361,7 @@
if(reagents?.reagent_list)
reagent_note = "REAGENTS: [pretty_string_from_reagent_list(reagents.reagent_list)]"
if(ismob(firer))
if(ismob(firer) && !do_not_log)
log_combat(firer, living_target, "shot", src, reagent_note)
return BULLET_ACT_HIT
@@ -369,11 +371,12 @@
var/list/logging_mobs = firing_vehicle.return_controllers_with_flag(VEHICLE_CONTROL_EQUIPMENT)
if(!LAZYLEN(logging_mobs))
logging_mobs = firing_vehicle.return_drivers()
for(var/mob/logged_mob as anything in logging_mobs)
log_combat(logged_mob, living_target, "shot", src, "from inside [firing_vehicle][logging_mobs.len > 1 ? " with multiple occupants" : null][reagent_note ? " and contained [reagent_note]" : null]")
if(!do_not_log)
for(var/mob/logged_mob as anything in logging_mobs)
log_combat(logged_mob, living_target, "shot", src, "from inside [firing_vehicle][logging_mobs.len > 1 ? " with multiple occupants" : null][reagent_note ? " and contained [reagent_note]" : null]")
return BULLET_ACT_HIT
living_target.log_message("has been shot by [firer] with [src][reagent_note ? " containing [reagent_note]" : null]", LOG_ATTACK, color="orange")
if(!do_not_log)
living_target.log_message("has been shot by [firer] with [src][reagent_note ? " containing [reagent_note]" : null]", LOG_ATTACK, color="orange")
return BULLET_ACT_HIT
/obj/projectile/proc/vol_by_damage()
@@ -771,7 +774,7 @@
SEND_SIGNAL(fired_from, COMSIG_PROJECTILE_BEFORE_FIRE, src, original)
if(firer)
SEND_SIGNAL(firer, COMSIG_PROJECTILE_FIRER_BEFORE_FIRE, src, fired_from, original)
if(!log_override && firer && original)
if(!log_override && firer && original && !do_not_log)
log_combat(firer, original, "fired at", src, "from [get_area_name(src, TRUE)]")
//note: mecha projectile logging is handled in /obj/item/mecha_parts/mecha_equipment/weapon/action(). try to keep these messages roughly the sameish just for consistency's sake.
if(direct_target && (get_dist(direct_target, get_turf(src)) <= 1)) // point blank shots