34 lines
20 KiB
HTML
34 lines
20 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/outfit - /tg/ Station 13</title></head><body><header><a href="index.html">/tg/ Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a> — <a href="datum/outfit.html#var">Var Details</a> - <a href="datum/outfit.html#proc">Proc Details</a></header><main><h1>Outfit datums <aside>/<a href="datum.html">datum</a>/<a href="datum/outfit.html">outfit</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L16"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 16"></a></h1><p>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.</p>
|
||
<p>You can also specify an outfit datum on a job to have it auto equipped to the mob on join</p>
|
||
<p>/mob/living/carbon/human/proc/equipOutfit(outfit) is the mob level proc to equip an outfit
|
||
and you pass it the relevant datum outfit</p>
|
||
<p>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</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/outfit.html#var/accessory">accessory</a></th><td>Any clothing accessory item</td></tr><tr><th><a href="datum/outfit.html#var/back">back</a></th><td>Type path of item to go in back slot</td></tr><tr><th><a href="datum/outfit.html#var/backpack_contents">backpack_contents</a></th><td>list of items that should go in the backpack of the user</td></tr><tr><th><a href="datum/outfit.html#var/belt">belt</a></th><td>Type path of item to go in belt slot</td></tr><tr><th><a href="datum/outfit.html#var/box">box</a></th><td>Internals box. Will be inserted at the start of backpack_contents</td></tr><tr><th><a href="datum/outfit.html#var/chameleon_extras">chameleon_extras</a></th><td>extra types for chameleon outfit changes, mostly guns</td></tr><tr><th><a href="datum/outfit.html#var/ears">ears</a></th><td>Type path of item to go in ears slot</td></tr><tr><th><a href="datum/outfit.html#var/glasses">glasses</a></th><td>Type path of item to go in the glasses slot</td></tr><tr><th><a href="datum/outfit.html#var/gloves">gloves</a></th><td>Type path of item to go in gloves slot</td></tr><tr><th><a href="datum/outfit.html#var/head">head</a></th><td>Type path of item to go in head slot</td></tr><tr><th><a href="datum/outfit.html#var/id">id</a></th><td>Type path of item to go in the idcard slot</td></tr><tr><th><a href="datum/outfit.html#var/implants">implants</a></th><td>Any implants the mob should start implanted with</td></tr><tr><th><a href="datum/outfit.html#var/internals_slot">internals_slot</a></th><td>ID of the slot containing a gas tank</td></tr><tr><th><a href="datum/outfit.html#var/l_hand">l_hand</a></th><td>Type path of item to go in the right hand</td></tr><tr><th><a href="datum/outfit.html#var/l_pocket">l_pocket</a></th><td>Type path of item for left pocket slot</td></tr><tr><th><a href="datum/outfit.html#var/mask">mask</a></th><td>Type path of item to go in mask slot</td></tr><tr><th><a href="datum/outfit.html#var/name">name</a></th><td>Name of the outfit (shows up in the equip admin verb)</td></tr><tr><th><a href="datum/outfit.html#var/neck">neck</a></th><td>Type path of item to go in neck slot</td></tr><tr><th><a href="datum/outfit.html#var/r_pocket">r_pocket</a></th><td>Type path of item for right pocket slot</td></tr><tr><th><a href="datum/outfit.html#var/shoes">shoes</a></th><td>Type path of item to go in shoes slot</td></tr><tr><th><a href="datum/outfit.html#var/suit">suit</a></th><td>Type path of item to go in suit slot</td></tr><tr><th><a href="datum/outfit.html#var/suit_store">suit_store</a></th><td>Type path of item to go in suit storage slot</td></tr><tr><th><a href="datum/outfit.html#var/toggle_helmet">toggle_helmet</a></th><td>Should the toggle helmet proc be called on the helmet during equip</td></tr><tr><th><a href="datum/outfit.html#var/undershirt">undershirt</a></th><td>Any undershirt. While on humans it is a string, here we use paths to stay consistent with the rest of the equips.</td></tr><tr><th><a href="datum/outfit.html#var/uniform">uniform</a></th><td>Type path of item to go in uniform slot</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/outfit.html#proc/apply_fingerprints">apply_fingerprints</a></th><td>Apply a fingerprint from the passed in human to all items in the outfit</td></tr><tr><th><a href="datum/outfit.html#proc/copy_from">copy_from</a></th><td>Copy most vars from another outfit to this one</td></tr><tr><th><a href="datum/outfit.html#proc/equip">equip</a></th><td>Equips all defined types and paths to the mob passed in</td></tr><tr><th><a href="datum/outfit.html#proc/get_chameleon_disguise_info">get_chameleon_disguise_info</a></th><td>Return a list of all the types that are required to disguise as this outfit type</td></tr><tr><th><a href="datum/outfit.html#proc/get_json_data">get_json_data</a></th><td>Return a json list of this outfit</td></tr><tr><th><a href="datum/outfit.html#proc/load_from">load_from</a></th><td>Create an outfit datum from a list of json data</td></tr><tr><th><a href="datum/outfit.html#proc/post_equip">post_equip</a></th><td>Called after the equip proc has finished</td></tr><tr><th><a href="datum/outfit.html#proc/pre_equip">pre_equip</a></th><td>Called at the start of the equip proc</td></tr><tr><th><a href="datum/outfit.html#proc/save_to_file">save_to_file</a></th><td>Prompt the passed in mob client to download this outfit as a json blob</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/accessory"><aside class="declaration">var </aside>accessory <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L83"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 83"></a></h3><p>Any clothing accessory item</p><h3 id="var/back"><aside class="declaration">var </aside>back <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L37"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 37"></a></h3><p>Type path of item to go in back slot</p><h3 id="var/backpack_contents"><aside class="declaration">var </aside>backpack_contents <aside>– /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L44"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 44"></a></h3><p>list of items that should go in the backpack of the user</p>
|
||
<p>Format of this list should be: list(path=count,otherpath=count)</p><h3 id="var/belt"><aside class="declaration">var </aside>belt <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L47"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 47"></a></h3><p>Type path of item to go in belt slot</p><h3 id="var/box"><aside class="declaration">var </aside>box <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L86"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 86"></a></h3><p>Internals box. Will be inserted at the start of backpack_contents</p><h3 id="var/chameleon_extras"><aside class="declaration">var </aside>chameleon_extras <aside>– /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L95"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 95"></a></h3><p>extra types for chameleon outfit changes, mostly guns</p>
|
||
<p>Format of this list is (typepath, typepath, typepath)</p>
|
||
<p>These are all added and returns in the list for get_chamelon_diguise_info proc</p><h3 id="var/ears"><aside class="declaration">var </aside>ears <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L50"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 50"></a></h3><p>Type path of item to go in ears slot</p><h3 id="var/glasses"><aside class="declaration">var </aside>glasses <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L53"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 53"></a></h3><p>Type path of item to go in the glasses slot</p><h3 id="var/gloves"><aside class="declaration">var </aside>gloves <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L56"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 56"></a></h3><p>Type path of item to go in gloves slot</p><h3 id="var/head"><aside class="declaration">var </aside>head <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L59"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 59"></a></h3><p>Type path of item to go in head slot</p><h3 id="var/id"><aside class="declaration">var </aside>id <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L21"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 21"></a></h3><p>Type path of item to go in the idcard slot</p><h3 id="var/implants"><aside class="declaration">var </aside>implants <aside>– /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L102"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 102"></a></h3><p>Any implants the mob should start implanted with</p>
|
||
<p>Format of this list is (typepath, typepath, typepath)</p><h3 id="var/internals_slot"><aside class="declaration">var </aside>internals_slot <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L105"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 105"></a></h3><p>ID of the slot containing a gas tank</p><h3 id="var/l_hand"><aside class="declaration">var </aside>l_hand <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L77"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 77"></a></h3><p>Type path of item to go in the right hand</p><h3 id="var/l_pocket"><aside class="declaration">var </aside>l_pocket <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L71"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 71"></a></h3><p>Type path of item for left pocket slot</p><h3 id="var/mask"><aside class="declaration">var </aside>mask <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L62"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 62"></a></h3><p>Type path of item to go in mask slot</p><h3 id="var/name"><aside class="declaration">var </aside>name <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L18"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 18"></a></h3><p>Name of the outfit (shows up in the equip admin verb)</p><h3 id="var/neck"><aside class="declaration">var </aside>neck <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L65"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 65"></a></h3><p>Type path of item to go in neck slot</p><h3 id="var/r_pocket"><aside class="declaration">var </aside>r_pocket <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L74"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 74"></a></h3><p>Type path of item for right pocket slot</p><h3 id="var/shoes"><aside class="declaration">var </aside>shoes <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L68"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 68"></a></h3><p>Type path of item to go in shoes slot</p><h3 id="var/suit"><aside class="declaration">var </aside>suit <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L27"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 27"></a></h3><p>Type path of item to go in suit slot</p><h3 id="var/suit_store"><aside class="declaration">var </aside>suit_store <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L34"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 34"></a></h3><p>Type path of item to go in suit storage slot</p>
|
||
<p>(make sure it's valid for that suit)</p><h3 id="var/toggle_helmet"><aside class="declaration">var </aside>toggle_helmet <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L108"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 108"></a></h3><p>Should the toggle helmet proc be called on the helmet during equip</p><h3 id="var/undershirt"><aside class="declaration">var </aside>undershirt <aside>– /<a href="datum.html">datum</a>/sprite_accessory</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L111"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 111"></a></h3><p>Any undershirt. While on humans it is a string, here we use paths to stay consistent with the rest of the equips.</p><h3 id="var/uniform"><aside class="declaration">var </aside>uniform <aside>– </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L24"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 24"></a></h3><p>Type path of item to go in uniform slot</p><h2 id="proc">Proc Details</h2><h3 id="proc/apply_fingerprints"><aside class="declaration">proc </aside>apply_fingerprints<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/carbon.html">carbon</a>/<a href="mob/living/carbon/human.html">human</a>/H) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L242"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 242"></a></aside></h3><p>Apply a fingerprint from the passed in human to all items in the outfit</p>
|
||
<p>Used for forensics setup when the mob is first equipped at roundstart
|
||
essentially calls add_fingerprint to every defined item on the human</p><h3 id="proc/copy_from"><aside class="declaration">proc </aside>copy_from<aside>(/<a href="datum.html">datum</a>/<a href="datum/outfit.html">outfit</a>/target) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L320"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 320"></a></aside></h3><p>Copy most vars from another outfit to this one</p><h3 id="proc/equip"><aside class="declaration">proc </aside>equip<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/carbon.html">carbon</a>/<a href="mob/living/carbon/human.html">human</a>/H, visualsOnly, /<a href="client.html">client</a>/preference_source) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L151"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 151"></a></aside></h3><p>Equips all defined types and paths to the mob passed in</p>
|
||
<p>Extra Arguments</p>
|
||
<ul>
|
||
<li>visualsOnly true if this is only for display (in the character setup screen)</li>
|
||
</ul>
|
||
<p>If visualsOnly is true, you can omit any work that doesn't visually appear on the character sprite</p><h3 id="proc/get_chameleon_disguise_info"><aside class="declaration">proc </aside>get_chameleon_disguise_info<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L284"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 284"></a></aside></h3><p>Return a list of all the types that are required to disguise as this outfit type</p><h3 id="proc/get_json_data"><aside class="declaration">proc </aside>get_json_data<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L291"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 291"></a></aside></h3><p>Return a json list of this outfit</p><h3 id="proc/load_from"><aside class="declaration">proc </aside>load_from<aside>(/list/outfit_data) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L357"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 357"></a></aside></h3><p>Create an outfit datum from a list of json data</p><h3 id="proc/post_equip"><aside class="declaration">proc </aside>post_equip<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/carbon.html">carbon</a>/<a href="mob/living/carbon/human.html">human</a>/H, visualsOnly, /<a href="client.html">client</a>/preference_source) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L139"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 139"></a></aside></h3><p>Called after the equip proc has finished</p>
|
||
<p>All items are on the mob at this point, use this proc to toggle internals
|
||
fiddle with id bindings and accesses etc</p>
|
||
<p>Extra Arguments</p>
|
||
<ul>
|
||
<li>visualsOnly true if this is only for display (in the character setup screen)</li>
|
||
</ul>
|
||
<p>If visualsOnly is true, you can omit any work that doesn't visually appear on the character sprite</p><h3 id="proc/pre_equip"><aside class="declaration">proc </aside>pre_equip<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/<a href="mob/living/carbon.html">carbon</a>/<a href="mob/living/carbon/human.html">human</a>/H, visualsOnly, /<a href="client.html">client</a>/preference_source) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L124"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 124"></a></aside></h3><p>Called at the start of the equip proc</p>
|
||
<p>Override to change the value of the slots depending on client prefs, species and
|
||
other such sources of change</p>
|
||
<p>Extra Arguments</p>
|
||
<ul>
|
||
<li>visualsOnly true if this is only for display (in the character setup screen)</li>
|
||
</ul>
|
||
<p>If visualsOnly is true, you can omit any work that doesn't visually appear on the character sprite</p><h3 id="proc/save_to_file"><aside class="declaration">proc </aside>save_to_file<aside>(/<a href="mob.html">mob</a>/admin) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/outfit.dm#L347"><img src="git.png" width="16" height="16" title="code/datums/outfit.dm 347"></a></aside></h3><p>Prompt the passed in mob client to download this outfit as a json blob</p></main><footer>tgstation.dme <a href="https://github.com/evilew/GS13-Citadel/tree/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e">e8e0068</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.9.0</a></footer></body></html> |