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

graffiti

Vars

admin_areasPacked placement -> the area admin_rows() shows and sorts it under, until the placements change.
admin_ordersSort -> every packed placement in that order, for admin_rows(), until the placements change.
anchor_resolversAnchor kind -> the /datum/callback a system registered to turn an anchor of that kind into a turf, or null.
artArt hash -> the flat art, for every art a placement uses.
art_byte_budgetMost bytes of art the map keeps. Tests lower it.
art_bytesThe bytes of every art in art, as art_size() counts them.
art_iconsgraffiti_art_hash() -> the icon graffiti_art_icon() drew of that art, up to GRAFFITI_ICON_CACHE of them.
art_refsArt hash -> how many placements use it.
ckey_artsCkey -> art hash -> how many of its placements use it.
ckey_placementsCkey -> its packed placements, in the order its own caps evict them: by "at", then as placements orders them.
composite_lineThe editors and paint jobs waiting for composite_share, in the order they first asked, -> when each last asked.
composite_shareHow many ms of composites may still run now, every painter's together. Below zero, they went over, and that is paid back first.
composite_share_atWhen composite_share was last topped up.
decodedArt hash -> graffiti_art_decode() of the arts and stack composites decoded while the map loads, for the load's merges and sheets, within GRAFFITI_DECODE_BUDGET. Null once build_sheets() has drawn them.
displayed_uniqueArt hash -> how many shown placements use it, so its length counts the unique arts shown.
dormantThe packed placements not shown this round.
editorsCkey -> that player's graffiti editor. A player has one at a time, opened through graffiti_editor_for().
frozenWhether the round-end save has run, after which nothing is written.
glow_iconsgraffiti_art_hash() -> the glow mask graffiti_glow_icon() drew of that art, up to GRAFFITI_ICON_CACHE of them.
librariesAccount ckey -> its loaded graffiti library.
library_revisionThe last revision any graffiti library took. A library loaded again after a purge never repeats one an open window saw.
library_rootThe directory library files go under. Tests point it at a scratch directory; admins can't edit it (vv_edit_var()).
load_resumed_atTICK_USAGE when the background load last went on in a tick, which its share of the tick counts from.
load_sharePercent of each tick the load takes at most: GRAFFITI_LOAD_SHARE, or the whole tick in unit tests and benchmarks, which time the load's work rather than spread it.
loadedWhether the map's graffiti has loaded, which it does in the background once the game reaches the lobby (load_in_background()): until then nothing is placed, saved or deleted by an admin.
loaded_templatesMap templates loaded this round on station levels, oldest first: list("id" = the template's map file, "x", "y", "z" = its low corner, "w", "h"). Recorded from SSmapping's init on, before this subsystem initializes.
map_pathWhere the map's graffiti file is. Tests point it at a scratch file through load_file().
paint_jobsCkey -> that player's running paint job. A player runs one at a time.
placement_capMost placements the map keeps. Tests lower it.
placement_infoPacked placement -> list(ckey, art hash, "at", pid, "who", whether it lasts this round only), read through the GRAFFITI_INFO_* indices: what placement operations read of a placement without unpacking it.
placementsEvery placement, packed, in the order they were placed, which each tile's stack follows.
save_failure_toldWhether the admins were told this round that the map file couldn't be written.
save_pendingThe timer that will write the map file, while one is pending.
seenCkey -> when its owner last connected, as ten-digit unix seconds in text.
sheet_rootThe directory every map's sheet files go under. Tests move it.
sheetsStack key -> list(the sheet file's resource, whether it holds the stack's glow mask).
sheets_builtHow many sheet files the last build_sheets() wrote rather than reused.
shownPacked placement -> the decal showing it, for every placement shown this round.
stack_cacheStack signature (stack_signature()) -> list(its key, its graffiti_art_glow_kind()), from the map file, while the load places its stacks: a stack it lists takes them without merging, as long as merges still give what they gave when the file was written (graffiti_merge_fingerprint()). Null otherwise.
start_cooldownsCkey -> the world.time from which that player may start another freehand session or paint job.
storeThe map's graffiti file.
total_sizeThe estimated bytes decoded holds.

Procs

InitializeLeaves the map's graffiti for the lobby, so loading it takes none of the server's startup: once every subsystem has initialized and the game reaches the lobby, it loads in the background (load_in_background()). Unit tests load it at once, as they read the registry straight away.
RecoverTakes over everything the subsystem being replaced kept, as the Master Controller restarts: the map's graffiti, the libraries and the painting under way.
ShutdownMakes the final save when the world stops, for a reboot that skips the round-end save, and writes the library changes the write pacing still holds back. After the round-end save the map file isn't written again.
add_placementPlaces a piece's art on a turf, on top of its stack, and queues the map file's write.
admin_areaReturns the area admin_rows() lists a placement under: its tile's, or its anchor's when it has none this round.
admin_changedForgets admin_rows()' orders and areas, as the placements or where they show changed.
admin_clear_all_mapsDeletes every placement on every map.
admin_clear_mapDeletes every placement on this map, and the painting under way on them (drop_work()), which may sleep.
admin_deleteDeletes placements by id, both halves of a wide piece alike, through remove_placements(), which may sleep.
admin_delete_ckeyDeletes one account's placements on this map through remove_placements(), which may sleep.
admin_delete_ckey_everywhereDeletes one account's graffiti from every map and its graffiti library.
admin_edit_other_mapsEdits the graffiti file of every other map, beside this map's own in the same directory, and drops the art its placements no longer use, yielding between files. A file that can't be read, or has a version GRAFFITI_MAP_READ_VERSIONS doesn't list, is skipped with a log line. An older version's file keeps its version, as the edit only takes placements and art out.
admin_orderReturns every placement in one of admin_rows()' orders, sorting them again only after the placements changed.
admin_rowReturns admin_rows()' row for one placement.
admin_rowsReturns one page of the map's placements, shown and dormant alike, for the admin panel.
art_ofReturns a placement's art hash without unpacking it.
art_sizeReturns the bytes an art counts against the map's art_byte_budget: its palette and grids.
build_sheetsPacks every shown stack into sprite sheet files, chunk by chunk, and shows each decal from its sheet.
check_anchorReturns an anchor read from a file with only the fields its kind uses, as graffiti_anchor_for() writes them. One saved before windows took graffiti records wall, whether its surface is a wall, which is read as a wall or a floor.
check_placementReturns a placement read from a map file in the form the registry keeps, with its painter's name cleaned again. Fields the registry doesn't keep, such as the names and descriptions placements once carried, are left out.
clear_fileEmpties a map file's placements and art, for admin_edit_other_maps().
composite_turnWhether it is a painter's turn to composite. Every painter's composites together take at most GRAFFITI_COMPOSITE_SHARE ms a second of game time, so under a dilating server they get less, and those waiting for room take it in the order they first asked (composite_line). Asking keeps the owner's place; running its composite gives it up, the owner taking itself out of the line, and so does not asking for GRAFFITI_COMPOSITE_LINE_GRACE, as an owner no longer due doesn't.
count_shownCounts placements of an art in or out of those shown.
decoded_sizeEstimates the bytes a decode holds: 8 a pixel for its indices, and for its glow unless it shares graffiti_unlit_glow()'s, and 40 a palette colour.
displayShows a placement on top of its tile's stack.
drop_ckeyDrops one account's placements from a map file's placements, for admin_edit_other_maps().
drop_decodedLets the map load's decodes go: build_sheets() does once every sheet is drawn, and load_file()'s timer does should a runtime stop the load first.
drop_workEnds what painters have under way on placements an admin deleted, keeping none of it: a freehand session or paint job painting them stops without an Unfinished piece, and an Unfinished piece left to resume on them is discarded, an offline owner's too, whose library is loaded for it and unloaded again. Yields between offline owners' libraries.
index_placementIndexes a placement the registry has just taken: its info, and its place among its account's placements and art.
keep_decodedKeeps a decode of an art or stack composite for the rest of the map's load, while the decodes kept stay within GRAFFITI_DECODE_BUDGET. Past it, that art is decoded again wherever it is needed, as it is outside the load.
keep_only_decodedLets the load's decodes go but those it still needs, counting what stays.
load_fileLoads a map file in place of whatever the registry held, keeping only what is valid and within the caps.
load_in_backgroundLoads the map's graffiti onto its tiles a share of each tick at a time (load_yield()), then starts noting who connects. Decals show their art once their chunk's sheet is drawn.
load_yieldLets the background load go on in this tick until it has taken load_share percent of it, or the tick is full, then waits for the next, so the load spreads evenly over the ticks and the server never feels it. Each wait comes between two pieces of the load, the largest a tile's stack merged or one icon drawn.
lowest_unconnectedReturns the lowest-ranked placement whose owner isn't connected, as rank() orders them: the owner seen longest ago, then that owner's oldest placement, then the one earlier in placements. It reads each owner's index instead of ranking every placement.
make_roomMakes room on the map for a placement of an art, a new one or a placement's new art: past the map's caps, counting the account's own placements that its caps take, the lowest-ranked placement of an owner who isn't connected goes, until the art fits or nothing else can go. A placement never goes to make room for its own new art.
map_fitsWhether the map's caps, its art_byte_budget included, leave room for a new placement of an art once the placements the account's own caps take are gone.
on_client_connectNotes when a player connected, and shows those of their dormant placements whose anchors resolve now, within the display budget.
on_pregameStarts the background load as the game reaches the lobby.
own_evictionsReturns the account's own placements that its caps take for a new placement of an art: its oldest, while it keeps GRAFFITI_CKEY_PLACEMENT_CAP placements, or GRAFFITI_CKEY_UNIQUE_CAP arts and the art is new to it. Nothing is removed.
pids_by_ckeyReturns the placement ids each account owns among some placements, read while the index still holds them.
place_allShows each placement whose anchor resolves, best-ranked first while the display budget lasts, stacked on its tile in file order. The rest stay dormant: one that doesn't resolve counts a miss unless it is only waiting, and is dropped once it has missed GRAFFITI_MISS_LIMIT rounds in a row. The decals get their icons from build_sheets().
placement_turfReturns the turf a placement's anchor names this round, for admin jumps and anchor checks. A shown placement's decal is in shown, which follows it even when its anchor no longer resolves to it.
queue_saveWrites the map file after GRAFFITI_SAVE_DEBOUNCE, with every change made meanwhile.
rankOrders placements from the one to keep showing most to the first to evict: an owner who is connected first, then owners seen most recently, then the newest placement, then the one later in candidates.
reindex_placementMoves a placement's index to its new packing, keeping its place among its account's placements.
releaseTakes the placements of one space's anchors off their tiles and keeps them dormant, for graffiti_registry_release().
release_artDrops one placement's hold on an art, and the art once nothing uses it, its icon and glow mask leaving the caches.
remove_placementRemoves a placement from the registry, and from its tile when it shows.
remove_placementsRemoves placements from the registry at once, as an admin deletes them, ends the painting under way on them (drop_work()), then merges each tile they showed on again once, yielding between tiles: removing them one by one would merge a tile's whole stack for each. What else a tile stacks stays, in its order.
save_nowWrites the map file: the art and placements that last past this round, and when their owners were last seen. A map that has never had lasting graffiti gets no file. Nothing is written before the map's graffiti has loaded (loaded), while the registry may hold only part of the file, nor after the round-end save.
sheet_forReturns the sheet a stack shows from.
spend_compositeTakes a composite's time out of composite_share, a session's last one and a paint job's finish included, which run whether or not there is room.
stack_keysReturns what the map file caches of the stacks it keeps, so the next round's load shows them without merging them: each shown stack of several pieces, every piece of it kept, under its signature with its key and glow kind, beside the fingerprint of the merges that made them (graffiti_merge_fingerprint()).
tile_goneRemoves for good every placement a decal showed: its surface was cleaned, or is gone.
unindex_placementTakes a placement the registry no longer holds out of the index.
unpackReads a packed placement.
update_placement_artGives a placement new art, as a freehand session or a paint job reveals more of its piece, and shows it. The art meets the caps a new placement's does (make_room()), its old art going from the placement, and when nothing can make room the placement keeps its old art.
vv_edit_varRefuses admin edits of the library directory, which library files are written under.
wipe_for_testEmpties the registry for a test without writing anything: deletes every custom decal, clears the lists and the pending write, and unfreezes it. The store and the test settings stay.
write_sheetPoints a pack of stacks at their sheet file, writing it first unless an earlier round wrote the same one.

Var Details

admin_areas

Packed placement -> the area admin_rows() shows and sorts it under, until the placements change.

admin_orders

Sort -> every packed placement in that order, for admin_rows(), until the placements change.

anchor_resolvers

Anchor kind -> the /datum/callback a system registered to turn an anchor of that kind into a turf, or null.

art

Art hash -> the flat art, for every art a placement uses.

art_byte_budget

Most bytes of art the map keeps. Tests lower it.

art_bytes

The bytes of every art in art, as art_size() counts them.

art_icons

graffiti_art_hash() -> the icon graffiti_art_icon() drew of that art, up to GRAFFITI_ICON_CACHE of them.

art_refs

Art hash -> how many placements use it.

ckey_arts

Ckey -> art hash -> how many of its placements use it.

ckey_placements

Ckey -> its packed placements, in the order its own caps evict them: by "at", then as placements orders them.

composite_line

The editors and paint jobs waiting for composite_share, in the order they first asked, -> when each last asked.

composite_share

How many ms of composites may still run now, every painter's together. Below zero, they went over, and that is paid back first.

composite_share_at

When composite_share was last topped up.

decoded

Art hash -> graffiti_art_decode() of the arts and stack composites decoded while the map loads, for the load's merges and sheets, within GRAFFITI_DECODE_BUDGET. Null once build_sheets() has drawn them.

displayed_unique

Art hash -> how many shown placements use it, so its length counts the unique arts shown.

dormant

The packed placements not shown this round.

editors

Ckey -> that player's graffiti editor. A player has one at a time, opened through graffiti_editor_for().

frozen

Whether the round-end save has run, after which nothing is written.

glow_icons

graffiti_art_hash() -> the glow mask graffiti_glow_icon() drew of that art, up to GRAFFITI_ICON_CACHE of them.

libraries

Account ckey -> its loaded graffiti library.

library_revision

The last revision any graffiti library took. A library loaded again after a purge never repeats one an open window saw.

library_root

The directory library files go under. Tests point it at a scratch directory; admins can't edit it (vv_edit_var()).

load_resumed_at

TICK_USAGE when the background load last went on in a tick, which its share of the tick counts from.

load_share

Percent of each tick the load takes at most: GRAFFITI_LOAD_SHARE, or the whole tick in unit tests and benchmarks, which time the load's work rather than spread it.

loaded

Whether the map's graffiti has loaded, which it does in the background once the game reaches the lobby (load_in_background()): until then nothing is placed, saved or deleted by an admin.

loaded_templates

Map templates loaded this round on station levels, oldest first: list("id" = the template's map file, "x", "y", "z" = its low corner, "w", "h"). Recorded from SSmapping's init on, before this subsystem initializes.

map_path

Where the map's graffiti file is. Tests point it at a scratch file through load_file().

paint_jobs

Ckey -> that player's running paint job. A player runs one at a time.

placement_cap

Most placements the map keeps. Tests lower it.

placement_info

Packed placement -> list(ckey, art hash, "at", pid, "who", whether it lasts this round only), read through the GRAFFITI_INFO_* indices: what placement operations read of a placement without unpacking it.

placements

Every placement, packed, in the order they were placed, which each tile's stack follows.

save_failure_told

Whether the admins were told this round that the map file couldn't be written.

save_pending

The timer that will write the map file, while one is pending.

seen

Ckey -> when its owner last connected, as ten-digit unix seconds in text.

sheet_root

The directory every map's sheet files go under. Tests move it.

sheets

Stack key -> list(the sheet file's resource, whether it holds the stack's glow mask).

sheets_built

How many sheet files the last build_sheets() wrote rather than reused.

shown

Packed placement -> the decal showing it, for every placement shown this round.

stack_cache

Stack signature (stack_signature()) -> list(its key, its graffiti_art_glow_kind()), from the map file, while the load places its stacks: a stack it lists takes them without merging, as long as merges still give what they gave when the file was written (graffiti_merge_fingerprint()). Null otherwise.

start_cooldowns

Ckey -> the world.time from which that player may start another freehand session or paint job.

store

The map's graffiti file.

total_size

The estimated bytes decoded holds.

Proc Details

Initialize

Leaves the map's graffiti for the lobby, so loading it takes none of the server's startup: once every subsystem has initialized and the game reaches the lobby, it loads in the background (load_in_background()). Unit tests load it at once, as they read the registry straight away.

Returns:

Recover

Takes over everything the subsystem being replaced kept, as the Master Controller restarts: the map's graffiti, the libraries and the painting under way.

Shutdown

Makes the final save when the world stops, for a reboot that skips the round-end save, and writes the library changes the write pacing still holds back. After the round-end save the map file isn't written again.

add_placement

Places a piece's art on a turf, on top of its stack, and queues the map file's write.

The map's caps are met first, counting the account's own placements that its caps take: past them the lowest-ranked placement of an owner who isn't connected goes, and when nothing else can go the new paint is refused with the account's own placements left alone. Only a placement that lands takes the account's own lowest-ranked ones, as many as its caps need. Off the station levels, in shuttles and in the holodeck, the placement lasts this round only.

Arguments:

Returns:

admin_area

Returns the area admin_rows() lists a placement under: its tile's, or its anchor's when it has none this round.

Arguments:

Returns:

admin_changed

Forgets admin_rows()' orders and areas, as the placements or where they show changed.

admin_clear_all_maps

Deletes every placement on every map.

Returns:

admin_clear_map

Deletes every placement on this map, and the painting under way on them (drop_work()), which may sleep.

Returns:

admin_delete

Deletes placements by id, both halves of a wide piece alike, through remove_placements(), which may sleep.

Arguments:

Returns:

admin_delete_ckey

Deletes one account's placements on this map through remove_placements(), which may sleep.

Arguments:

Returns:

admin_delete_ckey_everywhere

Deletes one account's graffiti from every map and its graffiti library.

Arguments:

Returns:

admin_edit_other_maps

Edits the graffiti file of every other map, beside this map's own in the same directory, and drops the art its placements no longer use, yielding between files. A file that can't be read, or has a version GRAFFITI_MAP_READ_VERSIONS doesn't list, is skipped with a log line. An older version's file keeps its version, as the edit only takes placements and art out.

Arguments:

Returns:

admin_order

Returns every placement in one of admin_rows()' orders, sorting them again only after the placements changed.

Arguments:

Returns:

admin_row

Returns admin_rows()' row for one placement.

Arguments:

Returns:

admin_rows

Returns one page of the map's placements, shown and dormant alike, for the admin panel.

Arguments:

Returns:

art_of

Returns a placement's art hash without unpacking it.

Arguments:

Returns:

art_size

Returns the bytes an art counts against the map's art_byte_budget: its palette and grids.

Arguments:

Returns:

build_sheets

Packs every shown stack into sprite sheet files, chunk by chunk, and shows each decal from its sheet.

Decals are sorted by z level, 16-tile chunk and position, and each chunk's stacks are cut into sheets of up to GRAFFITI_SHEET_STATES, each stack in one sheet only. A sheet file is named by the hash of the stacks it holds and the alpha ceiling they are drawn at, so an unchanged chunk reuses the file of an earlier round, which clients have cached. Files no sheet uses are deleted, unless the map's graffiti isn't kept.

check_anchor

Returns an anchor read from a file with only the fields its kind uses, as graffiti_anchor_for() writes them. One saved before windows took graffiti records wall, whether its surface is a wall, which is read as a wall or a floor.

Arguments:

Returns:

check_placement

Returns a placement read from a map file in the form the registry keeps, with its painter's name cleaned again. Fields the registry doesn't keep, such as the names and descriptions placements once carried, are left out.

Arguments:

Returns:

clear_file

Empties a map file's placements and art, for admin_edit_other_maps().

Arguments:

composite_turn

Whether it is a painter's turn to composite. Every painter's composites together take at most GRAFFITI_COMPOSITE_SHARE ms a second of game time, so under a dilating server they get less, and those waiting for room take it in the order they first asked (composite_line). Asking keeps the owner's place; running its composite gives it up, the owner taking itself out of the line, and so does not asking for GRAFFITI_COMPOSITE_LINE_GRACE, as an owner no longer due doesn't.

Arguments:

Returns:

count_shown

Counts placements of an art in or out of those shown.

Arguments:

decoded_size

Estimates the bytes a decode holds: 8 a pixel for its indices, and for its glow unless it shares graffiti_unlit_glow()'s, and 40 a palette colour.

Arguments:

Returns:

display

Shows a placement on top of its tile's stack.

Arguments:

Returns:

drop_ckey

Drops one account's placements from a map file's placements, for admin_edit_other_maps().

Arguments:

drop_decoded

Lets the map load's decodes go: build_sheets() does once every sheet is drawn, and load_file()'s timer does should a runtime stop the load first.

drop_work

Ends what painters have under way on placements an admin deleted, keeping none of it: a freehand session or paint job painting them stops without an Unfinished piece, and an Unfinished piece left to resume on them is discarded, an offline owner's too, whose library is loaded for it and unloaded again. Yields between offline owners' libraries.

Arguments:

index_placement

Indexes a placement the registry has just taken: its info, and its place among its account's placements and art.

Arguments:

keep_decoded

Keeps a decode of an art or stack composite for the rest of the map's load, while the decodes kept stay within GRAFFITI_DECODE_BUDGET. Past it, that art is decoded again wherever it is needed, as it is outside the load.

Arguments:

keep_only_decoded

Lets the load's decodes go but those it still needs, counting what stays.

Arguments:

load_file

Loads a map file in place of whatever the registry held, keeping only what is valid and within the caps.

Art that isn't valid one-tile art under its own hash, placements whose art is missing or whose fields have the wrong types, and the lowest-ranked placements and arts past the map caps are dropped and counted in one log line. A file that can't be read, or has a version GRAFFITI_MAP_READ_VERSIONS doesn't list, leaves the registry empty and unsaved, so the file stays for an admin. An older version's file is read as this version's, which its next save writes.

The current map's own file is named by graffiti_file_key() of its name. An admin-loaded custom map, whose name is whatever the admin typed, has no file: its store has no path, so nothing is read or written.

Arguments:

load_in_background

Loads the map's graffiti onto its tiles a share of each tick at a time (load_yield()), then starts noting who connects. Decals show their art once their chunk's sheet is drawn.

load_yield

Lets the background load go on in this tick until it has taken load_share percent of it, or the tick is full, then waits for the next, so the load spreads evenly over the ticks and the server never feels it. Each wait comes between two pieces of the load, the largest a tile's stack merged or one icon drawn.

lowest_unconnected

Returns the lowest-ranked placement whose owner isn't connected, as rank() orders them: the owner seen longest ago, then that owner's oldest placement, then the one earlier in placements. It reads each owner's index instead of ranking every placement.

Returns:

make_room

Makes room on the map for a placement of an art, a new one or a placement's new art: past the map's caps, counting the account's own placements that its caps take, the lowest-ranked placement of an owner who isn't connected goes, until the art fits or nothing else can go. A placement never goes to make room for its own new art.

Arguments:

Returns:

map_fits

Whether the map's caps, its art_byte_budget included, leave room for a new placement of an art once the placements the account's own caps take are gone.

Arguments:

Returns:

on_client_connect

Notes when a player connected, and shows those of their dormant placements whose anchors resolve now, within the display budget.

Arguments:

on_pregame

Starts the background load as the game reaches the lobby.

Arguments:

own_evictions

Returns the account's own placements that its caps take for a new placement of an art: its oldest, while it keeps GRAFFITI_CKEY_PLACEMENT_CAP placements, or GRAFFITI_CKEY_UNIQUE_CAP arts and the art is new to it. Nothing is removed.

Arguments:

Returns:

pids_by_ckey

Returns the placement ids each account owns among some placements, read while the index still holds them.

Arguments:

Returns:

place_all

Shows each placement whose anchor resolves, best-ranked first while the display budget lasts, stacked on its tile in file order. The rest stay dormant: one that doesn't resolve counts a miss unless it is only waiting, and is dropped once it has missed GRAFFITI_MISS_LIMIT rounds in a row. The decals get their icons from build_sheets().

placement_turf

Returns the turf a placement's anchor names this round, for admin jumps and anchor checks. A shown placement's decal is in shown, which follows it even when its anchor no longer resolves to it.

Arguments:

Returns:

queue_save

Writes the map file after GRAFFITI_SAVE_DEBOUNCE, with every change made meanwhile.

rank

Orders placements from the one to keep showing most to the first to evict: an owner who is connected first, then owners seen most recently, then the newest placement, then the one later in candidates.

Arguments:

Returns:

reindex_placement

Moves a placement's index to its new packing, keeping its place among its account's placements.

Arguments:

release

Takes the placements of one space's anchors off their tiles and keeps them dormant, for graffiti_registry_release().

Arguments:

release_art

Drops one placement's hold on an art, and the art once nothing uses it, its icon and glow mask leaving the caches.

Arguments:

remove_placement

Removes a placement from the registry, and from its tile when it shows.

Arguments:

Returns:

remove_placements

Removes placements from the registry at once, as an admin deletes them, ends the painting under way on them (drop_work()), then merges each tile they showed on again once, yielding between tiles: removing them one by one would merge a tile's whole stack for each. What else a tile stacks stays, in its order.

Arguments:

Returns:

save_now

Writes the map file: the art and placements that last past this round, and when their owners were last seen. A map that has never had lasting graffiti gets no file. Nothing is written before the map's graffiti has loaded (loaded), while the registry may hold only part of the file, nor after the round-end save.

The file is joined from text, as json_encode() would write the same tree: each placement is kept packed already, and each art record is encoded as it is joined, so the registry holds no second copy of its art between saves.

Arguments:

sheet_for

Returns the sheet a stack shows from.

Arguments:

Returns:

spend_composite

Takes a composite's time out of composite_share, a session's last one and a paint job's finish included, which run whether or not there is room.

Arguments:

stack_keys

Returns what the map file caches of the stacks it keeps, so the next round's load shows them without merging them: each shown stack of several pieces, every piece of it kept, under its signature with its key and glow kind, beside the fingerprint of the merges that made them (graffiti_merge_fingerprint()).

Arguments:

Returns:

tile_gone

Removes for good every placement a decal showed: its surface was cleaned, or is gone.

Arguments:

unindex_placement

Takes a placement the registry no longer holds out of the index.

Arguments:

unpack

Reads a packed placement.

Arguments:

Returns:

update_placement_art

Gives a placement new art, as a freehand session or a paint job reveals more of its piece, and shows it. The art meets the caps a new placement's does (make_room()), its old art going from the placement, and when nothing can make room the placement keeps its old art.

Arguments:

Returns:

vv_edit_var

Refuses admin edits of the library directory, which library files are written under.

Arguments:

Returns:

wipe_for_test

Empties the registry for a test without writing anything: deletes every custom decal, clears the lists and the pending write, and unfreezes it. The store and the test settings stay.

write_sheet

Points a pack of stacks at their sheet file, writing it first unless an earlier round wrote the same one.

Arguments: