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

Outfit datums

This is a clean system of applying outfits to mobs, if you need to equip someone in a uniform this is the way to do it cleanly and properly.

You can also specify an outfit datum on a job to have it auto equipped to the mob on join

/mob/living/carbon/human/proc/equipOutfit(outfit) is the mob level proc to equip an outfit and you pass it the relevant datum outfit

outfits can also be saved as json blobs downloadable by a client and then can be uploaded by that user to recreate the outfit, this is used by admins to allow for custom event outfits that can be restored at a later date

Vars

accessoryAny clothing accessory item
backType path of item to go in back slot
backpack_contentslist of items that should go in the backpack of the user
beltType path of item to go in belt slot
boxInternals box. Will be inserted at the start of backpack_contents
chameleon_extrasextra types for chameleon outfit changes, mostly guns
earsType path of item to go in ears slot
glassesType path of item to go in the glasses slot
glovesType path of item to go in gloves slot
headType path of item to go in head slot
idType path of item to go in the idcard slot
id_trimType path of ID card trim associated with this outfit.
implantsAny implants the mob should start implanted with
internals_slotID of the slot containing a gas tank
l_handType path of item to go in the right hand
l_pocketType path of item for left pocket slot
maskType path of item to go in mask slot
nameName of the outfit (shows up in the equip admin verb)
neckType path of item to go in neck slot
preloadShould we preload some of this job's items?
r_pocketType path of item for right pocket slot
shoesType path of item to go in shoes slot
skillchipsAny skillchips the mob should have in their brain.
suitType path of item to go in suit slot
suit_storeType path of item to go in suit storage slot
undershirtAny undershirt. While on humans it is a string, here we use paths to stay consistent with the rest of the equips.
uniformType path of item to go in uniform slot

Procs

apply_fingerprintsApply a fingerprint from the passed in human to all items in the outfit
copy_fromCopy most vars from another outfit to this one
equipEquips all defined types and paths to the mob passed in
get_chameleon_disguise_infoReturn a list of all the types that are required to disguise as this outfit type
get_json_dataReturn a json list of this outfit
get_types_to_preloadReturn a list of types to pregenerate for later equipping This should not be things that do unique stuff in Initialize() based off their location, since we'll be storing them for a while
load_fromCreate an outfit datum from a list of json data
post_equipCalled after the equip proc has finished
pre_equipCalled at the start of the equip proc
save_to_filePrompt the passed in mob client to download this outfit as a json blob

Var Details

accessory

Any clothing accessory item

back

Type path of item to go in back slot

backpack_contents

list of items that should go in the backpack of the user

Format of this list should be: list(path=count,otherpath=count)

belt

Type path of item to go in belt slot

box

Internals box. Will be inserted at the start of backpack_contents

chameleon_extras

extra types for chameleon outfit changes, mostly guns

Format of this list is (typepath, typepath, typepath)

These are all added and returns in the list for get_chamelon_diguise_info proc

ears

Type path of item to go in ears slot

glasses

Type path of item to go in the glasses slot

gloves

Type path of item to go in gloves slot

head

Type path of item to go in head slot

id

Type path of item to go in the idcard slot

id_trim

Type path of ID card trim associated with this outfit.

implants

Any implants the mob should start implanted with

Format of this list is (typepath, typepath, typepath)

internals_slot

ID of the slot containing a gas tank

l_hand

Type path of item to go in the right hand

l_pocket

Type path of item for left pocket slot

mask

Type path of item to go in mask slot

name

Name of the outfit (shows up in the equip admin verb)

neck

Type path of item to go in neck slot

preload

Should we preload some of this job's items?

r_pocket

Type path of item for right pocket slot

shoes

Type path of item to go in shoes slot

skillchips

Any skillchips the mob should have in their brain.

Format of this list is (typepath, typepath, typepath)

suit

Type path of item to go in suit slot

suit_store

Type path of item to go in suit storage slot

(make sure it's valid for that suit)

undershirt

Any undershirt. While on humans it is a string, here we use paths to stay consistent with the rest of the equips.

uniform

Type path of item to go in uniform slot

Proc Details

apply_fingerprints

Apply a fingerprint from the passed in human to all items in the outfit

Used for forensics setup when the mob is first equipped at roundstart essentially calls add_fingerprint to every defined item on the human

copy_from

Copy most vars from another outfit to this one

equip

Equips all defined types and paths to the mob passed in

Extra Arguments

If visualsOnly is true, you can omit any work that doesn't visually appear on the character sprite

get_chameleon_disguise_info

Return a list of all the types that are required to disguise as this outfit type

get_json_data

Return a json list of this outfit

get_types_to_preload

Return a list of types to pregenerate for later equipping This should not be things that do unique stuff in Initialize() based off their location, since we'll be storing them for a while

load_from

Create an outfit datum from a list of json data

post_equip

Called after the equip proc has finished

All items are on the mob at this point, use this proc to toggle internals fiddle with id bindings and accesses etc

Extra Arguments

If visualsOnly is true, you can omit any work that doesn't visually appear on the character sprite

pre_equip

Called at the start of the equip proc

Override to change the value of the slots depending on client prefs, species and other such sources of change

Extra Arguments

If visualsOnly is true, you can omit any work that doesn't visually appear on the character sprite

save_to_file

Prompt the passed in mob client to download this outfit as a json blob