/tg/ Station 13 - Modules - Types — Var Details - Proc Details

spraycan

Vars

direct_color_typesTypes which use their color var for additional logic, so we need to avoid using transition filters on them.
graffiti_armedWhat a click on a wall, a floor, a full-tile window or a poster paints: null for the stencil, "freehand" for a live editor on it, "unfinished" for the Unfinished slot's piece, or a library piece's id.
graffiti_sent_revisionThe graffiti library revision the window's static data last carried, or 0 while it carries none.
graffiti_tabThe window's tab: "stencils" or "graffiti".

Procs

examineAdds what an armed can paints to its examine. Only its holder, whose library the armed piece is from, sees it named.
graffiti_armed_nameReturns the name of the piece the can is armed with, from the library of the player holding it.
graffiti_enabledWhether the can paints custom graffiti: every spray can that paints, but not the hellcan, lubecan or mimecan.
graffiti_open_editorSwaps the can's window for a graffiti editor, which reuses its place on screen.
graffiti_reopenOpens the can's window on a tab, as a graffiti editor hands back to it.
ui_actHandles the Custom Graffiti tab's actions, after the crayon's own. Picking a stencil also clears what the can was set to paint.
ui_dataAdds the can's graffiti state to the window's data.
ui_interactOpens the window, or refreshes the open one. Opening it afresh clears what the can was set to paint. A refresh after the player's graffiti library changed sends the static data too, which carries the library, while its tab is open.
ui_static_dataAdds the player's graffiti library to the window's static data while the Custom Graffiti tab is open, and only then: 50 pieces' thumbnails take 40 KB as typical art and up to 1.5 MB as adversarial art, which a window open on the stencils would carry for nothing. It is sent again once the library changes or the tab opens.
use_onPaints with an armed can. A click on an adjacent wall or floor, a full-tile window fastened down, or graffiti on one, on the static station (graffiti_static_station(), else "can't paint here!" and the can stays armed), opens a freehand session there, continues a freehand draft on its own tile, or starts a paint job of the armed piece. A session that starts uses the arming up, and a job keeps it. An Unfinished piece whose paint still shows goes on only there: a click on another surface is refused ("wrong wall!") and starts no cooldown. Each attempt waits out GRAFFITI_START_COOLDOWN from the last, refused or not, and is refused before any costly work: by an empty can, a paint job already running, or a two-tile piece without a surface like this one to the right. A two-tile piece that paints nothing on its right tile paints one tile. A click on a poster that isn't ripped paints over the poster itself, one painter at a time, and only on its own pixels; it takes no two-tile piece ("too wide!"), and nothing resumes there. A click on anything else clears the arming and sprays as usual, as does an unarmed can, which tints a window or a poster.

Var Details

direct_color_types

Types which use their color var for additional logic, so we need to avoid using transition filters on them.

graffiti_armed

What a click on a wall, a floor, a full-tile window or a poster paints: null for the stencil, "freehand" for a live editor on it, "unfinished" for the Unfinished slot's piece, or a library piece's id.

graffiti_sent_revision

The graffiti library revision the window's static data last carried, or 0 while it carries none.

graffiti_tab

The window's tab: "stencils" or "graffiti".

Proc Details

examine

Adds what an armed can paints to its examine. Only its holder, whose library the armed piece is from, sees it named.

Arguments:

Returns:

graffiti_armed_name

Returns the name of the piece the can is armed with, from the library of the player holding it.

Arguments:

Returns:

graffiti_enabled

Whether the can paints custom graffiti: every spray can that paints, but not the hellcan, lubecan or mimecan.

Returns:

graffiti_open_editor

Swaps the can's window for a graffiti editor, which reuses its place on screen.

Arguments:

graffiti_reopen

Opens the can's window on a tab, as a graffiti editor hands back to it.

Arguments:

ui_act

Handles the Custom Graffiti tab's actions, after the crayon's own. Picking a stencil also clears what the can was set to paint.

Arguments:

Returns:

ui_data

Adds the can's graffiti state to the window's data.

Arguments:

Returns:

ui_interact

Opens the window, or refreshes the open one. Opening it afresh clears what the can was set to paint. A refresh after the player's graffiti library changed sends the static data too, which carries the library, while its tab is open.

Arguments:

ui_static_data

Adds the player's graffiti library to the window's static data while the Custom Graffiti tab is open, and only then: 50 pieces' thumbnails take 40 KB as typical art and up to 1.5 MB as adversarial art, which a window open on the stencils would carry for nothing. It is sent again once the library changes or the tab opens.

Arguments:

Returns:

use_on

Paints with an armed can. A click on an adjacent wall or floor, a full-tile window fastened down, or graffiti on one, on the static station (graffiti_static_station(), else "can't paint here!" and the can stays armed), opens a freehand session there, continues a freehand draft on its own tile, or starts a paint job of the armed piece. A session that starts uses the arming up, and a job keeps it. An Unfinished piece whose paint still shows goes on only there: a click on another surface is refused ("wrong wall!") and starts no cooldown. Each attempt waits out GRAFFITI_START_COOLDOWN from the last, refused or not, and is refused before any costly work: by an empty can, a paint job already running, or a two-tile piece without a surface like this one to the right. A two-tile piece that paints nothing on its right tile paints one tile. A click on a poster that isn't ripped paints over the poster itself, one painter at a time, and only on its own pixels; it takes no two-tile piece ("too wide!"), and nothing resumes there. A click on anything else clears the arming and sprays as usual, as does an unarmed can, which tints a window or a poster.

Arguments:

Returns: