Outfit datums ![code/datums/outfit.dm 16](git.png)
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 | |
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 |
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 |
ears | Type path of item to go in ears slot |
ears_extra | Slot for the opposite ear. |
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 |
implants | Any implants the mob should start implanted with |
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 |
r_pocket | Type path of item for right pocket slot |
shirt | Slot for the undershirt (which is quite a foreign concept to me) or bras |
shoes | Type path of item to go in shoes slot |
socks | Slot for socks, yes, the thing that usually goes before your shoes |
suit | Type path of item to go in suit slot |
suit_store | Type path of item to go in suit storage slot |
toggle_helmet | Should the toggle helmet proc be called on the helmet during equip |
underwear | Slot for underwear like boxers and panties |
uniform | Type path of item to go in uniform slot |
wrists | Slot for the part of your arms that isn't quite hands yet. |
Procs | |
apply_fingerprints | Apply a fingerprint from the passed in human to all items in the outfit |
copy_from | Copy most vars from another outfit to this one |
equip | Equips all defined types and paths to the mob passed in |
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 |
load_from | Create an outfit datum from a list of json data |
post_equip | Called after the equip proc has finished |
pre_equip | Called at the start of the equip proc |
save_to_file | Prompt the passed in mob client to download this outfit as a json blob |
Var Details
accessory ![code/datums/outfit.dm 83](git.png)
Any clothing accessory item
back ![code/datums/outfit.dm 37](git.png)
Type path of item to go in back slot
backpack_contents ![code/datums/outfit.dm 44](git.png)
list of items that should go in the backpack of the user
Format of this list should be: list(path=count,otherpath=count)
belt ![code/datums/outfit.dm 47](git.png)
Type path of item to go in belt slot
box ![code/datums/outfit.dm 86](git.png)
Internals box. Will be inserted at the start of backpack_contents
chameleon_extras ![code/datums/outfit.dm 97](git.png)
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 ![code/datums/outfit.dm 50](git.png)
Type path of item to go in ears slot
ears_extra ![code/datums/outfit.dm 118](git.png)
Slot for the opposite ear.
glasses ![code/datums/outfit.dm 53](git.png)
Type path of item to go in the glasses slot
gloves ![code/datums/outfit.dm 56](git.png)
Type path of item to go in gloves slot
head ![code/datums/outfit.dm 59](git.png)
Type path of item to go in head slot
id ![code/datums/outfit.dm 21](git.png)
Type path of item to go in the idcard slot
implants ![code/datums/outfit.dm 104](git.png)
Any implants the mob should start implanted with
Format of this list is (typepath, typepath, typepath)
internals_slot ![code/datums/outfit.dm 108](git.png)
ID of the slot containing a gas tank
l_hand ![code/datums/outfit.dm 77](git.png)
Type path of item to go in the right hand
l_pocket ![code/datums/outfit.dm 71](git.png)
Type path of item for left pocket slot
mask ![code/datums/outfit.dm 62](git.png)
Type path of item to go in mask slot
name ![code/datums/outfit.dm 18](git.png)
Name of the outfit (shows up in the equip admin verb)
neck ![code/datums/outfit.dm 65](git.png)
Type path of item to go in neck slot
r_pocket ![code/datums/outfit.dm 74](git.png)
Type path of item for right pocket slot
shirt ![code/datums/outfit.dm 116](git.png)
Slot for the undershirt (which is quite a foreign concept to me) or bras
shoes ![code/datums/outfit.dm 68](git.png)
Type path of item to go in shoes slot
socks ![code/datums/outfit.dm 114](git.png)
Slot for socks, yes, the thing that usually goes before your shoes
suit ![code/datums/outfit.dm 27](git.png)
Type path of item to go in suit slot
suit_store ![code/datums/outfit.dm 34](git.png)
Type path of item to go in suit storage slot
(make sure it's valid for that suit)
toggle_helmet ![code/datums/outfit.dm 124](git.png)
Should the toggle helmet proc be called on the helmet during equip
underwear ![code/datums/outfit.dm 112](git.png)
Slot for underwear like boxers and panties
uniform ![code/datums/outfit.dm 24](git.png)
Type path of item to go in uniform slot
wrists ![code/datums/outfit.dm 120](git.png)
Slot for the part of your arms that isn't quite hands yet.
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
- visualsOnly true if this is only for display (in the character setup screen)
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
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
- visualsOnly true if this is only for display (in the character setup screen)
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
- visualsOnly true if this is only for display (in the character setup screen)
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