Skip to content

Commit

Permalink
requested changes + removes unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ToasterBan committed Apr 12, 2024
1 parent 53ee5c0 commit 84aa802
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
13 changes: 6 additions & 7 deletions code/datums/components/mood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,20 @@
msg += "<span class='nicegreen'>I love life!</span>\n"

msg += "<span class='notice'>Moodlets:\n</span>"//All moodlets
var/mood_msg = null
var/tought_msg = null
var/mood_msg = ""
var/thought_msg = ""
for(var/i in mood_events)
var/datum/mood_event/event = mood_events[i]
if(event.mood_change)
mood_msg += "[event.description]\n"
else
tought_msg += "[event.description]\n"
thought_msg += "[event.description]\n"
if(!mood_msg)
msg += "<span class='mood_neutral'>I don't have much of a reaction to anything right now.<span>\n"
msg += mood_msg
if(tought_msg)
msg += "<span class='notice'>Toughts:\n</span>"
msg += tought_msg
if(thought_msg)
msg += "<span class='notice'>Thoughts:</span>\n"
msg += thought_msg
to_chat(user || parent, EXAMINE_BLOCK(msg))

/datum/component/mood/proc/update_mood() //Called whenever a mood event is added or removed
Expand Down Expand Up @@ -225,7 +225,6 @@
else
sanity = amount

var/mob/living/master = parent
switch(sanity)
if(SANITY_INSANE to SANITY_CRAZY)
setInsanityEffect(MAJOR_INSANITY_PEN)
Expand Down
11 changes: 2 additions & 9 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1410,21 +1410,14 @@ GLOBAL_LIST_EMPTY(features_by_species)
to_chat(H, "<span class='notice'>You no longer feel vigorous.</span>")
H.metabolism_efficiency = 1

//Hunger slowdown for if mood isn't enabled
if(CONFIG_GET(flag/disable_human_mood))
if(!HAS_TRAIT(H, TRAIT_NOHUNGER))
var/hungry = (500 - H.nutrition) / 5 //So overeat would be 100 and default level would be 80
if(hungry >= 70)
H.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/hunger, multiplicative_slowdown = (hungry / 50))
else
H.remove_movespeed_modifier(/datum/movespeed_modifier/hunger)

if(HAS_TRAIT(H, TRAIT_POWERHUNGRY))
handle_charge(H)
else
switch(H.nutrition)
if(NUTRITION_LEVEL_FULL to INFINITY)
H.throw_alert("nutrition", /atom/movable/screen/alert/fat)
H.remove_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER)
H.remove_actionspeed_modifier(ACTIONSPEED_ID_SATIETY)
if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_FULL)
H.clear_alert("nutrition")
H.remove_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER)
Expand Down

0 comments on commit 84aa802

Please sign in to comment.