-
Notifications
You must be signed in to change notification settings - Fork 16
SaveManager
Namespace: TommoJProductions.ModApi
Represents save and load logic.
public static class SaveManagerInheritance Object → SaveManager
The position Identifier (Tag)
public static string positionTag;The rotation Identiifer (Tag)
public static string rotationTag;The installed Identiifer (Tag)
public static string installedTag;The install point id Identiifer (Tag)
public static string installPointIDTag;The bolts Identiifer (Tag)
public static string boltTag;The none (null) Identiifer (Tag)
public static string noneTag;The save file name including the file extention.
public static string saveFile;Represents the pre identifier.
public static string identifier { get; }Loads a value using the s PartID combined with the . Creates an ES2Reader
public static T loadValue<T>(Part part, string id)T
The save type to load.
part Part
The part to use its PartID.
id String
The id of the value to load
T
If value id is found returns the loaded value otherwise returns null.
public static T loadValue<T>(Part part, string id, ES2Reader reader)T
part Part
id String
reader ES2Reader
T
Saves a value using the s PartID combined with the . creates a writer.
public static void saveValue<T>(Part part, string id, T value)T
The save type to Save.
part Part
The part to use its PartID.
id String
The id of the value to save
value T
The value to save.
public static void saveValue<T>(Part part, string id, T value, ES2Writer writer)T
part Part
id String
value T
writer ES2Writer
public static void saveValue<T>(string id, T value, ES2Writer writer)T
id String
value T
writer ES2Writer
Saves a value. Creates an ES2Writer
public static void saveValue<T>(string id, T value)T
id String
The Identifier to save as
value T
the value to save.
loads a value. Creates an ES2Reader
public static T loadValue<T>(string id)T
id String
The Identifier to save as
T
public static T loadValue<T>(string id, ES2Reader reader)T
id String
reader ES2Reader
T
public static bool loadValue<T>(string id, T& value, ES2Reader reader)T
id String
value T&
reader ES2Reader
if the identifier exists in the es2 modapi save file.
public static bool exists(string id)id String
Loads Part save info. if does not exist. returns .
public static PartSaveInfo loadPart(string id)id String
The identifier of the part save info to get.
PartSaveInfo
found part save info or .
public static T readOrDefault<T>(string id, ES2Reader reader)T
id String
reader ES2Reader
T
internal static void savePart(Part part, ES2Writer writer)part Part
writer ES2Writer
internal static void saveTrigger(Trigger trigger, ES2Writer writer)trigger Trigger
writer ES2Writer
Loads bolts from es2 using the Tag . Creates an ES2Reader.
internal static Int32[] loadBolts(string id)id String
The id of the bolts to load.
Int32[]
If found returns loaded bolts, Otherwise returns .
internal static Int32[] loadBolts(string id, ES2Reader reader)id String
reader ES2Reader
internal static void saveBolts(string id, Int32[] boltTightness)id String
boltTightness Int32[]
internal static void saveBolts(string id, Int32[] boltTightness, ES2Writer writer)id String
boltTightness Int32[]
writer ES2Writer