---
# System prepended metadata

title: Clothing Booth Data Entry Guide
tags: [gooncode]

---

# Clothing Booth Data Entry Guide

<style>
table, td, th, tr {
    text-align: center;
    border: none!important;
    background-color: transparent!important;
}
</style>

###### tags: `gooncode`

Thank you for volunteering to assist in the development of the clothing booth. The following is a basic explanation on how the system works on the backend, and how you can add new clothing types to the catalogue.

![image](https://hackmd.io/_uploads/SyA8ZBcYa.png)

The list of objects displayed on the clothing booth catalogue is actually a list of item groupings, and each grouping can contain any arbitrary number of items. Displaying groupings instead of each individual available items helps to condense the interface and make it easier to navigate by grouping similar articles of clothing.

All the relevant files you'll need to edit are located in `code\modules\vending\clothingbooth`.

## `clothingbooth_item` datum

The `clothingbooth_item` datum is the most basic data structure of the system, and one that is the most similar to that previously used prior to the recent rework.

All the `clothingbooth_item` types are defined in `clothingbooth_items.dm`.

Each of these contains the item's name, what slot it fits in, how much the item costs, the actual type path of the item you want to buy, and information for the colour swatch that is displayed on the purchase panel.

Some of these variables are set automatically at runtime if they aren't explicitly entered. Of the ones that can be manually overridden, the `name` variable **should only be manually edited if the item is part of a grouping with more than one item.** If left empty, the full name from the item specified in `item_paths` will be autogenerated.

### Swatch

Individual items from a larger grouping are selected by clicking one of the available swatches.

![image](https://hackmd.io/_uploads/HJRYeB5ta.png)

A swatch has three main components, the background colour, foreground shape, and foreground colour. Swatches don't render if there is only one item in a grouping.

The background colour, which defaults to an ugly shade of neon pink, should be manually set for all items in a grouping with more than one item.

Foreground shapes and colours presently have a barebones implementation as of the time of writing. To add a swatch foreground shape, the `swatch_foreground_shape` variable must be overridden with one of the defines from `_std\defines\clothingbooth.dm`. While it presently "works" for the purposes of data entry, how it looks on the front-end will be subject to change; so don't be dismayed if the output on the interface looks off.

The foreground colour should also be manually set, as it defaults to a pure black.

An example of what the final system may look like is provided below; using a solid-coloured triangle that bisects the swatch on the diagonal.

| ![thrunch](https://hackmd.io/_uploads/SkC_1S9YT.png) |
|:--:|
| ![wunch](https://hackmd.io/_uploads/BJXTJS5Y6.png) |
| *Image credit: @temthrush* |

Swatch colours should be defined as to make each one visually distinct from one another.

## `clothingbooth_grouping` datum

`clothingbooth_grouping`s are what are actually displayed on the clothing booth's catalogue. For an item to be purchaseable at the booth, it must be part of a grouping; even if that grouping only technically contains one item.

All the `clothingbooth_grouping` types are defined in `clothingbooth_grouping.dm`.

Each of these groupings is unified by the clothing slot that they fit in, and each item within the group varies by colour or some other attribute that doesn't radically depart from a central "theme". The line between what items can fit or not fit in a given grouping may be fuzzy, so when grouping items together you should make your best judgement as to make them not too granular while also not making them too broad to be useful.

For groupings with only one item, the only things you'll need to manually edit are the item paths of the `clothingbooth_item` datums that comprise the group, and the paths for the `grouping_tag` datums.

### Grouping tags

A tag is a wider box or theme that a given group can be categorised into, which is displayed on the grouping's listing on the catalogue and will eventually be useable as a search filter. 

![image](https://hackmd.io/_uploads/BJOzVHcY6.png)

All the `clothingbooth_grouping_tag` types are defined in `clothingbooth_grouping_tags.dm`.

The ones that are presently implemented encompass the various seasons (such as summer), the degree of formality (such as casual, formal, costume), and some specific sets (such as masquerade for the masquerade dresses and masks).

These tags have a display hierarchy, such that the season tags are displayed first, the formality tags are displayed after that, and then the specific set afterwards.

You are encouraged to add more `clothingbooth_grouping_tag`s at your own discretion when necessary, and an arbitrary number of them can be assigned to a group. In no circumstances should a tag be created for only a single grouping.

## Additional tips

* When porting clothing booth items from the old system, it is prudent to verify that the cost of the given item is identical to what it was previously as the process has been entirely manual thus far.