From c6644eb27a13172777cf6a0421a626c539d941af Mon Sep 17 00:00:00 2001 From: quotefox Date: Fri, 18 Jun 2021 20:27:33 +0100 Subject: [PATCH] Mood no longer affects movement speed, instead affects actions speed. also fat doesnt make you stupidly slow now. --- code/__HELPERS/mobs.dm | 5 +++++ code/datums/components/mood.dm | 12 ++++++------ code/modules/mob/living/carbon/human/species.dm | 7 ++++--- code/modules/mob/mob_defines.dm | 4 ++++ 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 8d6b706f..ce17243b 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -333,6 +333,11 @@ GLOBAL_LIST_EMPTY(species_list) return 0 var/user_loc = user.loc + //Mood modifier + if(user.actionmoodmultiplier) //if the user has a action modifier + time = time * user.actionmoodmultiplier //apply the modifier to the time + time = clamp(time, 0.1, 9999) //make sure its within range. + var/drifting = 0 if(!user.Process_Spacemove(0) && user.inertia_dir) drifting = 1 diff --git a/code/datums/components/mood.dm b/code/datums/components/mood.dm index 0ac2c4fa..43d13380 100644 --- a/code/datums/components/mood.dm +++ b/code/datums/components/mood.dm @@ -186,27 +186,27 @@ 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) //Did we change something ? movetypes is runtiming, movetypes=(~FLYING)) + master.actionmoodmultiplier = 1.6 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=0.5)//, movetypes=(~FLYING)) + master.actionmoodmultiplier = 1.4 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.25)//, movetypes=(~FLYING)) + master.actionmoodmultiplier = 1.2 sanity_level = 4 if(SANITY_DISTURBED to SANITY_NEUTRAL) setInsanityEffect(0) - master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE) + master.actionmoodmultiplier = 1 sanity_level = 3 if(SANITY_NEUTRAL+1 to SANITY_GREAT+1) //shitty hack but +1 to prevent it from responding to super small differences setInsanityEffect(0) - master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE) + master.actionmoodmultiplier = 1 sanity_level = 2 if(SANITY_GREAT+1 to INFINITY) setInsanityEffect(0) - master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE) + master.actionmoodmultiplier = 1 sanity_level = 1 //update_mood_icon() diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 74a38d3e..19597378 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1428,7 +1428,8 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/grav_force = min(gravity - STANDARD_GRAVITY,3) . += 1 + grav_force - var/datum/component/mood/mood = H.GetComponent(/datum/component/mood) + /*var/datum/component/mood/mood = H.GetComponent(/datum/component/mood) + //removed because mood now influences action speed. Hyperstation 13. if(mood && !flight) //How can depression slow you down if you can just fly away from your problems? switch(mood.sanity) if(SANITY_INSANE to SANITY_CRAZY) @@ -1437,9 +1438,9 @@ GLOBAL_LIST_EMPTY(roundstart_races) . += 1 if(SANITY_UNSTABLE to SANITY_DISTURBED) . += 0.5 - + */ if(HAS_TRAIT(H, TRAIT_FAT)) - . += (1.5 - flight) + . += (0.5 - flight) if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !HAS_TRAIT(H, TRAIT_RESISTCOLD)) . += (BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR return . diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 6e74f42c..4b8f7e5f 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -50,6 +50,10 @@ var/cached_multiplicative_slowdown ///////////////// + //Action Speed + var/actionmultiplier = 1 + var/actionmoodmultiplier = 1 + var/name_archive //For admin things like possession var/bodytemperature = BODYTEMP_NORMAL //310.15K / 98.6F