Heart eater wizard perk no longer works activates on organs that haven't been used before (#85367)

## About The Pull Request

Closes #85364
Organs now mark themselves after being removed from someone, which is
that the perk checks for

## Changelog
🆑
fix: Heart eater wizard perk no longer works activates on organs that
haven't been used before
/🆑
This commit is contained in:
SmArtKar
2024-07-31 10:48:44 -04:00
committed by SkyratBot
parent 676907223c
commit ffba0fab06
4 changed files with 8 additions and 0 deletions
+3
View File
@@ -1125,6 +1125,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
///Trait given to limb by /mob/living/basic/living_limb_flesh
#define TRAIT_IGNORED_BY_LIVING_FLESH "livingflesh_ignored"
///Trait given to organs that have been inside a living being previously
#define TRAIT_USED_ORGAN "used_organ"
/// Trait given while using /datum/action/cooldown/mob_cooldown/wing_buffet
#define TRAIT_WING_BUFFET "wing_buffet"
/// Trait given while tired after using /datum/action/cooldown/mob_cooldown/wing_buffet
+1
View File
@@ -617,6 +617,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
),
/obj/item/organ = list(
"TRAIT_LIVING_HEART" = TRAIT_LIVING_HEART,
"TRAIT_USED_ORGAN" = TRAIT_USED_ORGAN,
),
/obj/item/organ/internal/liver = list(
"TRAIT_BALLMER_SCIENTIST" = TRAIT_BALLMER_SCIENTIST,
+3
View File
@@ -68,6 +68,9 @@
var/obj/item/organ/internal/heart/previous_heart = last_heart_we_ate?.resolve()
if(we_ate_heart == previous_heart)
return
if (!HAS_TRAIT(we_ate_heart, TRAIT_USED_ORGAN))
to_chat(eater, span_warning("This heart is utterly lifeless, you won't receive any boons from consuming it!"))
return
bites_taken = 0
last_heart_we_ate = WEAKREF(we_ate_heart)
@@ -161,6 +161,7 @@
UnregisterSignal(organ_owner, COMSIG_ATOM_EXAMINE)
SEND_SIGNAL(src, COMSIG_ORGAN_REMOVED, organ_owner)
SEND_SIGNAL(organ_owner, COMSIG_CARBON_LOSE_ORGAN, src, special)
ADD_TRAIT(src, TRAIT_USED_ORGAN, ORGAN_TRAIT)
var/list/diseases = organ_owner.get_static_viruses()
if(!LAZYLEN(diseases))