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

tippable

Tippable component. For making mobs able to be tipped, like cows and medibots.

Vars

is_tippedWhether the mob is currently tipped.
post_tipped_callbackCallback to additional behavior after successfully tipping the mob.
post_untipped_callbackCallback to additional behavior after being untipped.
pre_tipped_callbackCallback to additional behavior before being tipped (on try_tip). Return anything from this callback to cancel the tip.
roleplay_callbackCallback to any extra roleplay behaviour
roleplay_emotesList of emotes that will half their untip time
roleplay_friendlyShould we accept roleplay?
roleplayedHave we roleplayed?
self_right_timeTime it takes for the mob to right itself. Can be 0 for instant self-righting, or null, to never self-right.
self_untip_timerThe timer given until they untip themselves
tip_timeTime it takes to tip the mob. Can be 0, for instant tipping.
untip_timeTime it takes to untip the mob. Can also be 0, for instant untip.

Procs

accept_roleplayAccepts "roleplay" in the form of emotes, which removes a quarter of the remaining time left to untip ourself.
do_tipActually tip over the mob, setting it to tipped. Also invoking any callbacks we have, with the tipper as the argument, and set a timer to right our self-right our tipped mob if we can.
do_untipActually untip over the mob, setting it to untipped. Also invoke any untip callbacks we have, with the untipper as the argument.
interact_with_tippableAttempt to interact with [source], either tipping it or helping it up.
right_selfProc called after a timer to have a tipped mob un-tip itself after a certain length of time. Sets our mob to untipped and invokes the untipped callback without any arguments if we have one.
set_tipped_statusToggles our tipped status between tipped or untipped (TRUE or FALSE) also handles rotating our mob and adding immobilization traits
try_tipTry to tip over [tipped_mob]. If the mob is dead, or optional callback returns a value, or our do-after fails, we don't tip the mob. Otherwise, upon completing of the do_after, tip over the mob.
try_untipTry to untip a mob that has been tipped. After a do-after is completed, we untip the mob.

Var Details

is_tipped

Whether the mob is currently tipped.

post_tipped_callback

Callback to additional behavior after successfully tipping the mob.

post_untipped_callback

Callback to additional behavior after being untipped.

pre_tipped_callback

Callback to additional behavior before being tipped (on try_tip). Return anything from this callback to cancel the tip.

roleplay_callback

Callback to any extra roleplay behaviour

roleplay_emotes

List of emotes that will half their untip time

roleplay_friendly

Should we accept roleplay?

roleplayed

Have we roleplayed?

self_right_time

Time it takes for the mob to right itself. Can be 0 for instant self-righting, or null, to never self-right.

self_untip_timer

The timer given until they untip themselves

tip_time

Time it takes to tip the mob. Can be 0, for instant tipping.

untip_time

Time it takes to untip the mob. Can also be 0, for instant untip.

Proc Details

accept_roleplay

Accepts "roleplay" in the form of emotes, which removes a quarter of the remaining time left to untip ourself.

Arguments:

do_tip

Actually tip over the mob, setting it to tipped. Also invoking any callbacks we have, with the tipper as the argument, and set a timer to right our self-right our tipped mob if we can.

tipped_mob - the mob who was tipped tipper - the mob who tipped the tipped_mob

do_untip

Actually untip over the mob, setting it to untipped. Also invoke any untip callbacks we have, with the untipper as the argument.

tipped_mob - the mob who was tipped tipper - the mob who tipped the tipped_mob

interact_with_tippable

Attempt to interact with [source], either tipping it or helping it up.

source - the mob being tipped over user - the mob interacting with source

right_self

Proc called after a timer to have a tipped mob un-tip itself after a certain length of time. Sets our mob to untipped and invokes the untipped callback without any arguments if we have one.

tipped_mob - the mob who was tipped, and is freeing itself

set_tipped_status

Toggles our tipped status between tipped or untipped (TRUE or FALSE) also handles rotating our mob and adding immobilization traits

tipped_mob - the mob we're setting to tipped or untipped new_status - the tipped status we're setting the mob to - TRUE for tipped, FALSE for untipped

try_tip

Try to tip over [tipped_mob]. If the mob is dead, or optional callback returns a value, or our do-after fails, we don't tip the mob. Otherwise, upon completing of the do_after, tip over the mob.

tipped_mob - the mob being tipped over tipper - the mob tipping the tipped_mob

try_untip

Try to untip a mob that has been tipped. After a do-after is completed, we untip the mob.

tipped_mob - the mob who is tipped untipper - the mob who is untipping the tipped_mob