saverestore
The saverestore library contains functions relating to the singleplayer save system built into the game.
Methods
Adds a restore/load hook for the Half-Life 2 save system.
Adds a save hook for the Half-Life 2 save system. You can this to carry data through level transitions in Half-Life 2.
Loads Entity:GetTable from the save game file that is being loaded and merges it with the given entitys Entity:GetTable.
saverestore.LoadGlobal( IRestore save )
This is used internally - although you're able to use it you probably shouldn't.
Called by engine when a save is being loaded.
This handles loading gamemode and calls all of the hooks added with saverestore. AddRestoreHook.
saverestore.PreRestore()
This is used internally - although you're able to use it you probably shouldn't.
Called by the engine just before saverestore. LoadGlobal is.
saverestore.PreSave()
This is used internally - although you're able to use it you probably shouldn't.
Called by the engine just before saverestore. SaveGlobal is.
Reads a table from the save game file that is being loaded.
Loads a variable from the save game file that is being loaded.
Variables will be read in the save order you have saved them.
Saves entitys Entity:GetTable to the save game file that is being saved.
saverestore.SaveGlobal( ISave save )
This is used internally - although you're able to use it you probably shouldn't.
Called by engine when a save is being saved.
This handles saving gamemode and calls all of the hooks added with saverestore. AddSaveHook.
Returns how many writable keys are in the given table.
Write a table to a save game file that is being saved.