modular_aphelion/modules/graffiti/code/library.dm 
| GRAFFITI_LIBRARY_MAX_BYTES | Size limit of an account's library file. |
|---|---|
| /datum/json_savefile/custom_sprites/graffiti | A graffiti JSON file: the custom sprites store's verified writes, loading every top-level entry, held to size_limit. |
| /datum/json_savefile/custom_sprites/graffiti/library | An account's graffiti library file. |
| /datum/graffiti_library | One account's graffiti library: up to GRAFFITI_LIBRARY_CAP pieces and the Unfinished slot, kept in one JSON file under SSgraffiti.library_root. Get it with graffiti_library(). |
| /proc/graffiti_library | Returns an account's library, loading it from its file when it isn't loaded, as on first use or after it unloaded. |
| /proc/graffiti_library_path | Returns where an account's library file lives, in a directory named by the ckey's first character. |
| /proc/graffiti_library_delete | Deletes an account's library, file and all, as an admin purge does. A library still held elsewhere is emptied and can't write its file back. |
| /proc/graffiti_library_flush | Writes the library changes the write pacing still holds back, as the round ends or the world stops. |
| /proc/graffiti_library_unload | Unloads an account's library as its owner disconnects, unless something still holds it: an editor session or a paint job of the account's, a write the pacing holds back, or an import or export under way. An editor or paint job that ends, and a held write once made, ask again while the owner is away; an import or export doesn't, so its library waits for the owner's next disconnect or the reboot. graffiti_library() loads it again when it is next wanted, under a newer revision. |
| /proc/graffiti_unix_time | Returns the current unix time in whole seconds, as the ten-digit text libraries store and sort. BYOND numbers can't hold it exactly. |
| /proc/graffiti_json_decode | Decodes a graffiti file's JSON, such as a piece's or a map's, as hostile input, without validating what it holds. |
| /proc/graffiti_library_check | Returns a piece in the canonical form a library keeps, or why a library can't keep it. |
| /proc/graffiti_receive | Asks a player for a graffiti piece file and decodes it. This sleeps while the file dialog is open. |
| /proc/graffiti_import | Lets a player import a graffiti piece file into their library as a new piece. This sleeps while the file dialog is open. |
| /proc/graffiti_export | Sends a saved piece to a player as a downloaded file. custom_style_send_text() claims the account's transfer slot and export cooldown, which custom styles share. |
Define Details
GRAFFITI_LIBRARY_MAX_BYTES 
Size limit of an account's library file.