Expand description
Per-session state, and the operations a session can run on it.
SessionState owns everything a session works with: the open packs, the selected game,
its schema and its dependencies. The operations live in the submodules, split by domain,
and return plain results instead of protocol messages. crate::api translates the
requests of the API into these operations.
ModulesΒ§
- dependencies π
- Game selection and dependencies operations.
- diagnostics π
- Diagnostics and Lua script operations.
- files π
- File operations: create, add, delete, move, extract, decode and save files of the open packs, and read files from every data source.
- packs π
- Pack lifecycle and metadata operations: open, create, save, close, flags, settings and notes.
- schema π
- Schema operations: definitions, local patches, and updating the schema from the Assembly Kit.
- search π
- Global search and replace operations.
- tables π
- Table operations: merge, update, TSV import/export, key deletes, and lookups of table data and references across the open packs and the dependencies.
- tools π
- Tool operations: optimizer, map packing, startpos and CEO building, translations, MyMods, animation ids, glTF export and plugin scripts.
StructsΒ§
- Extract
Options - Options for operations that write files of a pack to disk.
- MyMod
Options - Editor support to set up in a new MyMod folder.
- Paste
Entry π - A file to paste. Only its path is stored: the file itself is cloned from its pack when pasting.
- Save
Options - Options for saving a pack.
- Session
State - Everything a session owns. One instance lives in each sessionβs background loop.
EnumsΒ§
- Decoded
File - Result of decoding a file.
- Merge
Outcome - Result of merging tables.
FunctionsΒ§
- cached_
lua_ πapi - Returns the Lua scripting API of a game, rebuilding the cached one if itβs outdated.
- decode_
tables π - Decodes the DB and Loc files among
files, so theyβre in memory for the diagnostics to work. - encode_
extra_ πdata - Returns the data needed to encode files of a pack for the provided game.
- load_
schema π - Loads the schema of a game, re-decoding the tables of every open pack with it.
- loaded_
schema π - Returns the loaded schema, or an error if there is none.
- loaded_
schema_ πmut - Returns the loaded schema mutably, or an error if there is none.
- optimizer_
options_ with - Returns optimizer options with some of them changed, by name.
- pack π
- Returns the open pack with the provided key.
- pack_
mut π - Returns the open pack with the provided key, mutably.
- pack_
summary π - Returns the short description of an open pack.
- parent_
pack_ πnames - Returns the names of the parent packs of every open pack.
- plugin_
scripts - Returns the paths of the plugin scripts in the configβs scripts folder.
Type AliasesΒ§
- LuaApi
Cache π - Cached Lua scripting API: the docs path and dependencies build date it was built from, and the API itself.
- Paths
ByPack - Paths of files, by the key of their pack.