fn cached_lua_api<'a>(
cache: &'a mut Option<(PathBuf, u64, Option<LuaApi>)>,
game: &GameInfo,
settings: &Settings,
dependencies: &Dependencies,
) -> Option<&'a LuaApi>Expand description
This function returns the Lua scripting API of a game, rebuilding the cached one if it’s outdated.
The API is rebuilt when the game or its Assembly Kit path change, or when the dependencies cache is regenerated.
§Arguments
cache- Cached API, updated if outdated.game- Game whose API to return.settings- Settings, to find the game’s Assembly Kit.dependencies- Dependencies cache with the vanilla scripts of the game.
§Returns
The API, or None if the game’s Assembly Kit has no scripting docs.