config
Plan-level file management. Menu values still go through gui.set / gui.get — config.* only handles plan switching / listing / saving as a new plan.
| Method | Description |
|---|---|
config.save() | Save the current plan |
config.save_as(plan_name) | Save as a new plan name |
config.switch(plan_name) | Switch to the given plan |
config.list() → table<string> | List all available plan names |
config.current() → string | Current plan name |
No
config.load— it would duplicateconfig.switch.
Example
lua
log.info("Current plan: " .. config.current())
log.info("Available plans: " .. table.concat(config.list(), ", "))
-- One-shot switch to cqc.preset
if not config.switch("cqc") then
gui.notify:error("Switch failed", 2.0)
end