Files
Bubberstation/code/modules/unit_tests/pills.dm
T
SmArtKarandGitHub fc61d427bf Converts pills and patches into interact_with_atom (#88157)
## About The Pull Request

Title. Code maintenance, code sanity and because overriding attack()
like this is bad

## Changelog
🆑
code: Converted pills and patches into interact_with_atom
/🆑
2024-11-25 23:21:26 +01:00

11 lines
485 B
Plaintext

/datum/unit_test/pills/Run()
var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/consistent)
var/obj/item/reagent_containers/pill/iron/pill = allocate(/obj/item/reagent_containers/pill/iron)
TEST_ASSERT_EQUAL(human.has_reagent(/datum/reagent/iron), FALSE, "Human somehow has iron before taking pill")
pill.interact_with_atom(human, human)
human.Life(SSMOBS_DT)
TEST_ASSERT(human.has_reagent(/datum/reagent/iron), "Human doesn't have iron after taking pill")