anchor.diff:  					screen_obj.color = "#2eeb9a"
   			break
   
  -/datum/component/mood/process() //Called on SSmood process
  -	var/mob/living/owner = parent
  -
  +///Called on SSmood process
  +/datum/component/mood/process()
   	switch(mood_level)
   		if(1)
  -			setSanity(sanity-0.3)
  +			setSanity(sanity-0.3, SANITY_INSANE, SANITY_NEUTRAL)
   		if(2)
  -			setSanity(sanity-0.15)
  +			setSanity(sanity-0.15, SANITY_INSANE, SANITY_NEUTRAL)
   		if(3)
  -			setSanity(sanity-0.1)
  +			setSanity(sanity-0.1, SANITY_CRAZY, SANITY_NEUTRAL)
   		if(4)
  -			setSanity(sanity-0.05, minimum=SANITY_UNSTABLE)
  +			setSanity(sanity-0.05, SANITY_UNSTABLE, SANITY_NEUTRAL)
   		if(5)
  -			setSanity(sanity+0.1, maximum=SANITY_NEUTRAL)
  +			setSanity(sanity+0.1, SANITY_UNSTABLE, SANITY_NEUTRAL)
   		if(6)
  -			setSanity(sanity+0.2, maximum=SANITY_GREAT)
  +			setSanity(sanity+0.2, SANITY_UNSTABLE, SANITY_GREAT)
   		if(7)
  -			setSanity(sanity+0.3, maximum=INFINITY)
  +			setSanity(sanity+0.3, SANITY_UNSTABLE, SANITY_MAXIMUM)
   		if(8)
  -			setSanity(sanity+0.4, maximum=SANITY_MAXIMUM)
  +			setSanity(sanity+0.4, SANITY_NEUTRAL, SANITY_MAXIMUM)
   		if(9)
  -			setSanity(sanity+0.6, maximum=SANITY_MAXIMUM)
  -
  -	HandleNutrition(owner)
  -
  +			setSanity(sanity+0.6, SANITY_NEUTRAL, SANITY_MAXIMUM)
  +	HandleNutrition()
  +
  +///Sets sanity to the specified amount and applies effects.
   /datum/component/mood/proc/setSanity(amount, minimum=SANITY_INSANE, maximum=SANITY_GREAT)
  -	var/mob/living/owner = parent
  -
  -	if(amount == sanity)
  -		return
   	// If we're out of the acceptable minimum-maximum range move back towards it in steps of 0.5
   	// If the new amount would move towards the acceptable range faster then use it instead
  -	if(sanity < minimum && amount < sanity + 0.5)
  -		amount = sanity + 0.5
  -	// Disturbed stops you from getting any more sane and we don't go above the maximum.
  -	if(HAS_TRAIT(owner, TRAIT_UNSTABLE))
  -		maximum = sanity
  -	//Don't go above the maximum
  -	sanity = min(amount, maximum)
  -
  +	if(sanity < minimum)
  +		amount = sanity + CLAMP(minimum - sanity, 0, 0.7)
  +	else
  +		if(HAS_TRAIT(parent, TRAIT_UNSTABLE))
  +			maximum = sanity
  +		if(sanity > maximum)
  +			amount = sanity + CLAMP(maximum - sanity, -0.5, 0)
  +	if(amount == sanity) //Prevents stuff from flicking around.
  +		return
  +	sanity = amount
   	var/mob/living/master = parent
   	switch(sanity)
   		if(SANITY_INSANE to SANITY_CRAZY)
  
positive.code: /datum/component/mood/proc/hud_click(datum/source, location, control, params, mob/user)
  	print_mood(user)
  
  /datum/component/mood/proc/HandleNutrition(mob/living/L)
  	if(ishuman(L))
  		var/mob/living/carbon/human/H = L
  		if(isethereal(H))
  			HandleCharge(H)
  		if(HAS_TRAIT(H, TRAIT_NOHUNGER))
  			return FALSE //no mood events for nutrition
  	switch(L.nutrition)
  		if(NUTRITION_LEVEL_FULL to INFINITY)
  			if (!HAS_TRAIT(L, TRAIT_VORACIOUS))
  
negative.code: 			add_event(null, "nutrition", /datum/mood_event/starving)
  
  /datum/component/mood/proc/HandleCharge(mob/living/carbon/human/H)
  	var/datum/species/ethereal/E = H.dna.species
  	switch(E.get_charge(H))
  		if(ETHEREAL_CHARGE_NONE to ETHEREAL_CHARGE_LOWPOWER)
  			add_event(null, "charge", /datum/mood_event/decharged)
  