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

garment_fit_job

One garment fit, made a piece at a time (next_piece()): its setup, each view of each direction's frames (fit_garment_view()), and its end, which caches what it made. While it waits, its place in its cache holds the job itself, so a garment drawn meanwhile finds it and waits for it (wait()) rather than queueing it again.

Vars

cacheThe cache list the fit goes in, under cache_key: the fitted sprite, a resource, or FALSE when the fit leaves the garment as it is.
changedWhether a view changed.
delaysAn animated sprite's frame delays.
fitWhat the garment is fitted to.
garmentThe sprite being fitted, a 32x32 /icon with four directions, named "", changed in place.
modeHow it's fitted, a GARMENT_FIT_* define. Worn clothing that doesn't set its own reads it from its sleeves in setup().
next_viewThe next of its views to fit, counted in the order they're fitted (GARMENT_FIT_PIECE_VIEW()).
view_coloursIts views' colours, as fit_garment_view() takes them, by view; or null to read them from its pixels.
viewsHow many views it has, four for each frame, once set up.
waitersWeak references to the bodies that drew the garment as it is while this waited -> GARMENT_FIT_REDRAW_* flags.

Procs

bares_near_forearmWhether the garment leaves the near forearm bare in its side views, shown at the arm's own width (fit_garment_view()).
finishReturns the fitted sprite to cache, a resource, once a view has changed.
fit_viewFits one view of the sprite in place (fit_garment_view()).
next_pieceMakes the next piece of the fit: its setup, one view, or its end, which caches it.
run_to_endMakes the whole fit now.
setupSets the fit up: the sprite, how it's fitted, its frames and its views' colours.
startStarts the fit for a garment drawn on wearer: queues it, noting wearer to draw again once it's made; or, without GARMENT_FITS_DEFERRED or for a dummy, makes it now.
straight_over_pecsWhether the garment hangs straight over pecs drawn under it, its chest panel left as drawn (fit_garment_view()).
waitNotes a body that drew the garment as it is while this waits, to draw that slot again once it's made. A body being deleted isn't drawn again.

Var Details

cache

The cache list the fit goes in, under cache_key: the fitted sprite, a resource, or FALSE when the fit leaves the garment as it is.

changed

Whether a view changed.

delays

An animated sprite's frame delays.

fit

What the garment is fitted to.

garment

The sprite being fitted, a 32x32 /icon with four directions, named "", changed in place.

mode

How it's fitted, a GARMENT_FIT_* define. Worn clothing that doesn't set its own reads it from its sleeves in setup().

next_view

The next of its views to fit, counted in the order they're fitted (GARMENT_FIT_PIECE_VIEW()).

view_colours

Its views' colours, as fit_garment_view() takes them, by view; or null to read them from its pixels.

views

How many views it has, four for each frame, once set up.

waiters

Weak references to the bodies that drew the garment as it is while this waited -> GARMENT_FIT_REDRAW_* flags.

Proc Details

bares_near_forearm

Whether the garment leaves the near forearm bare in its side views, shown at the arm's own width (fit_garment_view()).

finish

Returns the fitted sprite to cache, a resource, once a view has changed.

fit_view

Fits one view of the sprite in place (fit_garment_view()).

Arguments:

Returns whether the view changed.

next_piece

Makes the next piece of the fit: its setup, one view, or its end, which caches it.

Returns whether the fit is done.

run_to_end

Makes the whole fit now.

setup

Sets the fit up: the sprite, how it's fitted, its frames and its views' colours.

Returns FALSE for a sprite that can't be fitted, which is drawn as it is.

start

Starts the fit for a garment drawn on wearer: queues it, noting wearer to draw again once it's made; or, without GARMENT_FITS_DEFERRED or for a dummy, makes it now.

Arguments:

Returns what's cached for the garment: the fitted sprite, or FALSE, once made; this job while it waits.

straight_over_pecs

Whether the garment hangs straight over pecs drawn under it, its chest panel left as drawn (fit_garment_view()).

wait

Notes a body that drew the garment as it is while this waits, to draw that slot again once it's made. A body being deleted isn't drawn again.

Arguments: