Files
Bubberstation/code/modules/unit_tests/oxyloss_suffocation.dm
MrMelbert 0c1924a864 Adds Oxyloss KO unit test (#79112)
## About The Pull Request

Adds a unit test ensuring mobs over 50 oxyloss pass out correctly (and
likewise, mobs below 50 wake up).

See #79034
2023-10-21 00:20:41 -06:00

11 lines
547 B
Plaintext

/// Test getting over a certain threshold of oxy damage results in KO
/datum/unit_test/oxyloss_suffocation
/datum/unit_test/oxyloss_suffocation/Run()
var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human/consistent)
dummy.setOxyLoss(75)
TEST_ASSERT(HAS_TRAIT_FROM(dummy, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT), "Dummy should have been knocked out from taking oxy damage.")
dummy.setOxyLoss(0)
TEST_ASSERT(!HAS_TRAIT_FROM(dummy, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT), "Dummy should have woken up from KO when healing to 0 oxy damage.")