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

custom_sprite_editor

The hair editor's appendage layers and Try on hat. One draft and its window. This base type is the character preferences context: it is bound to its owner, slot and saved drawing, and saves to the character.

Other contexts, such as the salon, reuse the same workspace, tools, palette, history, blending, preview renderer, import and export by overriding the context hooks below. The editor's deferred work, stroke queue and pacing.

Vars

base_copy_colorsThe colours the last finished copy handed out: the only new colours pasting it may add to the palette.
base_copy_frameRows of colour strings of one view of the native base, as render_base_copy_frame() drew it. Reused while base_copy_frame_key matches.
base_copy_frame_keyWhat base_copy_frame was drawn from: the guide look, the view and the canvas size.
base_copy_requestThe validated copy request waiting for deferred work, tagged with the base look it was made on; null when none waits.
base_copy_tokenThe window's request number of the last finished copy. Pasting it must quote this and this editor's ref.
base_copy_uiWeak reference to the tgui window that asked for base_copy_request, which the result is sent to.
body_requestsRebuilds that asked for a new body so far, so a body built for an older request is rebuilt.
can_restore_previousWhether a previous saved style differs from the draft, as of the last preview refresh or save.
candidateAn import or restoration waiting for the owner to confirm its preview.
candidate_cacheCandidate key -> its four previews, kept while the resources they were drawn on last. Restoring the same style twice draws nothing.
closingPrevents actions and duplicate saves during teardown.
color_modeBrush blending mode: literal, hair, mutant or tint.
contextSelects preferences or salon actions and window wording.
cover_keyWhat cover_looks were built from, so their rows come from the shared cache.
cover_looksHair and parts drawn over the body, captured with the guide, lowest layer first. Paint under them is hidden in game.
cover_rowsDirection -> 32 row strings marking which of cover_looks covers each canvas pixel.
custom_tintChosen multiplier for Blend with color; white has no effect.
draft_revisionIncrements on every draft change. Dialogs that yield compare it before changing anything.
focus_layerAn appendage layer id the window switches to on its next update, after adding or copying one.
glow_recipesDirection -> the iconforge recipe of each view's glow, from one walk of preview_appearance's emissive overlays, or null when nothing in it glows; see glow.dm.
glow_recipes_forThe preview look glow_recipes were walked from.
glow_urlsDirection -> the glow of that view's preview picture, drawn only with the lights off: a data URL, or "" when nothing in the view glows. A view has none until its glow is drawn, and loses it when its picture is drawn again.
guide_appearanceThe guide's look as the last rebuild captured it.
guide_iconsDirection -> native guide icon for the eyedropper, drawn the first time it's wanted; see guide_icon().
guide_liftWhere the hair guide's window sits, list(x, z) pixels from the tile: where custom hair paint is drawn, lifted with its hairstyle.
guide_paletteEyedropper colors retained as literal palette choices.
guide_recipesDirection -> the iconforge recipe each guide picture was drawn from.
guide_urlsDirection -> private guide image sent to the editor.
guides_drawn_forThe guide look the guide pictures were drawn from. All four views are drawn together.
hide_partsWhether hair and parts that hang over the drawing are left out of the guide. Previews always show them.
hide_underwearWhether underwear is left out of guides and previews.
lights_offWhether the window has its preview's lights off, so previews come with what glows in them.
notice_revisionCounts notify() calls, so the window shows each notice for a moment, even one that repeats the last.
own_pacePaces this editor's costly work when there are no preferences to share a player's pace with.
pending_bodyThe body a deferred rebuild built in its first fire; the window keeps the old resources until the second swaps it in.
pending_body_forThe body_requests count pending_body was built for.
pending_body_readyWhether pending_body was built (it may be null when the context has no body right now).
pending_hairstyleA base hairstyle picked while the last change settled, applied when its window ends.
pending_workCUSTOM_SPRITE_WORK_* flags waiting for SScustom_sprite_work.
picture_nameWhat this editor's pictures are kept under; see custom_sprite_draw_recipes().
preferencesSupplies Custom swatches. In the preferences context it is also the saved character.
preview_appearanceThe previewed look for preview_hash.
preview_bodyPrivate dummy used to build guides and previews; released on close.
preview_hashAppearance identity of the last rendered preview.
preview_heightCanvas height previews are drawn at: taller for the tall hair canvas.
preview_recipesDirection -> the iconforge recipe of each view of preview_appearance, from one walk.
preview_recipes_forThe preview look preview_recipes were walked from.
preview_timerPending preview debounce timer, cancelled when the editor closes.
preview_urlsDirection -> private preview image sent to the editor.
preview_widthCanvas width previews are drawn at.
resources_hairThe hair look the current guides and palette were built from.
resources_markingsThe native markings the current guides and sampled palette were built from.
resources_readyWhether guide geometry and images are available for this draft.
sampled_paletteColors sampled from the current hair or native markings.
save_errorFailure message from the last attempted save.
save_revisionSuccessful save counter used for the UI's acknowledgement flash.
saved_draft_revisionThe draft revision the last Ctrl+S wrote, so saving an unchanged draft again does no work.
selected_colorEffective brush color after any Custom color blending.
selected_custom_colorOriginal Custom swatch, retained when blended colors coincide.
selection_framesTemporary preview-only frames: every view of selection_layer, the placement on one. The workspace, history, saves and exports never read these.
selection_layerThe layer selection_frames stand in for.
selection_requestAt most one bounded compact selection placement, waiting for the ordinary preview debounce.
sessionOptional salon owner; the context stays salon even after this session is detached.
show_gradientWhether guides, previews and the sampled palette include the base look's gradient.
slotCharacter slot bound when this editor opened.
stale_guidesDirection -> TRUE for views whose guide, or its cover rows, predate the last rebuild.
stale_previewsDirection -> TRUE for views whose preview predates preview_hash.
static_dirtyGuides, the draw mask or the region map changed since the window last received static data.
stroke_noticeWhy the latest stroke was refused, shown quietly until the queue drains.
stroke_queueStrokes over the budget, oldest first, applied by the subsystem.
targetDrawing kind: hair, facial_hair or markings. Also this editor's key in the preferences editor registry.
transfer_errorSafe import or export failure message for the owner.
transfer_noticeA passing message for the owner, such as an import or export finishing. Set through notify().
try_onThe Try on hat the window shows while an appendage layer is chosen, or null. Only previews wear it.
unlocked_boundsDrawing bounds as the body allows them, before any views are locked.
visible_directionThe view the window shows.
workspaceEditable pixels, palette and undo history for this draft.

Procs

act_blockedWhether an action has to wait. A previous saved style is previewed only when the player's pace allows, and never while a preview is already waiting for an answer.
adopt_previewTakes a newly captured preview look: the visible view is drawn now, the others in the next fire.
appendage_actAdds, removes, renames, moves or copies one of the hair's appendage layers, as an undoable step. Everything the window names is checked first: the layer by id, the zone, the kind, the name.
appendage_ui_dataThe hair's appendage layers as the window lists them, in order.
apply_candidateReplaces the draft with the confirmed candidate as one undoable action. A canvas that has to change size for it starts its history over.
apply_draft_base_markingsContext hook: puts the draft's native base markings on the preview body. Only the markings editor has any.
apply_hair_contextSwaps the base hair look under the drawing as one undoable action.
apply_hairstylePuts a base hairstyle on the draft, if the draft can still take it.
apply_pending_hairstyleApplies a hairstyle that was waiting, when its window ends or before anything else the window does.
apply_selection_previewChecks exactly the placement a real drop would accept, on the layer it names, but writes only a copy of that one view.
available_hairstylesHairstyles this character may pick from the editor's own base-hair control.
base_copy_colors_fitExisting multi-region colors remain usable; only new colors need room in the shared admission pool.
base_copy_contextThe rendered base settings, captured with a request to reject work made stale by a later change.
base_copy_originHair pixels use the same movable origin as its guide; markings override this with body coordinates.
base_copy_placement_validRegional editors additionally check that this placement still fits every affected region's saved palette.
base_copy_readyWhether the resource snapshot still matches the current base settings.
begin_importImports a style file into a confirmable preview. Sleeps while the file dialog is open.
bring_to_frontBrings the open window in front of the player's other windows.
build_base_copyReturn one selected base frame as palette indexes; body, beard and custom paint are never sampled.
can_change_hairContext hook: whether this context may change the base hair look from inside the editor.
can_editWhether this user may act on this editor right now: its owner, on the slot it opened for, with editing enabled.
can_hide_partsMarkings can hide parts that cover the body; hair editors always keep the full look visible.
can_hide_underwearContext hook: whether underwear can be left out of guides and previews.
candidate_keyWhat a candidate's previews depend on: its drawing and base look, and the body they're drawn on.
candidate_previewsContext hook: all four views of the preview body wearing the waiting candidate.
candidate_problemReturns why a package can't replace this draft, or null when it can.
capture_guideCaptures the guide's look from the prepared preview body and draws its pictures.
capture_previewPuts a drawing on the preview body and captures how it looks, to draw.
clear_selection_previewDrops the temporary picture on cancellation, a new gesture, a draft edit or changed body, view or region locks.
context_actContext hook: extra actions owned by the context.
context_ui_dataContext hook: extra window data owned by the context.
costly_work_dueWhether this editor's deferred work would build or rebuild something now, costing tens of milliseconds.
costly_work_waitsA rebuild's drawing goes on the turn after its body and never waits: a body left waiting is thrown away for a change after it.
cover_rows_forContext hook: one view's cover rows, read inside the view's own box before any lock so an unlocked view is right at once.
create_preview_bodyContext hook: a private body showing the appearance being drawn on, or null when unavailable.
create_workspaceContext hook: the draft's workspace, built from the starting package.
current_packageThe draft as a style package.
custom_palette_tintBrush effects are editor state, never a mutation of existing drawing pixels.
default_marking_colorA new base marking's starting color, from the body being drawn on rather than the setup preview.
draft_changedContext hook: called after every change to the draft.
draft_editedMarks the draft changed and schedules its debounced preview, as every window edit does.
drain_strokesApplies waiting strokes in order until the tick runs short, at least one per call, then sends the window everything that waited for them. Returns whether the queue is empty.
draw_glowsDraws the glow of each of these views' preview pictures that has none yet, for the window's lights-off view. A view whose picture is about to be drawn again waits for it, so a picture and its glow always show the same look.
draw_previewsDraws these views of the preview from its walk, and their glows with the lights off.
draw_waiting_viewsDeferred work: every view the window may turn to next that isn't ready, its guide's cover rows, its preview and, with the lights off, its glow, so turning draws nothing.
drop_pending_bodyThrows a body built for an older request away.
edit_custom_palette_colorReplaces one saved Custom swatch with another color, keeping its place in the palette.
editor_actHook: actions a subtype handles itself, after the shared checks. Returns null for actions it leaves to the base.
emissives_allowedContext hook: whether this destination may use emissive paint.
finishCloses the editor, saving first when asked; a failed save keeps it open.
finish_base_copyFinish at the normal costly-work pace; recheck the owner, locks and captured look after waiting.
glow_recipeOne view's glow as an iconforge recipe, or null when nothing in it glows: the emissive overlays of the look its preview was drawn from.
guide_iconOne view's guide as a native icon, for the eyedropper, read from its picture the first time it's wanted.
hair_context_problemContext hook: why an imported hair look can't be used here, or null.
hairstyle_iconsCached preference icon classes for exactly the styles the editor already offers.
hide_obstructing_partsTakes wings, tails and other parts that hang over the limb off the preview body while the guide is drawn.
initial_packageContext hook: the package the draft starts from.
keep_only_strokesDrops every kind of waiting work but strokes, which still apply after the window closes.
locked_directionsContext hook: views that can't be painted right now, beyond the drawing's own bounds.
notifyShows the owner a passing message in the window's status line.
paceThe pace this editor's costly work shares with the rest of its player's editors.
prepare_base_copy_pasteAdmit only colors sampled by this editor; the existing move parser still validates every placed pixel.
preview_receivedPreviews a received style file. Returns FALSE with transfer_error saying why it can't replace this draft.
publish_pictureA drawn picture's PNG as the data URL the window shows.
pushSends the window an update, unless strokes are still waiting: their drain sends it instead, so no update shows frames without them.
push_static_dataSends static data a partial update found changed. Runs a tick later, so the payload being built isn't re-entered.
queue_selection_previewFloating paint is previewed at the end of a gesture; no pointer moves or unvalidated pixels reach the renderer.
rebuild_for_openingRebuilds resources for a window being opened, unless that would come too soon after the last rebuild.
rebuild_resourcesRebuilds the preview body, guides, sampled palette and drawing bounds.
refresh_custom_paletteRebuilds the paintable palette from the draft, the sampled shades and the Custom swatches, keeping the brush valid.
refresh_previewTimer callbacks push immediately; synchronous UI actions let TGUI send their single final update.
release_resourcesDrops the guides and previews built from the preview body. The draft can outlive its window, but temporary paint doesn't.
render_appearanceContext hook: the appearance guides and previews render, and any extra overlays to add.
render_base_copy_frameOne native base hair frame; the markings editor overrides only this sampling step.
render_candidateDraws the waiting candidate's previews and caches them. The body then shows the draft again.
render_guideReadies one view of the guide the last rebuild captured: every view's picture, drawn together from one walk if they predate the capture, and this view's cover rows. The other views' cover rows follow in the next fire. Guides are static data, so the window needs a full update afterwards.
render_overlaysContext hook: worn overlays to add to guides and previews. Character setup adds none.
render_previewDraws one view of the preview captured for preview_hash, walking the look once for every view. The others it leaves stale are drawn from the same walk in the next fire, so the action pays for one picture.
render_previewsAll four views' data URLs of the preview body wearing a drawing, for import and restore previews.
request_base_copyCopy requests use the existing deferred work queue and never change paint, history or saves.
request_base_copy_workQueue one bounded base-layer copy without adding work to ordinary paint.
request_candidateAsks for the waiting candidate's previews to be drawn in the background.
request_hairstylePicks a base hairstyle. A change applies at once; ones picked in the moments after it wait for CUSTOM_SPRITE_HAIRSTYLE_WINDOW and apply together as the latest pick, so a burst of picks lands at most twice and never on the styles in between, such as a tall canvas or lifted hair it would grow into and straight out of. The window shows the latest pick throughout.
request_other_viewsAsks for the views the window isn't showing to be readied in the background.
request_rebuildRebuilds resources and the preview once a burst of changes settles, instead of inside the action.
request_refreshThe preview debounce's callback: the refresh runs as deferred work.
request_viewShows the visible view, drawing its stale guide or preview afterwards rather than inside the action.
request_workAsks SScustom_sprite_work for work. Whatever the draft holds when it runs is what gets drawn.
resize_canvasMoves the draft onto the canvas height its paint and base look ask for, such as the tall hair canvas, with the paint kept where it sits on the head.
restorable_packageThe previous saved style, or null when the draft already is that style.
run_deferred_workDoes this editor's deferred work and sends the window what changed.
sample_guidePrefer current paint over the retained native guide, including strokes newer than the browser's view.
sample_marking_paletteThe markings palette: the body's mutant colors, then its native marking shades tinted by each, up to 15 colors.
sample_marking_shadesShades sampled from the first native marking the preview body draws.
save_drawingSaves the draft to the character. Returns FALSE with save_error set when it couldn't.
save_unchangedWhether Ctrl+S would write exactly what the last one did. It's still acknowledged, so the window flashes Saved.
set_appendage_emissiveTurns one appendage layer's glow on or off for a view, like the hair's own setting. Returns whether it changed.
set_custom_paletteAccount colors save immediately; discarding a character drawing does not discard its palette.
set_try_onPuts a Try on hat on the previews, or takes it off. Previews follow after the usual pause, as they do edits.
show_candidateRecords an import or restoration for confirmation. Its previews are drawn in the background, or taken from the cache.
sync_locked_viewsApplies the context's current view locks to the drawing bounds.
take_strokeTakes a stroke from the window: applied at once within the player's budget, else queued for the subsystem, else refused once the queue is full. Returns whether the window should update now.
transformed_custom_paletteThe account's Custom swatches after the current blending mode.
ui_closeClosing keeps the unsaved draft and its history; only saving writes. Preview resources are rebuilt on reopening.
update_draw_areaContext hook: sets a markings draft's drawing bounds and mask from the preview body.
update_restorableWorks out whether Restore previous saved style is offered. Runs with the debounced preview and after saves, not on every window update.
validated_base_copyValidate a bounded selection envelope before retaining it or reading any pixels.
window_titleContext hook: the window's title. BYOND shows it until the interface draws its own, so the two match.

Var Details

base_copy_colors

The colours the last finished copy handed out: the only new colours pasting it may add to the palette.

base_copy_frame

Rows of colour strings of one view of the native base, as render_base_copy_frame() drew it. Reused while base_copy_frame_key matches.

base_copy_frame_key

What base_copy_frame was drawn from: the guide look, the view and the canvas size.

base_copy_request

The validated copy request waiting for deferred work, tagged with the base look it was made on; null when none waits.

base_copy_token

The window's request number of the last finished copy. Pasting it must quote this and this editor's ref.

base_copy_ui

Weak reference to the tgui window that asked for base_copy_request, which the result is sent to.

body_requests

Rebuilds that asked for a new body so far, so a body built for an older request is rebuilt.

can_restore_previous

Whether a previous saved style differs from the draft, as of the last preview refresh or save.

candidate

An import or restoration waiting for the owner to confirm its preview.

candidate_cache

Candidate key -> its four previews, kept while the resources they were drawn on last. Restoring the same style twice draws nothing.

closing

Prevents actions and duplicate saves during teardown.

color_mode

Brush blending mode: literal, hair, mutant or tint.

context

Selects preferences or salon actions and window wording.

cover_key

What cover_looks were built from, so their rows come from the shared cache.

cover_looks

Hair and parts drawn over the body, captured with the guide, lowest layer first. Paint under them is hidden in game.

cover_rows

Direction -> 32 row strings marking which of cover_looks covers each canvas pixel.

custom_tint

Chosen multiplier for Blend with color; white has no effect.

draft_revision

Increments on every draft change. Dialogs that yield compare it before changing anything.

focus_layer

An appendage layer id the window switches to on its next update, after adding or copying one.

glow_recipes

Direction -> the iconforge recipe of each view's glow, from one walk of preview_appearance's emissive overlays, or null when nothing in it glows; see glow.dm.

glow_recipes_for

The preview look glow_recipes were walked from.

glow_urls

Direction -> the glow of that view's preview picture, drawn only with the lights off: a data URL, or "" when nothing in the view glows. A view has none until its glow is drawn, and loses it when its picture is drawn again.

guide_appearance

The guide's look as the last rebuild captured it.

guide_icons

Direction -> native guide icon for the eyedropper, drawn the first time it's wanted; see guide_icon().

guide_lift

Where the hair guide's window sits, list(x, z) pixels from the tile: where custom hair paint is drawn, lifted with its hairstyle.

guide_palette

Eyedropper colors retained as literal palette choices.

guide_recipes

Direction -> the iconforge recipe each guide picture was drawn from.

guide_urls

Direction -> private guide image sent to the editor.

guides_drawn_for

The guide look the guide pictures were drawn from. All four views are drawn together.

hide_parts

Whether hair and parts that hang over the drawing are left out of the guide. Previews always show them.

hide_underwear

Whether underwear is left out of guides and previews.

lights_off

Whether the window has its preview's lights off, so previews come with what glows in them.

notice_revision

Counts notify() calls, so the window shows each notice for a moment, even one that repeats the last.

own_pace

Paces this editor's costly work when there are no preferences to share a player's pace with.

pending_body

The body a deferred rebuild built in its first fire; the window keeps the old resources until the second swaps it in.

pending_body_for

The body_requests count pending_body was built for.

pending_body_ready

Whether pending_body was built (it may be null when the context has no body right now).

pending_hairstyle

A base hairstyle picked while the last change settled, applied when its window ends.

pending_work

CUSTOM_SPRITE_WORK_* flags waiting for SScustom_sprite_work.

picture_name

What this editor's pictures are kept under; see custom_sprite_draw_recipes().

preferences

Supplies Custom swatches. In the preferences context it is also the saved character.

preview_appearance

The previewed look for preview_hash.

preview_body

Private dummy used to build guides and previews; released on close.

preview_hash

Appearance identity of the last rendered preview.

preview_height

Canvas height previews are drawn at: taller for the tall hair canvas.

preview_recipes

Direction -> the iconforge recipe of each view of preview_appearance, from one walk.

preview_recipes_for

The preview look preview_recipes were walked from.

preview_timer

Pending preview debounce timer, cancelled when the editor closes.

preview_urls

Direction -> private preview image sent to the editor.

preview_width

Canvas width previews are drawn at.

resources_hair

The hair look the current guides and palette were built from.

resources_markings

The native markings the current guides and sampled palette were built from.

resources_ready

Whether guide geometry and images are available for this draft.

sampled_palette

Colors sampled from the current hair or native markings.

save_error

Failure message from the last attempted save.

save_revision

Successful save counter used for the UI's acknowledgement flash.

saved_draft_revision

The draft revision the last Ctrl+S wrote, so saving an unchanged draft again does no work.

selected_color

Effective brush color after any Custom color blending.

selected_custom_color

Original Custom swatch, retained when blended colors coincide.

selection_frames

Temporary preview-only frames: every view of selection_layer, the placement on one. The workspace, history, saves and exports never read these.

selection_layer

The layer selection_frames stand in for.

selection_request

At most one bounded compact selection placement, waiting for the ordinary preview debounce.

session

Optional salon owner; the context stays salon even after this session is detached.

show_gradient

Whether guides, previews and the sampled palette include the base look's gradient.

slot

Character slot bound when this editor opened.

stale_guides

Direction -> TRUE for views whose guide, or its cover rows, predate the last rebuild.

stale_previews

Direction -> TRUE for views whose preview predates preview_hash.

static_dirty

Guides, the draw mask or the region map changed since the window last received static data.

stroke_notice

Why the latest stroke was refused, shown quietly until the queue drains.

stroke_queue

Strokes over the budget, oldest first, applied by the subsystem.

target

Drawing kind: hair, facial_hair or markings. Also this editor's key in the preferences editor registry.

transfer_error

Safe import or export failure message for the owner.

transfer_notice

A passing message for the owner, such as an import or export finishing. Set through notify().

try_on

The Try on hat the window shows while an appendage layer is chosen, or null. Only previews wear it.

unlocked_bounds

Drawing bounds as the body allows them, before any views are locked.

visible_direction

The view the window shows.

workspace

Editable pixels, palette and undo history for this draft.

Proc Details

act_blocked

Whether an action has to wait. A previous saved style is previewed only when the player's pace allows, and never while a preview is already waiting for an answer.

adopt_preview

Takes a newly captured preview look: the visible view is drawn now, the others in the next fire.

appendage_act

Adds, removes, renames, moves or copies one of the hair's appendage layers, as an undoable step. Everything the window names is checked first: the layer by id, the zone, the kind, the name.

Returns whether the draft changed.

appendage_ui_data

The hair's appendage layers as the window lists them, in order.

apply_candidate

Replaces the draft with the confirmed candidate as one undoable action. A canvas that has to change size for it starts its history over.

apply_draft_base_markings

Context hook: puts the draft's native base markings on the preview body. Only the markings editor has any.

apply_hair_context

Swaps the base hair look under the drawing as one undoable action.

A recolor of the same hairstyle carries painted hair shades to the matching new shade, so the drawing keeps its relationship to the hair. Custom palette colors and unrelated paint stay put.

Returns TRUE when the look changed; otherwise transfer_error says why.

apply_hairstyle

Puts a base hairstyle on the draft, if the draft can still take it.

apply_pending_hairstyle

Applies a hairstyle that was waiting, when its window ends or before anything else the window does.

apply_selection_preview

Checks exactly the placement a real drop would accept, on the layer it names, but writes only a copy of that one view.

available_hairstyles

Hairstyles this character may pick from the editor's own base-hair control.

base_copy_colors_fit

Existing multi-region colors remain usable; only new colors need room in the shared admission pool.

base_copy_context

The rendered base settings, captured with a request to reject work made stale by a later change.

base_copy_origin

Hair pixels use the same movable origin as its guide; markings override this with body coordinates.

base_copy_placement_valid

Regional editors additionally check that this placement still fits every affected region's saved palette.

base_copy_ready

Whether the resource snapshot still matches the current base settings.

begin_import

Imports a style file into a confirmable preview. Sleeps while the file dialog is open.

Nothing in the draft or preferences changes here. After the dialog returns, ownership, slot, context and draft revision are all checked again before the file is even considered.

bring_to_front

Brings the open window in front of the player's other windows.

build_base_copy

Return one selected base frame as palette indexes; body, beard and custom paint are never sampled.

can_change_hair

Context hook: whether this context may change the base hair look from inside the editor.

can_edit

Whether this user may act on this editor right now: its owner, on the slot it opened for, with editing enabled.

can_hide_parts

Markings can hide parts that cover the body; hair editors always keep the full look visible.

can_hide_underwear

Context hook: whether underwear can be left out of guides and previews.

candidate_key

What a candidate's previews depend on: its drawing and base look, and the body they're drawn on.

candidate_previews

Context hook: all four views of the preview body wearing the waiting candidate.

candidate_problem

Returns why a package can't replace this draft, or null when it can.

capture_guide

Captures the guide's look from the prepared preview body and draws its pictures.

capture_preview

Puts a drawing on the preview body and captures how it looks, to draw.

The preview body keeps the given drawing afterwards. Other base looks are restored to the draft before returning, so resources stay consistent with the guides.

clear_selection_preview

Drops the temporary picture on cancellation, a new gesture, a draft edit or changed body, view or region locks.

context_act

Context hook: extra actions owned by the context.

context_ui_data

Context hook: extra window data owned by the context.

costly_work_due

Whether this editor's deferred work would build or rebuild something now, costing tens of milliseconds.

costly_work_waits

A rebuild's drawing goes on the turn after its body and never waits: a body left waiting is thrown away for a change after it.

cover_rows_for

Context hook: one view's cover rows, read inside the view's own box before any lock so an unlocked view is right at once.

create_preview_body

Context hook: a private body showing the appearance being drawn on, or null when unavailable.

create_workspace

Context hook: the draft's workspace, built from the starting package.

current_package

The draft as a style package.

custom_palette_tint

Brush effects are editor state, never a mutation of existing drawing pixels.

default_marking_color

A new base marking's starting color, from the body being drawn on rather than the setup preview.

draft_changed

Context hook: called after every change to the draft.

draft_edited

Marks the draft changed and schedules its debounced preview, as every window edit does.

drain_strokes

Applies waiting strokes in order until the tick runs short, at least one per call, then sends the window everything that waited for them. Returns whether the queue is empty.

draw_glows

Draws the glow of each of these views' preview pictures that has none yet, for the window's lights-off view. A view whose picture is about to be drawn again waits for it, so a picture and its glow always show the same look.

draw_previews

Draws these views of the preview from its walk, and their glows with the lights off.

draw_waiting_views

Deferred work: every view the window may turn to next that isn't ready, its guide's cover rows, its preview and, with the lights off, its glow, so turning draws nothing.

drop_pending_body

Throws a body built for an older request away.

edit_custom_palette_color

Replaces one saved Custom swatch with another color, keeping its place in the palette.

Like removal, this never recolors paint: pixels already drawn with the old swatch keep it. Brushes in open editors that were using the old swatch follow it to the new color. Choosing a color that's already saved folds the two swatches into one.

The picker yields, so the palette is read again here rather than trusted from before it opened.

Returns TRUE when the palette changed.

editor_act

Hook: actions a subtype handles itself, after the shared checks. Returns null for actions it leaves to the base.

emissives_allowed

Context hook: whether this destination may use emissive paint.

finish

Closes the editor, saving first when asked; a failed save keeps it open.

finish_base_copy

Finish at the normal costly-work pace; recheck the owner, locks and captured look after waiting.

glow_recipe

One view's glow as an iconforge recipe, or null when nothing in it glows: the emissive overlays of the look its preview was drawn from.

guide_icon

One view's guide as a native icon, for the eyedropper, read from its picture the first time it's wanted.

hair_context_problem

Context hook: why an imported hair look can't be used here, or null.

hairstyle_icons

Cached preference icon classes for exactly the styles the editor already offers.

hide_obstructing_parts

Takes wings, tails and other parts that hang over the limb off the preview body while the guide is drawn.

Only the guide leaves them out: rebuild_resources() puts them back once the guides are rendered, so previews still show the whole look. A taur body carries its own drawing, so it always stays.

Returns the removed overlays, each mapped to the limb it came off, or null when nothing was removed.

initial_package

Context hook: the package the draft starts from.

keep_only_strokes

Drops every kind of waiting work but strokes, which still apply after the window closes.

locked_directions

Context hook: views that can't be painted right now, beyond the drawing's own bounds.

notify

Shows the owner a passing message in the window's status line.

pace

The pace this editor's costly work shares with the rest of its player's editors.

prepare_base_copy_paste

Admit only colors sampled by this editor; the existing move parser still validates every placed pixel.

preview_received

Previews a received style file. Returns FALSE with transfer_error saying why it can't replace this draft.

publish_picture

A drawn picture's PNG as the data URL the window shows.

push

Sends the window an update, unless strokes are still waiting: their drain sends it instead, so no update shows frames without them.

push_static_data

Sends static data a partial update found changed. Runs a tick later, so the payload being built isn't re-entered.

queue_selection_preview

Floating paint is previewed at the end of a gesture; no pointer moves or unvalidated pixels reach the renderer.

rebuild_for_opening

Rebuilds resources for a window being opened, unless that would come too soon after the last rebuild.

Returns TRUE when resources are ready now; otherwise the rebuild runs as deferred work.

rebuild_resources

Rebuilds the preview body, guides, sampled palette and drawing bounds.

Runs on opening, after the hair look changes through import or history, and when a closed salon draft resumes. Heavyweight preview resources can be released while a window is closed.

Returns:

refresh_custom_palette

Rebuilds the paintable palette from the draft, the sampled shades and the Custom swatches, keeping the brush valid.

refresh_preview

Timer callbacks push immediately; synchronous UI actions let TGUI send their single final update.

release_resources

Drops the guides and previews built from the preview body. The draft can outlive its window, but temporary paint doesn't.

render_appearance

Context hook: the appearance guides and previews render, and any extra overlays to add.

render_base_copy_frame

One native base hair frame; the markings editor overrides only this sampling step.

render_candidate

Draws the waiting candidate's previews and caches them. The body then shows the draft again.

render_guide

Readies one view of the guide the last rebuild captured: every view's picture, drawn together from one walk if they predate the capture, and this view's cover rows. The other views' cover rows follow in the next fire. Guides are static data, so the window needs a full update afterwards.

render_overlays

Context hook: worn overlays to add to guides and previews. Character setup adds none.

render_preview

Draws one view of the preview captured for preview_hash, walking the look once for every view. The others it leaves stale are drawn from the same walk in the next fire, so the action pays for one picture.

render_previews

All four views' data URLs of the preview body wearing a drawing, for import and restore previews.

request_base_copy

Copy requests use the existing deferred work queue and never change paint, history or saves.

request_base_copy_work

Queue one bounded base-layer copy without adding work to ordinary paint.

request_candidate

Asks for the waiting candidate's previews to be drawn in the background.

request_hairstyle

Picks a base hairstyle. A change applies at once; ones picked in the moments after it wait for CUSTOM_SPRITE_HAIRSTYLE_WINDOW and apply together as the latest pick, so a burst of picks lands at most twice and never on the styles in between, such as a tall canvas or lifted hair it would grow into and straight out of. The window shows the latest pick throughout.

Returns TRUE when the window should update.

request_other_views

Asks for the views the window isn't showing to be readied in the background.

request_rebuild

Rebuilds resources and the preview once a burst of changes settles, instead of inside the action.

request_refresh

The preview debounce's callback: the refresh runs as deferred work.

request_view

Shows the visible view, drawing its stale guide or preview afterwards rather than inside the action.

A preview about to be refreshed isn't drawn again; the refresh draws whichever view is visible.

Returns TRUE when everything the view needs is already drawn, so the window can update now.

request_work

Asks SScustom_sprite_work for work. Whatever the draft holds when it runs is what gets drawn.

resize_canvas

Moves the draft onto the canvas height its paint and base look ask for, such as the tall hair canvas, with the paint kept where it sits on the head.

The draft's own paint resizes where it is, every layer keeping its id; a recolored drawing replaces the draft. History can't span two canvas sizes, so it starts over; a pending import or restoration still keeps the replaced saved style when the draft is saved.

Returns TRUE when the canvas changed size, or FALSE when it already fits.

restorable_package

The previous saved style, or null when the draft already is that style.

run_deferred_work

Does this editor's deferred work and sends the window what changed.

Returns FALSE when the work has to wait, such as for the rebuild spacing, so it stays queued.

sample_guide

Prefer current paint over the retained native guide, including strokes newer than the browser's view.

sample_marking_palette

The markings palette: the body's mutant colors, then its native marking shades tinted by each, up to 15 colors.

sample_marking_shades

Shades sampled from the first native marking the preview body draws.

save_drawing

Saves the draft to the character. Returns FALSE with save_error set when it couldn't.

save_unchanged

Whether Ctrl+S would write exactly what the last one did. It's still acknowledged, so the window flashes Saved.

set_appendage_emissive

Turns one appendage layer's glow on or off for a view, like the hair's own setting. Returns whether it changed.

set_custom_palette

Account colors save immediately; discarding a character drawing does not discard its palette.

set_try_on

Puts a Try on hat on the previews, or takes it off. Previews follow after the usual pause, as they do edits.

show_candidate

Records an import or restoration for confirmation. Its previews are drawn in the background, or taken from the cache.

sync_locked_views

Applies the context's current view locks to the drawing bounds.

Locks can change while the window is open, so this runs on every update and before every action rather than only when the preview body is rebuilt.

Returns TRUE when the locks changed.

take_stroke

Takes a stroke from the window: applied at once within the player's budget, else queued for the subsystem, else refused once the queue is full. Returns whether the window should update now.

transformed_custom_palette

The account's Custom swatches after the current blending mode.

ui_close

Closing keeps the unsaved draft and its history; only saving writes. Preview resources are rebuilt on reopening.

update_draw_area

Context hook: sets a markings draft's drawing bounds and mask from the preview body.

update_restorable

Works out whether Restore previous saved style is offered. Runs with the debounced preview and after saves, not on every window update.

validated_base_copy

Validate a bounded selection envelope before retaining it or reading any pixels.

window_title

Context hook: the window's title. BYOND shows it until the interface draws its own, so the two match.