modular_nova/modules/preferences_import/code/_sanitise.dm 
| PREFS_IMPORT_MAX_DEPTH | Cap on JSON nesting depth, json_decode has none of its own. |
|---|---|
| PREFS_IMPORT_MAX_SLOTS | Cap on character slots in an imported file. |
| PREFS_IMPORT_PENDING_KEY | Marks a file as waiting on pass 2. |
| PREFS_IMPORT_NOTICE_KEY | Have we already shown them the import notice? |
| /proc/prefs_import_tree_too_deep | Check depth iteratively so a deeply nested upload cannot overflow the call stack. |
| /proc/prefs_import_prevalidate | Structural checks. Returns an error string, or null if it's fine. |
| /proc/prefs_import_pass1 | Pass 1. Retains character migration inputs. Player imports may only replace player-owned root fields. Supplying local_player_data enables the player allowlist; staff may still restore a complete backup. |
| /proc/prefs_import_player_root | Registered preferences plus raw player settings and inputs still used by supported migrations. |
| /proc/prefs_import_clean_text_list | Lists consumed as text/type names by raw loaders must not carry numeric indexes or nested collections. |
| /proc/prefs_import_clean_loadout_presets | loadout_lists is preset -> path -> details, so unwrap a level first. |
| /proc/prefs_import_clean_loadout | The UI encodes and caps these, the load path doesn't, so we redo it here. |
| /proc/prefs_import_clean_assoc_paths | We just guarantee the shape, the owning loaders resolve them. |
| /proc/prefs_import_strip_empty_loadout_keys | Migration leaves null keys behind, and sanitize_loadout_list stack_traces on them. |
| /proc/prefs_import_strip_empty_keys | Pass 1 and native migrations produce unique path keys; copy only to remove empty keys, preserving shared lists. |
Define Details
PREFS_IMPORT_MAX_DEPTH 
Cap on JSON nesting depth, json_decode has none of its own.
PREFS_IMPORT_MAX_SLOTS 
Cap on character slots in an imported file.
PREFS_IMPORT_NOTICE_KEY 
Have we already shown them the import notice?
PREFS_IMPORT_PENDING_KEY 
Marks a file as waiting on pass 2.