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

cyborg_customization

The account's cyborg layout sidecar, cyborg_customization.json beside preferences.json, keyed by character slot.

Vars

next_write_atThe earliest world.time the next write may run, CYBORG_LAYOUT_SAVE_SPACING after the last one
preferences_refThe preferences that own this store, so a finished write can tell their editor
read_refusedThe file on disk was past CYBORG_LAYOUT_MAX_SIDECAR_BYTES, so it was not read and is never overwritten.
write_failedWhether or not the last write failed, which leaves the tree pending
write_oversizedThe last write was refused because the whole tree encodes past CYBORG_LAYOUT_MAX_SIDECAR_BYTES.
write_pendingPending durability belongs to the account, not whichever character is open now.

Procs

DestroyA store that goes owes no queued save - it writes what it has here
bytes_withAbout how big the file would be with text as key's entry. Other slots count without JSON escapes, so save() stays the exact check; this only keeps an over-limit account from being staged at all.
flush_pendingWrites the tree now if it has unsaved changes. Inside the account's spacing, SScyborg_layout_saves writes it later instead, with whatever the tree holds by then; force writes regardless, for teardown.
loadThe parent decodes a file of any size. An oversized one is left on disk as it is.
request_saveAsks for a save of this account. Whatever the editor's draft holds when it runs is what gets saved.
run_saveThe queued save: stages the editor's draft if it asked for that, then writes the account and tells the editor.
saverust-g returns error text rather than a success boolean. Returns whether the file now holds the tree.
wipeImport replacement must cancel work owned by the superseded tree. A queued save then finds nothing to write.
write_errorWhat the editor tells the player about the file or the last write, null when both are fine.

Var Details

next_write_at

The earliest world.time the next write may run, CYBORG_LAYOUT_SAVE_SPACING after the last one

preferences_ref

The preferences that own this store, so a finished write can tell their editor

read_refused

The file on disk was past CYBORG_LAYOUT_MAX_SIDECAR_BYTES, so it was not read and is never overwritten.

write_failed

Whether or not the last write failed, which leaves the tree pending

write_oversized

The last write was refused because the whole tree encodes past CYBORG_LAYOUT_MAX_SIDECAR_BYTES.

write_pending

Pending durability belongs to the account, not whichever character is open now.

Proc Details

Destroy

A store that goes owes no queued save - it writes what it has here

bytes_with

About how big the file would be with text as key's entry. Other slots count without JSON escapes, so save() stays the exact check; this only keeps an over-limit account from being staged at all.

flush_pending

Writes the tree now if it has unsaved changes. Inside the account's spacing, SScyborg_layout_saves writes it later instead, with whatever the tree holds by then; force writes regardless, for teardown.

load

The parent decodes a file of any size. An oversized one is left on disk as it is.

request_save

Asks for a save of this account. Whatever the editor's draft holds when it runs is what gets saved.

run_save

The queued save: stages the editor's draft if it asked for that, then writes the account and tells the editor.

save

rust-g returns error text rather than a success boolean. Returns whether the file now holds the tree.

wipe

Import replacement must cancel work owned by the superseded tree. A queued save then finds nothing to write.

write_error

What the editor tells the player about the file or the last write, null when both are fine.