Skip to content

Commit

Permalink
[MIRROR] bloody spreader now deletes itself once blood_left reaches…
Browse files Browse the repository at this point in the history
… 0 (#2203)

* bloody spreader now deletes itself once `blood_left` reaches 0 (#81723)

## About The Pull Request
This will fix #81626.

## Why It's Good For The Game
See above or below.

## Changelog

:cl:
fix: Meat and other bloody things will not spread blood forever.
/:cl:

* bloody spreader now deletes itself once `blood_left` reaches 0

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Ghom <[email protected]>
  • Loading branch information
3 people authored Mar 1, 2024
1 parent d1eab0a commit dc8614e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/datums/components/bloody_spreader.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Blood splashed around everywhere will carry these diseases. Oh no...
var/list/diseases

/datum/component/bloody_spreader/Initialize(blood_left, list/blood_dna, list/diseases)
/datum/component/bloody_spreader/Initialize(blood_left = INFINITY, list/blood_dna, list/diseases)
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
var/list/signals_to_add = list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACKBY)
Expand All @@ -33,6 +33,9 @@
/datum/component/bloody_spreader/proc/spread_yucky_blood(atom/parent, atom/bloody_fool)
SIGNAL_HANDLER
bloody_fool.add_blood_DNA(blood_dna, diseases)
blood_left--
if(blood_left <= 0)
qdel(src)

/datum/component/bloody_spreader/InheritComponent(/datum/component/new_comp, i_am_original, blood_left = 0)

Expand Down

0 comments on commit dc8614e

Please sign in to comment.