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

garment_fitting

Vars

max_fire_costThe longest a fire has taken this round, in ms: one view of a fit can't be split.
queueFits waiting to be made, oldest first. The first may be part made.
redrawsBodies to draw again for finished fits, by weak reference -> GARMENT_FIT_REDRAW_* flags.

Procs

addQueues a fit to be made.
finish_allMakes every queued fit now and draws the bodies waiting for them again, as a fit made as it's drawn would have: for tests, and anything else that has to see bodies fitted at once. In a round the queue's own pace keeps ticks short instead.
finishedNotes the bodies a finished fit's garment is drawn again on.
fireDraws again the bodies left waiting by the last fire, then makes queued fits in order while the tick has room, then draws again the bodies waiting for those. Each loop goes round at most once for each entry its list had when it began, so none can go round forever; what is added meanwhile waits for a later fire. Stops firing while there's nothing to do (add()).
make_pieceMakes the next piece of a queued fit. A fit that runtimes is done, cached as leaving its garment as it is, so it can't hold up the fits queued after it.
note_costNotes what a fire that began at started took, for max_fire_cost.
redraw_nextDraws the slots of the body that has waited longest for its fits again, if it's still around.
redraw_waitingDraws again the bodies waiting for finished fits, longest waiting first, until the tick runs short.
stat_entryShows how many fits wait, how many bodies wait to be drawn again, and the longest fire this round.

Var Details

max_fire_cost

The longest a fire has taken this round, in ms: one view of a fit can't be split.

queue

Fits waiting to be made, oldest first. The first may be part made.

redraws

Bodies to draw again for finished fits, by weak reference -> GARMENT_FIT_REDRAW_* flags.

Proc Details

add

Queues a fit to be made.

finish_all

Makes every queued fit now and draws the bodies waiting for them again, as a fit made as it's drawn would have: for tests, and anything else that has to see bodies fitted at once. In a round the queue's own pace keeps ticks short instead.

finished

Notes the bodies a finished fit's garment is drawn again on.

fire

Draws again the bodies left waiting by the last fire, then makes queued fits in order while the tick has room, then draws again the bodies waiting for those. Each loop goes round at most once for each entry its list had when it began, so none can go round forever; what is added meanwhile waits for a later fire. Stops firing while there's nothing to do (add()).

make_piece

Makes the next piece of a queued fit. A fit that runtimes is done, cached as leaving its garment as it is, so it can't hold up the fits queued after it.

Returns whether the fit is done.

note_cost

Notes what a fire that began at started took, for max_fire_cost.

redraw_next

Draws the slots of the body that has waited longest for its fits again, if it's still around.

redraw_waiting

Draws again the bodies waiting for finished fits, longest waiting first, until the tick runs short.

Returns TRUE if the tick ran short.

stat_entry

Shows how many fits wait, how many bodies wait to be drawn again, and the longest fire this round.