Stops hauntium from trying to haunt objects it is incapable of haunting (#94528)

## About The Pull Request

<img width="578" height="377" alt="dreamseeker_Gg1rgahTpr"
src="https://github.com/user-attachments/assets/051571f5-5671-40e1-ad94-1607a70f2e71"
/>

This proc should only work on items since that's the only thing the
haunted element works on.

## Why It's Good For The Game

Fixes runtime log spam

## Changelog

Not player-facing
This commit is contained in:
Bloop
2025-12-19 10:21:33 -05:00
committed by GitHub
parent eb508ff117
commit 4d8b1ff5af
5 changed files with 15 additions and 14 deletions
@@ -3161,15 +3161,16 @@
ph = 10
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
//gives 20 seconds of haunting effect for every unit of it that touches an object
//gives 20 seconds of haunting effect for every unit of it that touches an item
/datum/reagent/hauntium/expose_obj(obj/exposed_obj, reac_volume, methods=TOUCH, show_message=TRUE)
. = ..()
if(!isitem(exposed_obj))
return
if(HAS_TRAIT_FROM(exposed_obj, TRAIT_HAUNTED, HAUNTIUM_REAGENT_TRAIT))
var/obj/item/exposed_item = exposed_obj
if(HAS_TRAIT_FROM(exposed_item, TRAIT_HAUNTED, HAUNTIUM_REAGENT_TRAIT))
return
exposed_obj.make_haunted(HAUNTIUM_REAGENT_TRAIT, "#f8f8ff")
addtimer(CALLBACK(exposed_obj, TYPE_PROC_REF(/atom/movable/, remove_haunted), HAUNTIUM_REAGENT_TRAIT), reac_volume * 20 SECONDS)
exposed_item.make_haunted(HAUNTIUM_REAGENT_TRAIT, "#f8f8ff")
addtimer(CALLBACK(exposed_item, TYPE_PROC_REF(/obj/item/, remove_haunted), HAUNTIUM_REAGENT_TRAIT), reac_volume * 20 SECONDS)
/datum/reagent/hauntium/on_mob_metabolize(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()