From d9b316b7ab45b430ae0fa5bd3ddea88febc27154 Mon Sep 17 00:00:00 2001 From: Qustinnus Date: Wed, 3 Jul 2019 08:32:10 +0100 Subject: [PATCH] Sanity Rebalancing (#44800) cl Floyd / Qustinnus tweak: The Nanotrasen Physological department has realized that working at a metal deathbox is more stressful than it currently is. Mood has been slightly rebalanced /cl This PR is mostly a rebalance of various variables that exist withing the system. The system is now more likely to skew one of two ways instead of always hanging at neutral unless you're hungry, I plan to make it more likely to skew to one side from other things as well, and nerfed various low effort and non interesting interactions such as reading books while buffing the ones that have gameplay like drinking good bartender drinks or winning arcade games. I also plan to add a moodlet for being in the bar; this will reinforce players to visit these areas if things get bad, or if they just want to refuel for a bit. --- code/__DEFINES/mobs.dm | 6 ++-- code/datums/components/mood.dm | 33 ++++++++++------- code/datums/mood_events/drink_events.dm | 16 ++++----- .../mood_events/generic_negative_events.dm | 16 ++++----- .../mood_events/generic_positive_events.dm | 36 ++++++++++--------- code/datums/mood_events/needs_events.dm | 30 ++++++++-------- code/game/area/Space_Station_13_areas.dm | 2 ++ code/game/area/areas.dm | 3 ++ 8 files changed, 80 insertions(+), 62 deletions(-) diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 03407a254d2..376bfed9e4b 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -134,9 +134,9 @@ #define MOOD_LEVEL_HAPPY1 2 #define MOOD_LEVEL_NEUTRAL 0 #define MOOD_LEVEL_SAD1 -3 -#define MOOD_LEVEL_SAD2 -12 -#define MOOD_LEVEL_SAD3 -18 -#define MOOD_LEVEL_SAD4 -25 +#define MOOD_LEVEL_SAD2 -7 +#define MOOD_LEVEL_SAD3 -15 +#define MOOD_LEVEL_SAD4 -20 //Sanity levels for humans #define SANITY_GREAT 125 diff --git a/code/datums/components/mood.dm b/code/datums/components/mood.dm index 4cc5d8403e3..708c200533f 100644 --- a/code/datums/components/mood.dm +++ b/code/datums/components/mood.dm @@ -21,6 +21,7 @@ RegisterSignal(parent, COMSIG_ADD_MOOD_EVENT, .proc/add_event) RegisterSignal(parent, COMSIG_CLEAR_MOOD_EVENT, .proc/clear_event) + RegisterSignal(parent, COMSIG_ENTER_AREA, .proc/check_area_mood) RegisterSignal(parent, COMSIG_MOB_HUD_CREATED, .proc/modify_hud) var/mob/living/owner = parent @@ -173,28 +174,28 @@ switch(mood_level) if(1) - setSanity(sanity-0.2) + setSanity(sanity-0.3) if(2) - setSanity(sanity-0.125, minimum=SANITY_CRAZY) + setSanity(sanity-0.15) if(3) - setSanity(sanity-0.075, minimum=SANITY_UNSTABLE) + setSanity(sanity-0.1) if(4) - setSanity(sanity-0.025, minimum=SANITY_DISTURBED) + setSanity(sanity-0.05, minimum=SANITY_UNSTABLE) if(5) setSanity(sanity+0.1) if(6) - setSanity(sanity+0.15) - if(7) setSanity(sanity+0.2) + if(7) + setSanity(sanity+0.3) if(8) - setSanity(sanity+0.25, maximum=SANITY_GREAT) - if(9) setSanity(sanity+0.4, maximum=INFINITY) + if(9) + setSanity(sanity+0.6, maximum=INFINITY) HandleNutrition(owner) HandleHygiene(owner) -/datum/component/mood/proc/setSanity(amount, minimum=SANITY_INSANE, maximum=SANITY_NEUTRAL) +/datum/component/mood/proc/setSanity(amount, minimum=SANITY_INSANE, maximum=SANITY_GREAT) var/mob/living/owner = parent amount = CLAMP(amount, minimum, maximum) @@ -217,15 +218,15 @@ switch(sanity) if(SANITY_INSANE to SANITY_CRAZY) setInsanityEffect(MAJOR_INSANITY_PEN) - master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=1.5, movetypes=(~FLYING)) + master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=1, movetypes=(~FLYING)) sanity_level = 6 if(SANITY_CRAZY to SANITY_UNSTABLE) setInsanityEffect(MINOR_INSANITY_PEN) - master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=1, movetypes=(~FLYING)) + master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=0.5, movetypes=(~FLYING)) sanity_level = 5 if(SANITY_UNSTABLE to SANITY_DISTURBED) setInsanityEffect(0) - master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=0.5, movetypes=(~FLYING)) + master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=0.25, movetypes=(~FLYING)) sanity_level = 4 if(SANITY_DISTURBED to SANITY_NEUTRAL) setInsanityEffect(0) @@ -371,5 +372,13 @@ T.assume_air(stank) T.air_update_turf() +/datum/component/mood/proc/check_area_mood(datum/source, var/area/A) + if(A.mood_bonus) + var/datum/mood_event/M = add_event(null, "area", /datum/mood_event/area) + M.mood_change = A.mood_bonus + M.description = A.mood_message + else + clear_event(null, "area") + #undef MINOR_INSANITY_PEN #undef MAJOR_INSANITY_PEN diff --git a/code/datums/mood_events/drink_events.dm b/code/datums/mood_events/drink_events.dm index 4e20b2f5b06..4cc73e97953 100644 --- a/code/datums/mood_events/drink_events.dm +++ b/code/datums/mood_events/drink_events.dm @@ -4,23 +4,23 @@ /datum/mood_event/quality_nice description = "That drink wasn't bad at all.\n" - mood_change = 1 - timeout = 2 MINUTES + mood_change = 2 + timeout = 7 MINUTES /datum/mood_event/quality_good description = "That drink was pretty good.\n" - mood_change = 2 - timeout = 2 MINUTES + mood_change = 4 + timeout = 7 MINUTES /datum/mood_event/quality_verygood description = "That drink was great!\n" - mood_change = 3 - timeout = 2 MINUTES + mood_change = 6 + timeout = 7 MINUTES /datum/mood_event/quality_fantastic description = "That drink was amazing!\n" - mood_change = 4 - timeout = 2 MINUTES + mood_change = 8 + timeout = 7 MINUTES /datum/mood_event/amazingtaste description = "Amazing taste!\n" diff --git a/code/datums/mood_events/generic_negative_events.dm b/code/datums/mood_events/generic_negative_events.dm index fddd5627eb7..4302d96cf87 100644 --- a/code/datums/mood_events/generic_negative_events.dm +++ b/code/datums/mood_events/generic_negative_events.dm @@ -8,11 +8,11 @@ /datum/mood_event/on_fire description = "I'M ON FIRE!!!\n" - mood_change = -8 + mood_change = -12 /datum/mood_event/suffocation description = "CAN'T... BREATHE...\n" - mood_change = -6 + mood_change = -12 /datum/mood_event/burnt_thumb description = "I shouldn't play with lighters...\n" @@ -21,11 +21,11 @@ /datum/mood_event/cold description = "It's way too cold in here.\n" - mood_change = -2 + mood_change = -5 /datum/mood_event/hot description = "It's getting hot in here.\n" - mood_change = -2 + mood_change = -5 /datum/mood_event/creampie description = "I've been creamed. Tastes like pie flavor.\n" @@ -49,18 +49,18 @@ /datum/mood_event/depression description = "I feel sad for no particular reason.\n" - mood_change = -9 + mood_change = -12 timeout = 2 MINUTES /datum/mood_event/shameful_suicide //suicide_acts that return SHAME, like sord description = "I can't even end it all!\n" - mood_change = -10 + mood_change = -15 timeout = 60 SECONDS /datum/mood_event/dismembered description = "AHH! I WAS USING THAT LIMB!\n" - mood_change = -8 - timeout = 4 MINUTES + mood_change = -10 + timeout = 8 MINUTES /datum/mood_event/tased description = "There's no \"z\" in \"taser\". It's in the zap.\n" diff --git a/code/datums/mood_events/generic_positive_events.dm b/code/datums/mood_events/generic_positive_events.dm index b4c5e131216..f3479981503 100644 --- a/code/datums/mood_events/generic_positive_events.dm +++ b/code/datums/mood_events/generic_positive_events.dm @@ -6,7 +6,7 @@ /datum/mood_event/betterhug description = "Someone was very nice to me.\n" mood_change = 3 - timeout = 5 MINUTES + timeout = 4 MINUTES /datum/mood_event/betterhug/add_effects(mob/friend) description = "[friend.name] was very nice to me.\n" @@ -14,7 +14,7 @@ /datum/mood_event/besthug description = "Someone is great to be around, they make me feel so happy!\n" mood_change = 5 - timeout = 5 MINUTES + timeout = 4 MINUTES /datum/mood_event/besthug/add_effects(mob/friend) description = "[friend.name] is great to be around, [friend.p_they()] makes me feel so happy!\n" @@ -22,26 +22,26 @@ /datum/mood_event/arcade description = "I beat the arcade game!\n" mood_change = 3 - timeout = 5 MINUTES + timeout = 8 MINUTES /datum/mood_event/blessing description = "I've been blessed.\n" mood_change = 3 - timeout = 5 MINUTES + timeout = 8 MINUTES /datum/mood_event/book_nerd description = "I have recently read a book.\n" - mood_change = 3 + mood_change = 1 timeout = 5 MINUTES /datum/mood_event/exercise description = "Working out releases those endorphins!\n" - mood_change = 3 + mood_change = 2 timeout = 5 MINUTES /datum/mood_event/pet_animal description = "Animals are adorable! I can't stop petting them!\n" - mood_change = 3 + mood_change = 2 timeout = 5 MINUTES /datum/mood_event/pet_animal/add_effects(mob/animal) @@ -55,7 +55,7 @@ /datum/mood_event/perform_cpr description = "It feels good to save a life.\n" mood_change = 6 - timeout = 5 MINUTES + timeout = 8 MINUTES /datum/mood_event/oblivious description = "What a lovely day.\n" @@ -68,12 +68,12 @@ /datum/mood_event/focused description = "I have a goal, and I will reach it, whatever it takes!\n" //Used for syndies, nukeops etc so they can focus on their goals - mood_change = 12 + mood_change = 4 hidden = TRUE /datum/mood_event/badass_antag description = "I'm a fucking badass and everyone around me knows it. Just look at them; they're all fucking shaking at the mere thought of me around." - mood_change = 15 + mood_change = 7 hidden = TRUE special_screen_obj = "badass_sun" special_screen_replace = FALSE @@ -91,7 +91,7 @@ /datum/mood_event/cult description = "I have seen the truth, praise the almighty one!\n" - mood_change = 40 //maybe being a cultist isnt that bad after all + mood_change = 10 //maybe being a cultist isnt that bad after all hidden = TRUE /datum/mood_event/family_heirloom @@ -134,14 +134,18 @@ /datum/mood_event/artok description = "It's nice to see people are making art around here.\n" mood_change = 2 - timeout = 2 MINUTES + timeout = 5 MINUTES /datum/mood_event/artgood description = "What a thought-provoking piece of art. I'll remember that for a while.\n" - mood_change = 3 - timeout = 3 MINUTES + mood_change = 4 + timeout = 5 MINUTES /datum/mood_event/artgreat description = "That work of art was so great it made me believe in the goodness of humanity. Says a lot in a place like this.\n" - mood_change = 4 - timeout = 4 MINUTES + mood_change = 6 + timeout = 5 MINUTES + +/datum/mood_event/area + description = "fill this in in the area" + mood_change = 0 \ No newline at end of file diff --git a/code/datums/mood_events/needs_events.dm b/code/datums/mood_events/needs_events.dm index 2b97d3181ad..e987c7cda18 100644 --- a/code/datums/mood_events/needs_events.dm +++ b/code/datums/mood_events/needs_events.dm @@ -1,23 +1,23 @@ //nutrition /datum/mood_event/fat description = "I'm so fat...\n" //muh fatshaming - mood_change = -4 + mood_change = -6 /datum/mood_event/wellfed description = "I'm stuffed!\n" - mood_change = 6 + mood_change = 8 /datum/mood_event/fed description = "I have recently had some food.\n" - mood_change = 3 + mood_change = 5 /datum/mood_event/hungry description = "I'm getting a bit hungry.\n" - mood_change = -8 + mood_change = -10 /datum/mood_event/starving description = "I'm starving!\n" - mood_change = -15 + mood_change = -16 //charge /datum/mood_event/charged @@ -26,20 +26,20 @@ /datum/mood_event/lowpower description = "My power is running low, I should go charge up somewhere.\n" - mood_change = -7 + mood_change = -10 /datum/mood_event/decharged description = "I'm in desperate need of some electricity!\n" - mood_change = -12 + mood_change = -15 //Disgust /datum/mood_event/gross description = "I saw something gross.\n" - mood_change = -2 + mood_change = -4 /datum/mood_event/verygross description = "I think I'm going to puke...\n" - mood_change = -5 + mood_change = -6 /datum/mood_event/disgusted description = "Oh god that's disgusting...\n" @@ -47,11 +47,11 @@ /datum/mood_event/disgust/bad_smell description = "You smell something horribly decayed inside this room.\n" - mood_change = -3 + mood_change = -6 /datum/mood_event/disgust/nauseating_stench description = "The stench of rotting carcasses is unbearable!\n" - mood_change = -7 + mood_change = -12 //Hygiene Events /datum/mood_event/neat @@ -69,7 +69,7 @@ //Generic needs events /datum/mood_event/favorite_food description = "I really enjoyed eating that.\n" - mood_change = 3 + mood_change = 5 timeout = 4 MINUTES /datum/mood_event/gross_food @@ -79,13 +79,13 @@ /datum/mood_event/disgusting_food description = "That food was disgusting!\n" - mood_change = -4 + mood_change = -6 timeout = 4 MINUTES /datum/mood_event/nice_shower description = "I have recently had a nice shower.\n" - mood_change = 2 - timeout = 3 MINUTES + mood_change = 4 + timeout = 5 MINUTES /datum/mood_event/fresh_laundry description = "There's nothing like the feeling of a freshly laundered jumpsuit.\n" diff --git a/code/game/area/Space_Station_13_areas.dm b/code/game/area/Space_Station_13_areas.dm index f82d0a62d61..0f34594656f 100644 --- a/code/game/area/Space_Station_13_areas.dm +++ b/code/game/area/Space_Station_13_areas.dm @@ -390,6 +390,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/crew_quarters/bar name = "Bar" icon_state = "bar" + mood_bonus = 5 + mood_message = "I love being in the bar!\n" /area/crew_quarters/bar/atrium name = "Atrium" diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 00a72db4acf..2e8f899b6a4 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -31,6 +31,9 @@ var/areasize = 0 //Size of the area in open turfs, only calculated for indoors areas. + var/mood_bonus = 0 //Mood for being here + var/mood_message = "" //Mood message for being here, only shows up if mood_bonus != 0 + var/power_equip = TRUE var/power_light = TRUE var/power_environ = TRUE