mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-09 07:08:03 +01:00
bf22a388ca
## About The Pull Request Desensitized is no longer binary yes/no, now scales from 0.1x to 1x (or beyond, I guess) Desensitized jobs start as 0.5x desensitized (which is the threshold for being considered "truly desensitized") Some antags are now 0.1x to 0.25x desensitized Witnessing death of a fellow human gives you slight desensitization (currently -0.025x). A normal crewmember, after witnessing 20 deaths, is on par with a roundstart desensitized crewmember. Likewise a desensitized crewmember has almost no reaction to death after witnessing 20 deaths. Your own deaths count towards this value. There's an achievement for managing to go from 1x to 0.1x across the course of an entire round. ## Why It's Good For The Game This is intended to contribute to the "story" people face across the length of a round. Rounds with few overall deaths results in crewmembers regularly getting shocked, but bloodbaths results in crewmembers "dehumanizing and facing the bloodshed". ## Changelog 🆑 Melbert add: Desensitization to death is no longer binary - some antagonists are now more used to it than others. add: Witnessing the death of a fellow humanoid (or dying yourself) will slightly desensitize you to future deaths. add: Adds an achievement for managing to max out desensitization across a round. add: Desensitized crewmembers care less when splattered with blood. add: Holodeck mobs have a reduced death mood impact. /🆑
126 lines
5.7 KiB
Plaintext
126 lines
5.7 KiB
Plaintext
/// Tests death moodlets given various traits and personalities
|
|
/datum/unit_test/death_moodlets
|
|
abstract_type = /datum/unit_test/death_moodlets
|
|
/// What moodlet type we expect the test to give
|
|
var/desired_moodlet = /datum/mood_event/conditional/see_death
|
|
|
|
/datum/unit_test/death_moodlets/Run()
|
|
var/mob/living/carbon/human/consistent/dummy = allocate(__IMPLIED_TYPE__)
|
|
dummy.mind_initialize()
|
|
prepare_dummy(dummy)
|
|
|
|
var/mob/living/dying = get_dying_mob()
|
|
prepare_dying_mob(dying)
|
|
dying.death()
|
|
|
|
var/datum/mood_event/moodlet = dummy.mob_mood.mood_events["saw_death"]
|
|
TEST_ASSERT_EQUAL(moodlet?.type, desired_moodlet, "Dummy did not receive the correct moodlet upon witnessing a death.")
|
|
|
|
/// Override to prepare the dummy as needed
|
|
/datum/unit_test/death_moodlets/proc/prepare_dummy(mob/living/carbon/human/consistent/dummy)
|
|
return
|
|
|
|
/// Override to provide the mob that will die
|
|
/datum/unit_test/death_moodlets/proc/get_dying_mob()
|
|
return allocate(/mob/living/carbon/human/consistent)
|
|
|
|
/// Override to prepare the dying mob as needed
|
|
/datum/unit_test/death_moodlets/proc/prepare_dying_mob(mob/living/dying)
|
|
return
|
|
|
|
/// Base type for human death moodlets
|
|
/datum/unit_test/death_moodlets/human
|
|
abstract_type = /datum/unit_test/death_moodlets/human
|
|
|
|
/// Base type for pet death moodlets
|
|
/datum/unit_test/death_moodlets/pet
|
|
abstract_type = /datum/unit_test/death_moodlets/pet
|
|
|
|
/datum/unit_test/death_moodlets/pet/get_dying_mob()
|
|
return allocate(/mob/living/basic/pet/cat/_proc)
|
|
|
|
/// Test the normal ol default moodlet
|
|
/datum/unit_test/death_moodlets/human/normal
|
|
desired_moodlet = /datum/mood_event/conditional/see_death
|
|
|
|
/// Test desensitized moodlet
|
|
/datum/unit_test/death_moodlets/human/desensitized
|
|
desired_moodlet = /datum/mood_event/conditional/see_death/desensitized
|
|
|
|
/datum/unit_test/death_moodlets/human/desensitized/prepare_dummy(mob/living/carbon/human/consistent/dummy)
|
|
dummy.mind.desensitized_level = DESENSITIZED_THRESHOLD
|
|
|
|
/// Test callous moodlet
|
|
/datum/unit_test/death_moodlets/human/callous
|
|
desired_moodlet = /datum/mood_event/conditional/see_death/dontcare
|
|
|
|
/datum/unit_test/death_moodlets/human/callous/prepare_dummy(mob/living/carbon/human/consistent/dummy)
|
|
dummy.add_personality(/datum/personality/callous)
|
|
|
|
/// Tests that callous is prioritized over desensitized
|
|
/datum/unit_test/death_moodlets/human/desensitized_and_callous
|
|
desired_moodlet = /datum/mood_event/conditional/see_death/dontcare
|
|
|
|
/datum/unit_test/death_moodlets/human/desensitized_and_callous/prepare_dummy(mob/living/carbon/human/consistent/dummy)
|
|
dummy.add_personality(/datum/personality/callous)
|
|
dummy.mind.desensitized_level = DESENSITIZED_THRESHOLD
|
|
|
|
/// Test cultist positive moodlet
|
|
/datum/unit_test/death_moodlets/human/cultist
|
|
desired_moodlet = /datum/mood_event/conditional/see_death/cult
|
|
|
|
/datum/unit_test/death_moodlets/human/cultist/prepare_dummy(mob/living/carbon/human/consistent/dummy)
|
|
ADD_TRAIT(dummy, TRAIT_CULT_HALO, TRAIT_SOURCE_UNIT_TESTS)
|
|
|
|
/// Tests cultists are still sad when other cultists die
|
|
/datum/unit_test/death_moodlets/human/cultist/friendly_fire
|
|
desired_moodlet = /datum/mood_event/conditional/see_death
|
|
|
|
/datum/unit_test/death_moodlets/human/cultist/friendly_fire/prepare_dying_mob(mob/living/dying)
|
|
ADD_TRAIT(dying, TRAIT_CULT_HALO, TRAIT_SOURCE_UNIT_TESTS)
|
|
|
|
/// Tests animal moodlet
|
|
/datum/unit_test/death_moodlets/pet/animal_moodlet
|
|
desired_moodlet = /datum/mood_event/conditional/see_death/pet
|
|
|
|
/// Tests desensitized moodlet when a pet dies
|
|
/datum/unit_test/death_moodlets/pet/desensitized_to_pet
|
|
desired_moodlet = /datum/mood_event/conditional/see_death/pet
|
|
|
|
/datum/unit_test/death_moodlets/pet/desensitized_to_pet/prepare_dummy(mob/living/carbon/human/consistent/dummy)
|
|
dummy.mind.desensitized_level = DESENSITIZED_THRESHOLD
|
|
|
|
/// Tests callous moodlet when a pet dies
|
|
/datum/unit_test/death_moodlets/pet/callous_to_pet
|
|
desired_moodlet = /datum/mood_event/conditional/see_death/dontcare
|
|
|
|
/datum/unit_test/death_moodlets/pet/callous_to_pet/prepare_dummy(mob/living/carbon/human/consistent/dummy)
|
|
dummy.add_personality(/datum/personality/callous)
|
|
|
|
/// Tests animal disliker moodlet when a pet dies
|
|
/datum/unit_test/death_moodlets/pet/animal_disliker_to_pet
|
|
desired_moodlet = /datum/mood_event/conditional/see_death/dontcare
|
|
|
|
/datum/unit_test/death_moodlets/pet/animal_disliker_to_pet/prepare_dummy(mob/living/carbon/human/consistent/dummy)
|
|
dummy.add_personality(/datum/personality/animal_disliker)
|
|
|
|
// This one just tests that the death desensitized status effect works as expected
|
|
/datum/unit_test/desensitized_status_effect
|
|
|
|
/datum/unit_test/desensitized_status_effect/Run()
|
|
var/mob/living/carbon/human/consistent/normal_dummy = EASY_ALLOCATE()
|
|
var/mob/living/carbon/human/consistent/desensitized_dummy = EASY_ALLOCATE()
|
|
desensitized_dummy.mind_initialize()
|
|
|
|
desensitized_dummy.apply_status_effect(/datum/status_effect/desensitized, TRAIT_SOURCE_UNIT_TESTS, DESENSITIZED_THRESHOLD)
|
|
TEST_ASSERT_EQUAL(desensitized_dummy.mind.desensitized_level, DESENSITIZED_THRESHOLD, "Desensitized level not set correctly on application of desensitized status effect.")
|
|
|
|
desensitized_dummy.mind.transfer_to(normal_dummy)
|
|
TEST_ASSERT_EQUAL(normal_dummy.mind.desensitized_level, 1.0, "Desensitized level not reset to normal on transfer of mind from desensitized mob.")
|
|
|
|
normal_dummy.mind.transfer_to(desensitized_dummy)
|
|
TEST_ASSERT_EQUAL(desensitized_dummy.mind.desensitized_level, DESENSITIZED_THRESHOLD, "Desensitized level not restored on transfer of mind back to desensitized mob.")
|
|
|
|
desensitized_dummy.remove_status_effect(/datum/status_effect/desensitized, TRAIT_SOURCE_UNIT_TESTS)
|
|
TEST_ASSERT_EQUAL(desensitized_dummy.mind.desensitized_level, 1.0, "Desensitized level not reset to normal on removal of desensitized status effect.")
|