Yogstation 13 - Modules - TypesVar Details - Proc Details

Slip behaviour component

Add this component to an object to make it a slippery object, slippery objects make mobs that cross them fall over. Items with this component that get picked up may give their parent mob the slip behaviour.

Here is a simple example of adding the component behaviour to an object.area

AddComponent(/datum/component/slippery, 80, (NO_SLIP_WHEN_WALKING | SLIDE))

This adds slippery behaviour to the parent atom, with a 80 decisecond (~8 seconds) knockdown The lube flags control how the slip behaves, in this case, the mob wont slip if it's in walking mode (NO_SLIP_WHEN_WALKING) and if they do slip, they will slide a few tiles (SLIDE)

This component has configurable behaviours, see the Initialize proc for the argument listing.

Vars

can_slip_callbackOptional callback allowing you to define custom conditions for slipping
default_connectionswhat we give to connect_loc by default, makes slippable mobs moving over us slip
force_drop_itemsIf the slip forces the crossing mob to drop held items.
holderIf parent is an item, this is the person currently holding/wearing the parent (or the parent if no one is holding it)
holder_connect_loc_behalfThe connect_loc_behalf component for the holder_connections list.
holder_connectionswhat we give to connect_loc if we're an item and get equipped by a mob. makes slippable mobs moving over our holder slip
knockdown_timeHow long the slip keeps the crossing mob knocked over (they can still crawl and use weapons) for.
lube_flagsFlags for how slippery the parent is. See [__DEFINES/mobs.dm]
on_slip_callbackOptional call back that is called when a mob slips on this component
paralyze_timeHow long the slip paralyzes (prevents the crossing mob doing anything) for.
slot_whitelistWhitelist of item slots the parent can be equipped in that make the holder slippery. If null or empty, it will always make the holder slippery.

Procs

InitializeInitialize the slippery component behaviour
SlipThe proc that does the sliping. Invokes the slip callback we have set.
Slip_on_wearerThe slip proc, but for equipped items. Slips the person who crossed us if we're lying down and unbuckled.
holder_deletedDetects if the holder mob is deleted. If our holder mob is the holder set in this component, we null it.
on_dropGets called when COMSIG_ITEM_DROPPED is sent to parent. Makes our holder mob un-slippery.
on_equipGets called when COMSIG_ITEM_EQUIPPED is sent to parent. This proc register slip signals to the equipper. If we have a slot whitelist, we only register the signals if the slot is valid (ex: clown PDA only slips in ID or belt slot).

Var Details

can_slip_callback

Optional callback allowing you to define custom conditions for slipping

default_connections

what we give to connect_loc by default, makes slippable mobs moving over us slip

force_drop_items

If the slip forces the crossing mob to drop held items.

holder

If parent is an item, this is the person currently holding/wearing the parent (or the parent if no one is holding it)

holder_connect_loc_behalf

The connect_loc_behalf component for the holder_connections list.

holder_connections

what we give to connect_loc if we're an item and get equipped by a mob. makes slippable mobs moving over our holder slip

knockdown_time

How long the slip keeps the crossing mob knocked over (they can still crawl and use weapons) for.

lube_flags

Flags for how slippery the parent is. See [__DEFINES/mobs.dm]

on_slip_callback

Optional call back that is called when a mob slips on this component

paralyze_time

How long the slip paralyzes (prevents the crossing mob doing anything) for.

slot_whitelist

Whitelist of item slots the parent can be equipped in that make the holder slippery. If null or empty, it will always make the holder slippery.

Proc Details

Initialize

Initialize the slippery component behaviour

When applied to any atom in the game this will apply slipping behaviours to that atom

Arguments:

Slip

The proc that does the sliping. Invokes the slip callback we have set.

Arguments

Slip_on_wearer

The slip proc, but for equipped items. Slips the person who crossed us if we're lying down and unbuckled.

Arguments:

holder_deleted

Detects if the holder mob is deleted. If our holder mob is the holder set in this component, we null it.

Arguments:

on_drop

Gets called when COMSIG_ITEM_DROPPED is sent to parent. Makes our holder mob un-slippery.

Arguments:

on_equip

Gets called when COMSIG_ITEM_EQUIPPED is sent to parent. This proc register slip signals to the equipper. If we have a slot whitelist, we only register the signals if the slot is valid (ex: clown PDA only slips in ID or belt slot).

Arguments