Goonstation 13 - Modules - TypesVar Details - Proc Details

Pet carriers.

Code by DisturbHerb, icons by Azwald/Sunkiisu.

A handheld item which can hold some mob instances inside with support for visually displaying its occupants with vis_contents. This was created without access to the pre-existing chicken carrier code so it could be pretty bad.

The icon for the carrier is constructed using a base where two /obj/dummys are layered on top. These dummy objects are held in the carrier's vis_contents and each of them hold the mobs and the door of the carrier. The reason why the vis_contents of vis_contents_proxy hold the mobs rather than the carrier doing so directly is so that an alpha mask can prevent parts of the occupants from rendering outside of the inside of the carrier.

Vars

actionbar_durationTime it takes for each action (eg. grabbing, releasing).
allowed_mob_typesPlease override this in child types to specify what can actually fit in.
can_break_outIf FALSE, an occupant cannot escape the carrier on their own.
carrier_alpha_maskAlpha mask icon state for cutting out the mob on non-transparent pixels.
carrier_max_capacityHow many mobs can fit inside the crate. Usually not overridden by anything, this is to let the system be permissive for var-editing.
carrier_occupantsA list of the current occupants inside the carrier.
carrier_open_item_stateCarrier item state names.
carrier_vis_flagsCarrier-related (grate_proxy, vis_contents_proxy) vis_flags.
damage_per_resistThe damage dealt to the door's health upon resisting.
default_mob_typeType path, If not null, the pet carrier will spawn with one of this mob on New().
door_healthCauses the door to open and release its occupants when it reaches 0, subsequently resetting itself to the maximum.
empty_carrier_icon_stateEmpty carrier icon state name.
explicit_name_limitNumber of mobs named explicitly on examine() before switching to "there's a lot of mobs in here wow".
gildedFor Noah's Shuttle medal
grate_open_icon_stateGrate icon state names.
grate_proxyGrate object to be held in src.vis_contents
mob_vis_flagsMob-specific vis_flags.
release_mob_icon_stateThe icon_state for the src.RELEASE_MOB() actionbar.
trap_mob_icon_stateThe icon_state for the src.TRAP_MOB() actionbar.
vis_contents_proxyProxy object for storing the vis_contents of each occupant, which itself is contained in the vis_contents of the parent carrier.

Procs

add_mobDirectly adds a target mob to the carrier.
eject_mobDirectly ejects a target mob from the carrier.
release_mobCalled when a given mob/user releases an mob after an actionbar.
take_door_damageDeals damage to the door. If the remaining health <= 0, release everyone and reset the carrier.
trap_mobCalled when a given mob/user steals a mob after an actionbar.

Var Details

actionbar_duration

Time it takes for each action (eg. grabbing, releasing).

allowed_mob_types

Please override this in child types to specify what can actually fit in.

can_break_out

If FALSE, an occupant cannot escape the carrier on their own.

carrier_alpha_mask

Alpha mask icon state for cutting out the mob on non-transparent pixels.

carrier_max_capacity

How many mobs can fit inside the crate. Usually not overridden by anything, this is to let the system be permissive for var-editing.

carrier_occupants

A list of the current occupants inside the carrier.

carrier_open_item_state

Carrier item state names.

carrier_vis_flags

Carrier-related (grate_proxy, vis_contents_proxy) vis_flags.

damage_per_resist

The damage dealt to the door's health upon resisting.

default_mob_type

Type path, If not null, the pet carrier will spawn with one of this mob on New().

door_health

Causes the door to open and release its occupants when it reaches 0, subsequently resetting itself to the maximum.

empty_carrier_icon_state

Empty carrier icon state name.

explicit_name_limit

Number of mobs named explicitly on examine() before switching to "there's a lot of mobs in here wow".

gilded

For Noah's Shuttle medal

grate_open_icon_state

Grate icon state names.

grate_proxy

Grate object to be held in src.vis_contents

mob_vis_flags

Mob-specific vis_flags.

release_mob_icon_state

The icon_state for the src.RELEASE_MOB() actionbar.

trap_mob_icon_state

The icon_state for the src.TRAP_MOB() actionbar.

vis_contents_proxy

Proxy object for storing the vis_contents of each occupant, which itself is contained in the vis_contents of the parent carrier.

Proc Details

add_mob

Directly adds a target mob to the carrier.

eject_mob

Directly ejects a target mob from the carrier.

release_mob

Called when a given mob/user releases an mob after an actionbar.

take_door_damage

Deals damage to the door. If the remaining health <= 0, release everyone and reset the carrier.

trap_mob

Called when a given mob/user steals a mob after an actionbar.