Interface ISaveGame
- Namespace
- Vintagestory.API.Server
- Assembly
- VintagestoryAPI.dll
public interface ISaveGame
- Extension Methods
Properties
CreatedGameVersion
The game version under which this savegame was created
string CreatedGameVersion { get; }
Property Value
EntitySpawning
bool EntitySpawning { get; set; }
Property Value
IsNew
True if this is a newly created world
bool IsNew { get; }
Property Value
LandClaims
List<LandClaim> LandClaims { get; set; }
Property Value
LastSavedGameVersion
The game version under which this savegame was last saved
string LastSavedGameVersion { get; }
Property Value
PlayStyle
string PlayStyle { get; set; }
Property Value
SavegameIdentifier
A globally unique identifier for this savegame
string SavegameIdentifier { get; }
Property Value
Seed
int Seed { get; set; }
Property Value
TotalGameSeconds
long TotalGameSeconds { get; set; }
Property Value
WorldConfiguration
ITreeAttribute WorldConfiguration { get; }
Property Value
WorldName
string WorldName { get; set; }
Property Value
WorldType
string WorldType { get; set; }
Property Value
Methods
GetData(string)
Gets a previously saved object from the savegame. Returns null if no such data under this key was previously set.
byte[] GetData(string key)
Parameters
key
stringThe key to look for
Returns
- byte[]
GetData<T>(string, T)
Gets a previously saved object from the savegame. Returns null if no such data under this key was previously set.
T GetData<T>(string key, T defaultValue = default)
Parameters
key
stringdefaultValue
T
Returns
- T
Type Parameters
T
StoreData(string, byte[])
Store the given data persistently to the savegame. Size limit is around 1 gigabyte for all data stored along with the savegame datastructure. If you need more space, you have to store it somewhere else.
void StoreData(string key, byte[] data)
Parameters
StoreData<T>(string, T)
Store the given data persistently to the savegame. Size limit is around 1 gigabyte for all data stored along with the savegame datastructure. If you need more space, you have to store it somewhere else.
void StoreData<T>(string key, T data)
Parameters
key
stringdata
T
Type Parameters
T