diff --git a/code/datums/components/mood.dm b/code/datums/components/mood.dm index 9b5ae3572ba..b98fa8d87e8 100644 --- a/code/datums/components/mood.dm +++ b/code/datums/components/mood.dm @@ -192,15 +192,12 @@ ///Sets sanity to the specified amount and applies effects. /datum/component/mood/proc/setSanity(amount, minimum=SANITY_INSANE, maximum=SANITY_GREAT, override = FALSE) - // If we're out of the acceptable minimum-maximum range move back towards it in steps of 0.5 + // If we're out of the acceptable minimum-maximum range move back towards it in steps of 0.7 // If the new amount would move towards the acceptable range faster then use it instead if(amount < minimum) - amount += CLAMP(minimum - sanity, 0, 0.7) - else - if(!override && HAS_TRAIT(parent, TRAIT_UNSTABLE)) - maximum = sanity - if(amount > maximum) - amount = min(maximum, sanity) + amount += clamp(minimum - amount, 0, 0.7) + if((!override && HAS_TRAIT(parent, TRAIT_UNSTABLE)) || amount > maximum) + amount = min(sanity, amount) if(amount == sanity) //Prevents stuff from flicking around. return sanity = amount