/tg/ Station 13 - Modules - Types — Define Details

modular_aphelion/modules/graffiti/code/library.dm

GRAFFITI_LIBRARY_MAX_BYTESSize limit of an account's library file.
/datum/json_savefile/custom_sprites/graffitiA 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/libraryAn account's graffiti library file.
/datum/graffiti_libraryOne 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_libraryReturns 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_pathReturns where an account's library file lives, in a directory named by the ckey's first character.
/proc/graffiti_library_deleteDeletes 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_flushWrites the library changes the write pacing still holds back, as the round ends or the world stops.
/proc/graffiti_library_unloadUnloads 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_timeReturns 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_decodeDecodes 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_checkReturns a piece in the canonical form a library keeps, or why a library can't keep it.
/proc/graffiti_receiveAsks a player for a graffiti piece file and decodes it. This sleeps while the file dialog is open.
/proc/graffiti_importLets a player import a graffiti piece file into their library as a new piece. This sleeps while the file dialog is open.
/proc/graffiti_exportSends 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.