[MIRROR] bloody spreader now deletes itself once blood_left reaches 0 (#26696)

* 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

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

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

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
SkyratBot
2024-02-29 23:25:34 +01:00
committed by GitHub
co-authored by Ghom
parent 03a625a2b6
commit b98772fc20
+4 -1
View File
@@ -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)
@@ -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)