mood
Mood datum
Contains the logic for controlling a living mob's mood and sanity.
Vars | |
insanity_effect | Is the owner being punished for low mood? if so, how much? |
---|---|
last_stat | Tracks the last mob stat, updates on change Used to stop processing SSmood |
mob_parent | The parent (living) mob |
mood | The total combined value of all moodlets for the mob |
mood_events | List of mood events currently active on this datum |
mood_level | Used to track what stage of moodies they're on (1-9) |
mood_modifier | Moodlet value modifier |
mood_screen_object | The screen object for the current mood level |
sanity | Current sanity of the mob (ranges from 0 - 150) |
sanity_level | To track what stage of sanity they're on (1-6) |
shown_mood | the total combined value of all visible moodlets for the mob |
Procs | |
add_mood_event | Adds a mood event to the mob |
check_area_mood | Updates the mob's moodies, if the area provides a mood bonus |
clear_mood_event | Removes a mood event from the mob |
direct_sanity_drain | Helper to forcefully drain sanity |
has_mood_of_category | Returns true if you already have a mood from a provided category. You may think to yourself, why am I trying to get a boolean from a component? Well, this system probably should not be a component. |
hud_click | Handles clicking on the mood HUD object |
modify_hud | Sets up the mood HUD object |
on_revive | Called when parent is ahealed. |
print_mood | Prints the users mood, sanity, and moodies to chat |
remove_temp_moods | Removes all temporary moods |
set_insanity_effect | Sets the insanity effect on the mob |
set_sanity | Sets sanity to the specified amount and applies effects. |
unmodify_hud | Removes the mood HUD object |
update_beauty | Updates the mob's given beauty moodie, based on the area |
update_mood | Updates the mobs mood. Called after mood events have been added/removed. |
update_mood_icon | Updates the mob's mood icon |
update_nutrition_moodlets | Handles mood given by nutrition |
Var Details
insanity_effect
Is the owner being punished for low mood? if so, how much?
last_stat
Tracks the last mob stat, updates on change Used to stop processing SSmood
mob_parent
The parent (living) mob
mood
The total combined value of all moodlets for the mob
mood_events
List of mood events currently active on this datum
mood_level
Used to track what stage of moodies they're on (1-9)
mood_modifier
Moodlet value modifier
mood_screen_object
The screen object for the current mood level
sanity
Current sanity of the mob (ranges from 0 - 150)
sanity_level
To track what stage of sanity they're on (1-6)
shown_mood
the total combined value of all visible moodlets for the mob
Proc Details
add_mood_event
Adds a mood event to the mob
Arguments:
- category - (text) category of the mood event - see /datum/mood_event for category explanation
- type - (path) any /datum/mood_event
check_area_mood
Updates the mob's moodies, if the area provides a mood bonus
clear_mood_event
Removes a mood event from the mob
Arguments:
- category - (Text) Removes the mood event with the given category
direct_sanity_drain
Helper to forcefully drain sanity
has_mood_of_category
Returns true if you already have a mood from a provided category. You may think to yourself, why am I trying to get a boolean from a component? Well, this system probably should not be a component.
Arguments
- category - Mood category to validate against.
hud_click
Handles clicking on the mood HUD object
modify_hud
Sets up the mood HUD object
on_revive
Called when parent is ahealed.
print_mood
Prints the users mood, sanity, and moodies to chat
remove_temp_moods
Removes all temporary moods
set_insanity_effect
Sets the insanity effect on the mob
set_sanity
Sets sanity to the specified amount and applies effects.
unmodify_hud
Removes the mood HUD object
update_beauty
Updates the mob's given beauty moodie, based on the area
update_mood
Updates the mobs mood. Called after mood events have been added/removed.
update_mood_icon
Updates the mob's mood icon
update_nutrition_moodlets
Handles mood given by nutrition