mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-12 02:32:10 +00:00
3591 individual conflicts Update build.js Update install_node.sh Update byond.js oh my fucking god hat slow huh holy shit we all fall down 2 more I missed 2900 individual conflicts 2700 Individual conflicts replaces yarn file with tg version, bumping us down to 2200-ish Down to 2000 individual conflicts 140 down mmm aaaaaaaaaaaaaaaaaaa not yt 575 soon 900 individual conflicts 600 individual conflicts, 121 file conflicts im not okay 160 across 19 files 29 in 4 files 0 conflicts, compiletime fix time some minor incap stuff missed ticks weird dupe definition stuff missed ticks 2 incap fixes undefs and pie fix Radio update and some extra minor stuff returns a single override no more dupe definitions, 175 compiletime errors Unticked file fix sound and emote stuff honk and more radio stuff
35 lines
1.6 KiB
Plaintext
35 lines
1.6 KiB
Plaintext
/// Tests that brain traumas can be granted and removed properly.
|
|
/datum/unit_test/trauma_granting
|
|
|
|
/datum/unit_test/trauma_granting/Run()
|
|
|
|
var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human/consistent)
|
|
// It's not stricly necessary a mob must have a mind, but some traumas do extra stuff if you have mind.
|
|
dummy.mind_initialize()
|
|
|
|
// Following includes some traumas that would require special handling to test.
|
|
var/list/trauma_blacklist = list()
|
|
// Requires a phase be set in New
|
|
trauma_blacklist += typesof(/datum/brain_trauma/hypnosis)
|
|
// Requires another player, sleeps in gain()
|
|
trauma_blacklist += typesof(/datum/brain_trauma/severe/split_personality)
|
|
// Requires another player, sleeps in gain()
|
|
trauma_blacklist += typesof(/datum/brain_trauma/special/imaginary_friend)
|
|
// Requires a obsession target
|
|
trauma_blacklist += typesof(/datum/brain_trauma/special/obsessed)
|
|
//SKYRAT EDIT START
|
|
trauma_blacklist += typesof(/datum/brain_trauma/very_special/induced_hypnosis) // Requires an object to properly work
|
|
//SKYRAT EDIT END
|
|
|
|
for(var/datum/brain_trauma/trauma as anything in typesof(/datum/brain_trauma) - trauma_blacklist)
|
|
if(trauma == initial(trauma.abstract_type))
|
|
continue
|
|
|
|
test_trauma(dummy, trauma)
|
|
|
|
/datum/unit_test/trauma_granting/proc/test_trauma(mob/living/carbon/human/dummy, trauma)
|
|
dummy.gain_trauma(trauma)
|
|
TEST_ASSERT(dummy.has_trauma_type(trauma), "Brain trauma [trauma] failed to grant to dummy")
|
|
dummy.cure_trauma_type(trauma, TRAUMA_RESILIENCE_ABSOLUTE)
|
|
TEST_ASSERT(!dummy.has_trauma_type(trauma), "Brain trauma [trauma] failed to cure from dummy")
|