luxe: save
import "luxe: save" for SaveA cross platform save system with a Key/Value store and file storage for a user, and save slots.
//create a new save profile. loads the default save slot for single save usevar save = Save.create("organization", "game")//OR//create a new slot and set it as the active save slotSave.new_slot(save)//OR//Load a save slot from e.g Save.list()var list = Save.list(save)//activate the first slotSave.set_slot(save, list[0])//Set some slot specific valuesSave.set(save, "key", "value")//Set some user specific valuesSave.set(save, "key", "value", SaveScope.user)//Get some values from the slotvar name = Save.get(save, "name", "default_name")//get user values, like settingsvar setting = Save.get(save, "setting", false, SaveScope.user)
Save.create(..)
Section titled “Save.create(..)”Save.create(org : String, app : String) : SaveCreate a save slot for the given organization/app name pair. Defaults to ‘user’ for user id
Save.create(…)
Section titled “Save.create(…)”Save.create(org : String, app : String, user_id : String) : SaveCreate a save slot for the given user and organization/app name pair. e.g If you have a steam user ID, you’d pass it in here as a string.
Save.save(.)
Section titled “Save.save(.)”Save.save(save : Save) : unknownFlush the data for this profile to storage. Unless auto save on key change is off, unnecessary
Save.new_slot(.)
Section titled “Save.new_slot(.)”Save.new_slot(save : Save) : NoneSet the current active save slot to a new slot ID.
Save.set_slot(..)
Section titled “Save.set_slot(..)”Save.set_slot(save : Save, slot : String) : unknownSet the current active save slot to a Slot ID (from Save.list or otherwise).
Save.list(.)
Section titled “Save.list(.)”Save.list(save : Save) : unknownReturn a list of save slot uuids for use with the slot query apis, sorted by modified time (latest first)
Save.file_exists(..)
Section titled “Save.file_exists(..)”Save.file_exists(save : Save, file_id : String) : unknownReturns true if the given file path can be found for the active save slot
Save.file_exists(…)
Section titled “Save.file_exists(…)”Save.file_exists(save : Save, file_id : String, kind : SaveScope) : unknownReturns true if the given file path can be found
Save.set_file(…)
Section titled “Save.set_file(…)”Save.set_file(save : Save, file_id : String, file_contents : String) : unknownSave the contents of a file at the given path for the active save slot. The path is a relative style path, like
some/file/here
Save.set_file(…)
Section titled “Save.set_file(…)”Save.set_file(save : Save, file_id : String, file_contents : String, kind : SaveScope) : unknownSave the contents of a file at the given path. The path is a relative style path, like
some/file/here
Save.get_file(..)
Section titled “Save.get_file(..)”Save.get_file(save : Save, file_id : String) : unknownReturn the contents of the file with the given path for the active save slot. If not found, returns null
Save.get_file(…)
Section titled “Save.get_file(…)”Save.get_file(save : Save, file_id : String, kind : SaveScope) : unknownReturn the contents of the file with the given path. If not found, returns null
Save.set(…)
Section titled “Save.set(…)”Save.set(save : Save, key : String, value : Any) : unknownSet the value for a key to the given value, for the active save slot
Save.set(…)
Section titled “Save.set(…)”Save.set(save : Save, key : String, value : Any, kind : SaveScope) : unknownSet the value for a key to the given value
Save.get(…)
Section titled “Save.get(…)”Save.get(save : Save, key : String, default : Any) : unknownReturns the value for the given key if found, otherwise returns the default provided, for the active save slot
Save.get(…)
Section titled “Save.get(…)”Save.get(save : Save, key : String, default : Any, kind : SaveScope) : unknownReturns the value for the given key if found, otherwise returns the default provided
Save.has(..)
Section titled “Save.has(..)”Save.has(save : Save, key : String) : unknownReturns true if the given key can be found, for the active save slot
Save.has(…)
Section titled “Save.has(…)”Save.has(save : Save, key : String, kind : SaveScope) : unknownReturns true if the given key can be found
Save.get_keys(.)
Section titled “Save.get_keys(.)”Save.get_keys(save : Save) : unknownReturns a list of knowns keys, for the active save slot
Save.get_keys(..)
Section titled “Save.get_keys(..)”Save.get_keys(save : Save, kind : SaveScope) : unknownReturns a list of knowns keys
Save.slot_clear(..)
Section titled “Save.slot_clear(..)”Save.slot_clear(save : Save, slot : String) : BoolSlot query. Delete a save slot, return true or false for success
Save.slot_backup(..)
Section titled “Save.slot_backup(..)”Save.slot_backup(save : Save, slot : String) : StringSlot query. Makes a backup of the slot, returns a slot ID of the backup if successful, null if false
Save.slot_modified_time(..)
Section titled “Save.slot_modified_time(..)”Save.slot_modified_time(save : Save, slot : String) : unknownSlot query. Returns the modified time for the given save slot ID
Save.slot_file_exists(…)
Section titled “Save.slot_file_exists(…)”Save.slot_file_exists(save : Save, slot : String, file_id : String) : unknownSlot query. Returns true if the given file path can be found for the given save slot ID
Save.slot_set_file(…)
Section titled “Save.slot_set_file(…)”Save.slot_set_file(save : Save, slot : String, file_id : String, file_contents : String) : unknownSlot query. Save the contents of a file at the given path for the given slot ID. The path is a relative style path, like
some/file/here
Save.slot_get_file(…)
Section titled “Save.slot_get_file(…)”Save.slot_get_file(save : Save, slot : String, file_id : String) : unknownSlot query. Return the contents of the file with the given path for the given slot ID. If not found, returns null
SaveScope
Section titled “SaveScope”import "luxe: save" for SaveScopeno docs found
SaveScope.slot
Section titled “SaveScope.slot”SaveScope.slot : unknownno docs found
SaveScope.user
Section titled “SaveScope.user”SaveScope.user : unknownno docs found