/tg/ Station 13 - Modules - TypesVar Details - Proc Details

mood

Mood datum

Contains the logic for controlling a living mob's mood and sanity.

Vars

insanity_effectIs the owner being punished for low mood? if so, how much?
last_statTracks the last mob stat, updates on change Used to stop processing SSmood
mob_parentThe parent (living) mob
moodThe total combined value of all moodlets for the mob
mood_eventsList of mood events currently active on this datum
mood_levelUsed to track what stage of moodies they're on (1-9)
mood_modifierMoodlet value modifier
mood_screen_objectThe screen object for the current mood level
sanityCurrent sanity of the mob (ranges from 0 - 150)
sanity_levelTo track what stage of sanity they're on (1-6)
shown_moodthe total combined value of all visible moodlets for the mob

Procs

add_mood_eventAdds a mood event to the mob
check_area_moodUpdates the mob's moodies, if the area provides a mood bonus
clear_mood_eventRemoves a mood event from the mob
direct_sanity_drainHelper to forcefully drain sanity
has_mood_of_categoryReturns 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_clickHandles clicking on the mood HUD object
modify_hudSets up the mood HUD object
on_reviveCalled when parent is ahealed.
print_moodPrints the users mood, sanity, and moodies to chat
remove_temp_moodsRemoves all temporary moods
set_insanity_effectSets the insanity effect on the mob
set_sanitySets sanity to the specified amount and applies effects.
unmodify_hudRemoves the mood HUD object
update_beautyUpdates the mob's given beauty moodie, based on the area
update_moodUpdates the mobs mood. Called after mood events have been added/removed.
update_mood_iconUpdates the mob's mood icon
update_nutrition_moodletsHandles 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:

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:

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

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