Class engine.SavefilePipe

Savefile code Creates a savefile pipe, savefiles requests can be pushed into it, it will execute them in order and, as much as possible, as a background process, thus not preventing the game from running.
There can only be one pipe! DO NOT TRY TO MAKE MORE

Methods

engine.SavefilePipe:init (class, max_before_wait)

Init a savefile pipe

engine.SavefilePipe:steamCleanup ()

Cleanup old saves in steam cloud if needed

engine.SavefilePipe:ignoreCloudSave (v)

Disables/enables clean saves

engine.SavefilePipe:push (savename, type, object, class, on_end)

Push a savefile request

engine.SavefilePipe:pushGeneric (name, fct)

Push a generic action to be done once saves complete

engine.SavefilePipe:doThread ()

Actually do the saves This should run in a coroutine.
Do not call this, this is automatic!

engine.SavefilePipe:forceWait ()

Force to wait for the saves

engine.SavefilePipe:ignoreSaveToken (v)

Allow to ignore saveversion token

engine.SavefilePipe:doLoad (savename, type, class)

Load a savefile



Methods

engine.SavefilePipe:init (class, max_before_wait)
Init a savefile pipe

Parameters:

  • class the name of the Savefile class to use. Defaults to engine.Savefile
  • max_before_wait Number of saves allowed in the pipe before the game pauses to do the saves (this is to prevent pushing too many saves and making it very very long)
engine.SavefilePipe:steamCleanup ()
Cleanup old saves in steam cloud if needed
engine.SavefilePipe:ignoreCloudSave (v)
Disables/enables clean saves

Parameters:

  • v true or false
engine.SavefilePipe:push (savename, type, object, class, on_end)
Push a savefile request

Parameters:

  • savename the name of the savefile to handle
  • type the Savefile method to use. I.e: "game", "level", "zone". This will cann the Savefile:saveGame, Savefile:saveLevel, Savefile:saveZone methods
  • object the object to save
  • class a class name, if different from the default one
  • on_end a function to call when this object is saved; this can be nil
engine.SavefilePipe:pushGeneric (name, fct)
Push a generic action to be done once saves complete

Parameters:

  • name
  • fct
engine.SavefilePipe:doThread ()
Actually do the saves This should run in a coroutine.
Do not call this, this is automatic!
engine.SavefilePipe:forceWait ()
Force to wait for the saves
engine.SavefilePipe:ignoreSaveToken (v)
Allow to ignore saveversion token

Parameters:

  • v
engine.SavefilePipe:doLoad (savename, type, class)
Load a savefile

Parameters:

  • savename the name of the savefile to handle
  • type the Savefile method to use. I.e: "game", "level", "zone". This will cann the Savefile:saveGame, Savefile:saveLevel, Savefile:saveZone methods
  • class a class name, if different from the default one
generated by LDoc 1.4.3