From f51377c2841a0e940c74c6e17364672061a1dd3c Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Sat, 10 Aug 2024 21:46:34 -0700 Subject: [PATCH] IB fixed fun fact (#6863) # About the pull request Adds a fun fact for number of times internal bleeding was fixed, similar to the revives fact. # Explain why it's good for the game I'm not a huge fan of fun facts in general as it sometimes incentivizes bad behavior (such as focusing on revives exclusively and neglecting other duties just because it has a fun fact), but between removing the revives fact or just adding a second medical fact, I went this direction. # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: add: fun fact for internal bleeding fixed /:cl: --- code/datums/statistics/entities/death_stats.dm | 3 +++ code/datums/statistics/random_facts/ib_fact.dm | 9 +++++++++ code/modules/mob/mob_defines.dm | 1 + code/modules/surgery/internal_bleeding.dm | 1 + colonialmarines.dme | 1 + 5 files changed, 15 insertions(+) create mode 100644 code/datums/statistics/random_facts/ib_fact.dm diff --git a/code/datums/statistics/entities/death_stats.dm b/code/datums/statistics/entities/death_stats.dm index 18751ba604a1..de2d9cc71526 100644 --- a/code/datums/statistics/entities/death_stats.dm +++ b/code/datums/statistics/entities/death_stats.dm @@ -20,6 +20,7 @@ var/total_time_alive var/total_damage_taken var/total_revives_done = 0 + var/total_ib_fixed = 0 var/total_brute = 0 var/total_burn = 0 @@ -53,6 +54,7 @@ "total_time_alive" = DB_FIELDTYPE_BIGINT, "total_damage_taken" = DB_FIELDTYPE_INT, "total_revives_done" = DB_FIELDTYPE_INT, + "total_ib_fixed" = DB_FIELDTYPE_INT, "total_brute" = DB_FIELDTYPE_INT, "total_burn" = DB_FIELDTYPE_INT, @@ -132,6 +134,7 @@ new_death.total_time_alive = life_time_total new_death.total_damage_taken = life_damage_taken_total new_death.total_revives_done = life_revives_total + new_death.total_ib_fixed = life_ib_total if(GLOB.round_statistics) GLOB.round_statistics.track_death(new_death) diff --git a/code/datums/statistics/random_facts/ib_fact.dm b/code/datums/statistics/random_facts/ib_fact.dm new file mode 100644 index 000000000000..dca8c303b744 --- /dev/null +++ b/code/datums/statistics/random_facts/ib_fact.dm @@ -0,0 +1,9 @@ +/datum/random_fact/ib + statistic_name = "people" + statistic_verb = "fixed internal bleeding for" + +/datum/random_fact/ib/life_grab_stat(mob/fact_mob) + return fact_mob.life_ib_total + +/datum/random_fact/ib/death_grab_stat(datum/entity/statistic/death/fact_death) + return fact_death.total_ib_fixed diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index f1de550df4aa..297ff47c731c 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -113,6 +113,7 @@ var/life_kills_total = 0 var/life_damage_taken_total = 0 var/life_revives_total = 0 + var/life_ib_total = 0 var/festivizer_hits_total = 0 var/life_value = 1 // when killed, the killee gets this much added to its life_kills_total diff --git a/code/modules/surgery/internal_bleeding.dm b/code/modules/surgery/internal_bleeding.dm index e4afcad5ec99..c67d670ea521 100644 --- a/code/modules/surgery/internal_bleeding.dm +++ b/code/modules/surgery/internal_bleeding.dm @@ -39,6 +39,7 @@ /datum/surgery_step/fix_vein/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, tool_type, datum/surgery/surgery) user.count_niche_stat(STATISTICS_NICHE_SURGERY_IB) + user.life_ib_total++ user.affected_message(target, SPAN_NOTICE("You finish repairing [target]'s damaged vein."), diff --git a/colonialmarines.dme b/colonialmarines.dme index 8374bb19415a..dab9a056a585 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -660,6 +660,7 @@ #include "code\datums\statistics\entities\xeno_stats.dm" #include "code\datums\statistics\random_facts\christmas_fact.dm" #include "code\datums\statistics\random_facts\damage_fact.dm" +#include "code\datums\statistics\random_facts\ib_fact.dm" #include "code\datums\statistics\random_facts\kills_fact.dm" #include "code\datums\statistics\random_facts\random_fact.dm" #include "code\datums\statistics\random_facts\revives_fact.dm"