Skip to content

Commit

Permalink
Hugger statistics (#790)
Browse files Browse the repository at this point in the history
* hugger statistics

* s

Signed-off-by: spaghetti <[email protected]>

* Update strippable.dm

---------

Signed-off-by: spaghetti <[email protected]>
  • Loading branch information
definitelynotspaghetti authored Dec 11, 2024
1 parent 9c36548 commit 0585d54
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/datums/elements/strippable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@
if(!source.dropItemToGround(item))
return FALSE

if(istype(item, /obj/item/clothing/mask/facehugger))
GLOB.round_statistics.failed_impregnations++

source.log_message("[key_name(source)] has been stripped of [item] by [key_name(user)]", LOG_ATTACK, color="red")
user.log_message("[key_name(source)] has been stripped of [item] by [key_name(user)]", LOG_ATTACK, color="red", log_globally=FALSE)

Expand Down
4 changes: 4 additions & 0 deletions code/datums/gamemodes/_game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ GLOBAL_LIST_INIT(bioscan_locations, list(
parts += "[SSevacuation.human_escaped] marines manage to evacuate, among [SSevacuation.initial_human_on_ship] that were on ship when xenomorphs arrived."
if(GLOB.round_statistics.now_pregnant)
parts += "[GLOB.round_statistics.now_pregnant] people infected among which [GLOB.round_statistics.total_larva_burst] burst. For a [(GLOB.round_statistics.total_larva_burst / max(GLOB.round_statistics.now_pregnant, 1)) * 100]% successful delivery rate!"
if(GLOB.round_statistics.failed_impregnations)
parts += "[GLOB.round_statistics.failed_impregnations] failed impregnations."
if(GLOB.round_statistics.larva_surgically_removed)
parts += "[GLOB.round_statistics.larva_surgically_removed] larvas surgically removed before burst."
if(length(GLOB.round_statistics.workout_counts))
for(var/faction in GLOB.round_statistics.workout_counts)
parts += "The [faction] faction did [GLOB.round_statistics.workout_counts[faction]] workout sets."
Expand Down
2 changes: 2 additions & 0 deletions code/datums/round_statistics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ GLOBAL_DATUM_INIT(round_statistics, /datum/round_statistics, new)
var/rocket_shells_fired = 0
var/queen_screech = 0
var/now_pregnant = 0
var/failed_impregnations = 0
var/larva_surgically_removed = 0
var/sentinel_drain_stings = 0
var/sentinel_neurotoxin_stings = 0
var/ozelomelyn_stings = 0
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/human/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,8 @@
if(!Adjacent(M)|| !I || I != M.get_item_by_slot(slot_to_process))
return
M.dropItemToGround(I)
if(istype(I, /obj/item/clothing/mask/facehugger))
GLOB.round_statistics.failed_impregnations++
log_combat(src, M, "removed [key_name(I)] ([slot_to_process])")
if(isidcard(I))
message_admins("[ADMIN_TPMONTY(src)] took the [I] of [ADMIN_TPMONTY(M)].")
Expand Down
1 change: 1 addition & 0 deletions code/modules/surgery/organs_internal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
else
A.forceMove(target.loc)
target.status_flags &= ~XENO_HOST
GLOB.round_statistics.larva_surgically_removed++

affected.createwound(CUT, rand(0,20), 1)
target.updatehealth()
Expand Down

0 comments on commit 0585d54

Please sign in to comment.