Skip to content

Commit

Permalink
IB fixed fun fact (#6863)
Browse files Browse the repository at this point in the history
# 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
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
add: fun fact for internal bleeding fixed
/:cl:
  • Loading branch information
zzzmike committed Aug 11, 2024
1 parent 04b3134 commit f51377c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/datums/statistics/entities/death_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions code/datums/statistics/random_facts/ib_fact.dm
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions code/modules/mob/mob_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions code/modules/surgery/internal_bleeding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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."),
Expand Down
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f51377c

Please sign in to comment.