Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SCR_DSSessionCallback Interface Reference

Callback for easy handling of world saving and loading. More...

Inheritance diagram for SCR_DSSessionCallback:
[legend]

Public Member Functions

ESaveType GetSaveType ()
 
SCR_UIInfo GetInfo ()
 
bool SaveSession (string missionFileName, string customName=string.Empty)
 Save current session to a file.
 
bool LoadSession (string fileName)
 Load session from given save file.
 
bool Delete (string missionFileName, string customName)
 Delete a save file.
 
bool Delete (string fileName)
 Delete a save file.
 
bool FileExists (string fileName, string customName=string.Empty)
 Check if file of given type exists.
 
SCR_MetaStruct GetMeta (string fileName)
 Open file name and read its meta header.
 
void SetStruct (SCR_MissionStruct struct)
 Set JSON struct that defines what will be saved.
 
SCR_MissionStruct GetStruct ()
 
void Log ()
 Print out JSON struct that is currently kept in the memory.
 
bool IsConfigured ()
 
bool IsCompatible (string fileName)
 Check if a save file name is compatible with this callback, and can be load using its settings.
 
string GetMissionFileName (string fileName)
 Extract mission file name from save file name.
 
string GetCustomName (string fileName)
 Compose save file name.
 
string GetCurrentCustomName ()
 
string GetFileName (string missionFileName, string customName)
 Extract custom name from save file name.
 
void OnGameStart (string missionFileName)
 
void OnGameEnd (string missionFileName)
 
override void OnSaving (string fileName)
 
override void OnSaveSuccess (string fileName)
 
override void OnSaveFailed (string fileName)
 
override void OnLoaded (string fileName)
 
override void OnLoadFailed (string fileName)
 
override void OnDeleteSuccess (string fileName)
 
override void OnDeleteFailed (string fileName)
 
void SCR_DSSessionCallback ()
 

Protected Member Functions

void OnLatestSave (string fileName)
 
void InvokeOnSaved ()
 

Protected Attributes

ESaveType m_eType
 
string m_sExtension
 
string m_sCustomNameDelimiter
 
bool m_bAlwaysLocal
 
bool m_bRegisterLatestSave
 
ref SCR_UIInfo m_Info
 
SCR_MissionStruct m_Struct
 
bool m_bLoadPreview
 
string m_sCurrentFileName
 

Detailed Description

Callback for easy handling of world saving and loading.

Controlled from SCR_SaveLoadComponent.

Constructor & Destructor Documentation

◆ SCR_DSSessionCallback()

void SCR_DSSessionCallback.SCR_DSSessionCallback ( )

Member Function Documentation

◆ Delete() [1/2]

bool SCR_DSSessionCallback.Delete ( string  fileName)

Delete a save file.

Parameters
fileNameFull save file name
Returns
True if the file was deleted

◆ Delete() [2/2]

bool SCR_DSSessionCallback.Delete ( string  missionFileName,
string  customName 
)

Delete a save file.

Parameters
fileNameMission save file name
customNameCustom addition to file name (optional; applicable only to some save types)
Returns
True if the file was deleted

◆ FileExists()

bool SCR_DSSessionCallback.FileExists ( string  fileName,
string  customName = string::Empty 
)

Check if file of given type exists.

Parameters
fileNameMission save file name
customNameCustom addition to file name (optional; applicable only to some save types)
Returns
True if the file exists

◆ GetCurrentCustomName()

string SCR_DSSessionCallback.GetCurrentCustomName ( )
Returns
Custom name of the previously saved or loaded file.

◆ GetCustomName()

string SCR_DSSessionCallback.GetCustomName ( string  fileName)

Compose save file name.

Parameters
fileNameMission save file name
customNameCustom addition to file name (optional; applicable only to some save types)
Returns
Full save file name

◆ GetFileName()

string SCR_DSSessionCallback.GetFileName ( string  missionFileName,
string  customName 
)

Extract custom name from save file name.

Parameters
fileNameSave file name
Returns
Custom name

Implemented in SCR_NumberedDSSessionCallback.

◆ GetInfo()

SCR_UIInfo SCR_DSSessionCallback.GetInfo ( )
Returns
UI info representing this save type

◆ GetMeta()

SCR_MetaStruct SCR_DSSessionCallback.GetMeta ( string  fileName)

Open file name and read its meta header.

Parameters
Savefile name
Returns
Meta header

◆ GetMissionFileName()

string SCR_DSSessionCallback.GetMissionFileName ( string  fileName)

Extract mission file name from save file name.

Parameters
fileNameSave file name
Returns
Mission file name

◆ GetSaveType()

ESaveType SCR_DSSessionCallback.GetSaveType ( )
Returns
Save type of this callback

◆ GetStruct()

SCR_MissionStruct SCR_DSSessionCallback.GetStruct ( )
Returns
JSON struct that defines what will be saved.

◆ InvokeOnSaved()

void SCR_DSSessionCallback.InvokeOnSaved ( )
protected

◆ IsCompatible()

bool SCR_DSSessionCallback.IsCompatible ( string  fileName)

Check if a save file name is compatible with this callback, and can be load using its settings.

Parameters
fileNameSave file name
Returns
True if compatible

◆ IsConfigured()

bool SCR_DSSessionCallback.IsConfigured ( )
Returns
True if this callback is configured correctly

◆ LoadSession()

bool SCR_DSSessionCallback.LoadSession ( string  fileName)

Load session from given save file.

Parameters
fileNameFull save file name
Returns
True if loading operation was requested

◆ Log()

void SCR_DSSessionCallback.Log ( )

Print out JSON struct that is currently kept in the memory.

◆ OnDeleteFailed()

override void SCR_DSSessionCallback.OnDeleteFailed ( string  fileName)

◆ OnDeleteSuccess()

override void SCR_DSSessionCallback.OnDeleteSuccess ( string  fileName)

◆ OnGameEnd()

void SCR_DSSessionCallback.OnGameEnd ( string  missionFileName)

◆ OnGameStart()

void SCR_DSSessionCallback.OnGameStart ( string  missionFileName)

◆ OnLatestSave()

void SCR_DSSessionCallback.OnLatestSave ( string  fileName)
protected

◆ OnLoaded()

override void SCR_DSSessionCallback.OnLoaded ( string  fileName)

◆ OnLoadFailed()

override void SCR_DSSessionCallback.OnLoadFailed ( string  fileName)

◆ OnSaveFailed()

override void SCR_DSSessionCallback.OnSaveFailed ( string  fileName)

◆ OnSaveSuccess()

override void SCR_DSSessionCallback.OnSaveSuccess ( string  fileName)

◆ OnSaving()

override void SCR_DSSessionCallback.OnSaving ( string  fileName)

◆ SaveSession()

bool SCR_DSSessionCallback.SaveSession ( string  missionFileName,
string  customName = string::Empty 
)

Save current session to a file.

Parameters
fileNameMission save file name
customNameCustom addition to file name (optional; applicable only to some save types)
Returns
True if saving operation was requested

◆ SetStruct()

void SCR_DSSessionCallback.SetStruct ( SCR_MissionStruct  struct)

Set JSON struct that defines what will be saved.

Parameters
structSave struct

Member Data Documentation

◆ m_bAlwaysLocal

bool SCR_DSSessionCallback.m_bAlwaysLocal
protected

◆ m_bLoadPreview

bool SCR_DSSessionCallback.m_bLoadPreview
protected

◆ m_bRegisterLatestSave

bool SCR_DSSessionCallback.m_bRegisterLatestSave
protected

◆ m_eType

ESaveType SCR_DSSessionCallback.m_eType
protected

◆ m_Info

ref SCR_UIInfo SCR_DSSessionCallback.m_Info
protected

◆ m_sCurrentFileName

string SCR_DSSessionCallback.m_sCurrentFileName
protected

◆ m_sCustomNameDelimiter

string SCR_DSSessionCallback.m_sCustomNameDelimiter
protected

◆ m_sExtension

string SCR_DSSessionCallback.m_sExtension
protected

◆ m_Struct

SCR_MissionStruct SCR_DSSessionCallback.m_Struct
protected

The documentation for this interface was generated from the following file: