Arma Reforger Script API
|
Manager of external session save files. More...
Public Member Functions | |
void | UploadToWorkshop (string fileName) |
string | FindFileNameById (string id) |
Find name of save file base on provided id. | |
void | LoadOnInit () |
override void | OnUpdate (float timeSlice) |
override void | OnGameStart () |
override void | OnGameEnd () |
Actions | |
bool | Save (ESaveType type, string customName=string.Empty, WorldSaveManifest manifest=null, WorldSaveItem usedSave=null) |
Create a save of given type. | |
bool | OverrideCurrentSave (ESaveType type) |
Create the current save of given type. | |
bool | Load (string fileName) |
Load the given save file. | |
bool | RestartAndLoad () |
Restart the current world and load the latest save. | |
bool | RestartAndLoad (ESaveType type, string customName=string.Empty) |
Restart the current world and load save file of given type. | |
bool | RestartAndLoad (string fileName) |
Restart the current world and load given save file. | |
bool | Delete (ESaveType type, string customName=string.Empty) |
Delete a save file. | |
bool | Delete (string fileName) |
Delete a save file. | |
bool | FileExists (ESaveType type, string customName=string.Empty) |
Check if file of given type exists. | |
bool | FileExists (string fileName) |
Check if file exists. | |
bool | CanSaveToCloud () |
SCR_MetaStruct | GetMeta (string fileName) |
Open file name and read its meta header. | |
Lists | |
int | GetLocalSaveFiles (out notnull array< string > outLocalSaves, ESaveType saveTypes, bool currentMissionOnly) |
Get save file names of given save type. | |
int | GetLocalSaveFiles (out notnull array< string > outLocalSaves, ESaveType saveTypes, string missionFileName=string.Empty) |
Get save file names of given save type. | |
Save Types | |
bool | CanSave (ESaveType type) |
Check if saving is allowed at this moment. | |
void | SetStruct (ESaveType type, SCR_MissionStruct struct) |
Assign JSON struct to specific save type. | |
void | Log (ESaveType type) |
Print out JSON struct of given save type. | |
string | GetMissionFileName (string fileName) |
Extract mission file name from save file name. | |
string | GetCustomName (string fileName) |
Extract custom name from save file name. | |
SCR_UIInfo | GetSaveTypeInfo (string fileName) |
Get UI info representing save of type defined by the file name. | |
File Name To Load | |
bool | SetFileNameToLoad (SCR_MissionHeader missionHeader) |
Set the latest save file of given mission as the save that should be loaded upon mission start. | |
bool | SetFileNameToLoad (string fileName) |
Set which save file should be loaded upon mission start. | |
void | ResetFileNameToLoad () |
Remove save file name marked to be loaded after mission start. | |
bool | FindFileNameToLoad (out string fileNameToLoad) |
Check which save file should be loaded after mission start. | |
Latest Save | |
void | SetCurrentMissionLatestSave (string saveFileName) |
Set the latest save for the currently running mission. | |
void | RemoveCurrentMissionLatestSave () |
Remove the latest save for the currently running mission. | |
bool | FindCurrentMissionLatestSave (out string outSaveFileName) |
Find the latest save for the currently running mission. | |
void | SetLatestSave (string missionFileName, string saveFileName) |
Set the latest save for the given mission. | |
void | RemoveLatestSave (string missionFileName) |
Remove the latest save for the given mission. | |
bool | FindLatestSave (string missionFileName, out string outSaveFileName) |
Find the latest save for the given mission. | |
bool | FindLatestSave (SCR_MissionHeader missionHeader, out string outSaveFileName) |
Set the latest save for the given mission. | |
bool | HasLatestSave (string missionFileName) |
Check if the mission has a latest save. | |
bool | HasLatestSave (SCR_MissionHeader missionHeader) |
Check if the mission has a latest save. | |
Invokers | |
ScriptInvoker_SaveManagerCore | GetOnSaved () |
ScriptInvoker_SaveManagerCore | GetOnSaveFailed () |
ScriptInvoker_SaveManagerCore | GetOnLoaded () |
ScriptInvoker_SaveManagerCore | GetOnDeleted () |
ScriptInvokerString | GetOnLatestSave () |
SCR_ServerSaveRequestCallback | GetUploadCallback () |
Protected Member Functions | |
bool | IsDownloaded (string fileName) |
SCR_DSSessionCallback | FindCallback (ESaveType type) |
SCR_DSSessionCallback | FindCallback (string fileName) |
void | InitDebugMissionHeader (out SCR_MissionHeader missionHeader) |
void | OnGameStorageInitialize () |
Protected Attributes | |
ref array< ref SCR_DSSessionCallback > | m_aCallbacks |
ref SCR_LatestSaveDSSessionCallback | m_LatestSaveCallback |
ref SCR_DSSessionCallbackSessionStorage | m_SessionStorageCallback |
string | m_sMissionSaveFileName |
ref SCR_MissionHeader | m_WorkbenchMissionHeader |
ref ScriptInvoker_SaveManagerCore | m_OnSaved = new ScriptInvoker_SaveManagerCore() |
ref ScriptInvoker_SaveManagerCore | m_OnSaveFailed = new ScriptInvoker_SaveManagerCore() |
ref ScriptInvoker_SaveManagerCore | m_OnLoaded = new ScriptInvoker_SaveManagerCore() |
ref ScriptInvoker_SaveManagerCore | m_OnDeleted = new ScriptInvoker_SaveManagerCore() |
ref ScriptInvokerString | m_OnLatestSave = new ScriptInvokerString() |
bool | m_bLoadedOnInit |
bool | m_bDebugDelete |
ref SCR_ServerSaveRequestCallback | m_UploadCallback |
Static Protected Attributes | |
const string | ITEM_SAVE_POSTFIX = ".save_" |
const string | GAME_SESSION_STORAGE_FILE_NAME_TO_LOAD = "SCR_SaveFileManager_FileNameToLoad" |
const string | GAME_SESSION_STORAGE_USED_CLI = "SCR_SaveFileManager_UsedCLI" |
const string | CLI_PARAM = "loadSessionSave" |
Manager of external session save files.
bool SCR_SaveManagerCore.CanSave | ( | ESaveType | type | ) |
Check if saving is allowed at this moment.
type | Save type |
bool SCR_SaveManagerCore.CanSaveToCloud | ( | ) |
bool SCR_SaveManagerCore.Delete | ( | ESaveType | type, |
string | customName = string::Empty |
||
) |
Delete a save file.
fileName | Mission save file name |
customName | Custom addition to file name (optional; applicable only to some save types) |
bool SCR_SaveManagerCore.Delete | ( | string | fileName | ) |
Delete a save file.
fileName | Full save file name |
bool SCR_SaveManagerCore.FileExists | ( | ESaveType | type, |
string | customName = string::Empty |
||
) |
Check if file of given type exists.
type | Save type |
customName | Custom addition to file name (optional; applicable only to some save types) |
bool SCR_SaveManagerCore.FileExists | ( | string | fileName | ) |
Check if file exists.
fileName | Full save file name |
|
protected |
|
protected |
bool SCR_SaveManagerCore.FindCurrentMissionLatestSave | ( | out string | outSaveFileName | ) |
Find the latest save for the currently running mission.
[out] | outSaveFileName | String to be filled with the latest save file name |
string SCR_SaveManagerCore.FindFileNameById | ( | string | id | ) |
Find name of save file base on provided id.
id | of world save item save is coming from |
bool SCR_SaveManagerCore.FindFileNameToLoad | ( | out string | fileNameToLoad | ) |
Check which save file should be loaded after mission start.
[out] | fileNameToLoad | Save file name |
bool SCR_SaveManagerCore.FindLatestSave | ( | SCR_MissionHeader | missionHeader, |
out string | outSaveFileName | ||
) |
Set the latest save for the given mission.
missionFileName | Mission header |
saveFileName | Save file name |
bool SCR_SaveManagerCore.FindLatestSave | ( | string | missionFileName, |
out string | outSaveFileName | ||
) |
Find the latest save for the given mission.
missionFileName | Mission save file name |
saveFileName | Save file name |
string SCR_SaveManagerCore.GetCustomName | ( | string | fileName | ) |
Extract custom name from save file name.
fileName | Save file name |
int SCR_SaveManagerCore.GetLocalSaveFiles | ( | out notnull array< string > | outLocalSaves, |
ESaveType | saveTypes, | ||
bool | currentMissionOnly | ||
) |
Get save file names of given save type.
[out] | outLocalSaves | Array to be filled with save file names |
type | Save type | |
currentMissionOnly | When true, return onlyu save files belonging to currently loaded mission |
int SCR_SaveManagerCore.GetLocalSaveFiles | ( | out notnull array< string > | outLocalSaves, |
ESaveType | saveTypes, | ||
string | missionFileName = string::Empty |
||
) |
Get save file names of given save type.
[out] | outLocalSaves | Array to be filled with save file names |
type | Save type | |
missionFileName | When not an empty string, return only save files belonging to this mission |
SCR_MetaStruct SCR_SaveManagerCore.GetMeta | ( | string | fileName | ) |
Open file name and read its meta header.
Save | file name |
string SCR_SaveManagerCore.GetMissionFileName | ( | string | fileName | ) |
Extract mission file name from save file name.
fileName | Save file name |
ScriptInvoker_SaveManagerCore SCR_SaveManagerCore.GetOnDeleted | ( | ) |
ScriptInvokerString SCR_SaveManagerCore.GetOnLatestSave | ( | ) |
ScriptInvoker_SaveManagerCore SCR_SaveManagerCore.GetOnLoaded | ( | ) |
ScriptInvoker_SaveManagerCore SCR_SaveManagerCore.GetOnSaved | ( | ) |
ScriptInvoker_SaveManagerCore SCR_SaveManagerCore.GetOnSaveFailed | ( | ) |
SCR_UIInfo SCR_SaveManagerCore.GetSaveTypeInfo | ( | string | fileName | ) |
Get UI info representing save of type defined by the file name.
fileName | Save file name |
SCR_ServerSaveRequestCallback SCR_SaveManagerCore.GetUploadCallback | ( | ) |
bool SCR_SaveManagerCore.HasLatestSave | ( | SCR_MissionHeader | missionHeader | ) |
Check if the mission has a latest save.
missionFileName | Mission header |
bool SCR_SaveManagerCore.HasLatestSave | ( | string | missionFileName | ) |
Check if the mission has a latest save.
missionFileName | Mission save file name |
|
protected |
|
protected |
bool SCR_SaveManagerCore.Load | ( | string | fileName | ) |
Load the given save file.
This will "insert" it straight to running session, which can lead to issues (especially when loading the save file multiple times). Consider restarting the world first.
Save | file name |
void SCR_SaveManagerCore.LoadOnInit | ( | ) |
void SCR_SaveManagerCore.Log | ( | ESaveType | type | ) |
Print out JSON struct of given save type.
type | Save type |
override void SCR_SaveManagerCore.OnGameEnd | ( | ) |
override void SCR_SaveManagerCore.OnGameStart | ( | ) |
|
protected |
override void SCR_SaveManagerCore.OnUpdate | ( | float | timeSlice | ) |
bool SCR_SaveManagerCore.OverrideCurrentSave | ( | ESaveType | type | ) |
Create the current save of given type.
type | Save type |
void SCR_SaveManagerCore.RemoveCurrentMissionLatestSave | ( | ) |
Remove the latest save for the currently running mission.
saveFileName | Save file name |
void SCR_SaveManagerCore.RemoveLatestSave | ( | string | missionFileName | ) |
Remove the latest save for the given mission.
missionFileName | Mission save file name |
saveFileName | Save file name |
void SCR_SaveManagerCore.ResetFileNameToLoad | ( | ) |
Remove save file name marked to be loaded after mission start.
Does not remove the file itself.
bool SCR_SaveManagerCore.RestartAndLoad | ( | ) |
Restart the current world and load the latest save.
bool SCR_SaveManagerCore.RestartAndLoad | ( | ESaveType | type, |
string | customName = string::Empty |
||
) |
Restart the current world and load save file of given type.
type | Save type |
customName | Custom addition to file name (optional; applicable only to some save types) |
bool SCR_SaveManagerCore.RestartAndLoad | ( | string | fileName | ) |
Restart the current world and load given save file.
Save | file name |
bool SCR_SaveManagerCore.Save | ( | ESaveType | type, |
string | customName = string::Empty , |
||
WorldSaveManifest | manifest = null , |
||
WorldSaveItem | usedSave = null |
||
) |
Create a save of given type.
type | Save type |
customName | Custom addition to file name (optional; applicable only to some save types) |
void SCR_SaveManagerCore.SetCurrentMissionLatestSave | ( | string | saveFileName | ) |
Set the latest save for the currently running mission.
saveFileName | Save file name |
bool SCR_SaveManagerCore.SetFileNameToLoad | ( | SCR_MissionHeader | missionHeader | ) |
Set the latest save file of given mission as the save that should be loaded upon mission start.
missionHeader | Mission header |
bool SCR_SaveManagerCore.SetFileNameToLoad | ( | string | fileName | ) |
Set which save file should be loaded upon mission start.
fileName | Save file name |
void SCR_SaveManagerCore.SetLatestSave | ( | string | missionFileName, |
string | saveFileName | ||
) |
Set the latest save for the given mission.
missionFileName | Mission save file name |
saveFileName | Save file name |
void SCR_SaveManagerCore.SetStruct | ( | ESaveType | type, |
SCR_MissionStruct | struct | ||
) |
Assign JSON struct to specific save type.
Multiple save types can reuse the same struct.
type | Save type |
struct | JSON mission struct to be assigned. |
void SCR_SaveManagerCore.UploadToWorkshop | ( | string | fileName | ) |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |