-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIRROR] Adds 'Bloody Spreader' component that bloodies everything it…
… touches [MDB IGNORE] (#24436) * Adds 'Bloody Spreader' component that bloodies everything it touches * Update meat.dm --------- Co-authored-by: carlarctg <[email protected]> Co-authored-by: Bloop <[email protected]>
- Loading branch information
1 parent
8f346d2
commit 68190ed
Showing
11 changed files
with
174 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/datum/component/bloody_spreader | ||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS | ||
// How many bloodening instances are left. Deleted on zero. | ||
var/blood_left | ||
// We will spread this blood DNA to targets! | ||
var/list/blood_dna | ||
// 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) | ||
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) | ||
if(ismovable(parent)) | ||
signals_to_add += list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_IMPACT) | ||
if(isitem(parent)) | ||
signals_to_add += list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_ATOM, COMSIG_ITEM_HIT_REACT, COMSIG_ITEM_ATTACK_SELF, COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED) | ||
var/atom/atom_parent = parent | ||
if(atom_parent.atom_storage) | ||
signals_to_add += list(COMSIG_STORAGE_STORED_ITEM) | ||
else if(isstructure(parent)) | ||
signals_to_add += list(COMSIG_ATOM_ATTACK_HAND) | ||
|
||
RegisterSignals(parent, signals_to_add, PROC_REF(spread_yucky_blood)) | ||
|
||
if(isclothing(parent)) | ||
parent.AddComponent(/datum/component/bloodysoles) | ||
|
||
src.blood_left = blood_left | ||
src.blood_dna = blood_dna | ||
src.diseases = diseases | ||
|
||
/datum/component/bloody_spreader/proc/spread_yucky_blood(atom/parent, atom/bloody_fool) | ||
SIGNAL_HANDLER | ||
bloody_fool.add_blood_DNA(blood_dna, diseases) | ||
|
||
/datum/component/bloody_spreader/InheritComponent(/datum/component/new_comp, i_am_original, blood_left = 0) | ||
|
||
if(!i_am_original) | ||
return | ||
|
||
if(src.blood_left >= INFINITY) | ||
return | ||
|
||
src.blood_left += blood_left |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters