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

mood_event

Vars

categoryA category to put multiple mood events. If one of the mood events in the category is active while another mood event (from the same category) is triggered it will remove the effects of the current mood event and replace it with the new one
descriptionDescription of the mood event
event_flagsFlags that determine what kind of event this is For example, you might have a "EVENT_FEAR" flag that denotes this mood event relates to being afraid of something
hiddenIs this mood event hidden on examine
mood_changeAn integer value that affects overall sanity over time
ownerOwner of this mood event
required_jobList of required jobs for this mood event
special_screen_objIcon state of the unique mood event icon, if applicable
special_screen_replaceif false, it will be an overlay instead
timeoutHow long this mood event should last

Procs

add_effectsCalled when added to a mob
be_refreshedCalled when we get added to a mood datum, but a mood of our type in our category already
be_replacedCalled when we get added to a mood datum, but a mood of a different type is in our category
can_effect_mobCalled when this datum is created, checks if the passed mob can experience this mood event
on_addWrapper for the mood event being added to a mob
remove_effectsCalled when the event is cleared from a mob

Var Details

category

A category to put multiple mood events. If one of the mood events in the category is active while another mood event (from the same category) is triggered it will remove the effects of the current mood event and replace it with the new one

description

Description of the mood event

event_flags

Flags that determine what kind of event this is For example, you might have a "EVENT_FEAR" flag that denotes this mood event relates to being afraid of something

hidden

Is this mood event hidden on examine

mood_change

An integer value that affects overall sanity over time

owner

Owner of this mood event

required_job

List of required jobs for this mood event

special_screen_obj

Icon state of the unique mood event icon, if applicable

special_screen_replace

if false, it will be an overlay instead

timeout

How long this mood event should last

Proc Details

add_effects

Called when added to a mob

be_refreshed

Called when we get added to a mood datum, but a mood of our type in our category already

Return BLOCK_NEW_MOOD to stop the new mood event from being added Return ALLOW_NEW_MOOD to allow the new mood event to be added - note this implicitly deletes [src]

be_replaced

Called when we get added to a mood datum, but a mood of a different type is in our category

Return BLOCK_NEW_MOOD to stop the new mood event from being added Return ALLOW_NEW_MOOD to allow the new mood event to be added - note this implicitly deletes [src]

can_effect_mob

Called when this datum is created, checks if the passed mob can experience this mood event

Return TRUE if the mob can experience this mood event Return FALSE if the mob should be unaffected

on_add

Wrapper for the mood event being added to a mob

remove_effects

Called when the event is cleared from a mob