|
Arma Reforger Script API
|
Scripted api for handling workshop and backend interactions. More...
Public Member Functions | |
| void | Init () |
| Setup workshop data to get offline items and scenarios. | |
| void | UploadSave (notnull WorldSaveItem save, notnull WorldSaveManifest manifest, bool public) |
| Upload save to workshop. | |
| bool | DeleteOfflineSaveByName (string fileName) |
| Find local World save item by save file name. | |
| void | DeletePublishedSave (notnull WorldSaveItem save) |
| Delete published save from workshop. | |
| ResourceName | CurrentScenarioImage () |
| Get thumbnail of current scenario or use fallback back image. | |
| void | GetOfflineSaves (out array< WorldSaveItem > saves) |
| Get offline workshop items and filter out only WorldSaveItem type. | |
| WorldSaveItem | FindSaveItemBySaveFileName (string fileName) |
| Return world save item that cotains save file with provided name. | |
| SCR_BackendCallback | GetUploadCallback () |
| SCR_BackendCallback | GetLoadSavesPageCallback () |
| SCR_BackendCallback | GetDeletePublishedCallback () |
| void | SetCurrentSave (string fileName, WorldSaveItem saveItem) |
| string | GetCurrentSave (out WorldSaveItem saveItem) |
| ScriptInvokerString | GetOnCurrentSaveChanged () |
| void | SetEditedSaveManifest (WorldSaveManifest manifest, string editingValue="", string value="") |
| void | ClearEditedSaveManifest () |
| void | SetEditedSaveManifestEditingValue (string editingValue) |
| SCR_EditedSaveManifest | GetEditedSaveManifest () |
| void | ~SCR_SaveWorkshopManager () |
Static Public Member Functions | |
| static SCR_SaveWorkshopManager | GetInstance () |
| static MissionWorkshopItem | GetCurrentScenario () |
| Get mission workshop item of current scenario. | |
| static ResourceName | GetCurrentScenarioId () |
| Get resource path of current scenario or fallback to path of testing world. | |
| static MissionWorkshopItem | GetScenarioMissionWorkshopItem (MissionHeader missionHeader) |
| static string | GetScenarioNameFile (MissionWorkshopItem missionItem) |
| static string | GetCurrentScenarioNameFile () |
| Get name of current scenario or fallback to testing world name for save file name. | |
| static string | GetCurrentScenarioNameTranslated () |
| Get translated name of current scenario or fallback to testing world name. | |
| static string | GetSaveFileID (string fileName) |
| Find ID in save file name for format 'scenario_name.type_id'. | |
| static string | ScenarioGUIDToID (string guid) |
| Convert GUID format '{id}Missions/Scenario.cof' to 'id'. | |
| static bool | CanOverrideSave (notnull WorldSaveItem save) |
| Check if player can save dirrectly into the save. | |
| static bool | IsSaveLocalOnly (notnull WorldSaveItem save) |
| static string | StripSaveIdFromSaveFileName (string fileName) |
| Remove '_id' from provided save file name. | |
Protected Member Functions | |
| void | SCR_SaveWorkshopManager () |
Protected Attributes | |
| string | m_sCurrentSave |
| WorldSaveItem | m_CurrentSaveItem |
| ref SCR_EditedSaveManifest | m_EditedManifest |
| ref array< MissionWorkshopItem > | m_aMissions = {} |
| ref array< string > | m_aScenarioSources = {} |
| ref ScriptInvokerString | m_OnCurrentSaveChanged |
| ref SCR_BackendCallback | m_UploadCallback = new SCR_BackendCallback() |
| ref SCR_BackendCallback | m_LoadSavesPageCallback = new SCR_BackendCallback() |
| ref SCR_BackendCallback | m_ChangeCallback |
| ref SCR_BackendCallback | m_DeletePublishedCallback = new SCR_BackendCallback() |
Static Protected Attributes | |
| const string | FALLBACK_SCENARIO_NAME = "GM_TestWorld" |
| const string | FALLBACK_SCENARIO_ID = "{D46718CC67B45055}Missions/GM_TestWorld.conf" |
| const int | ID_LENGTH = 16 |
| const int | THUMBNAIL_WIDTH = 800 |
| const string | SAVE_EXTENSION = ".save" |
| const string | SAVE_EXTENSION_MODDED = ".save_" |
| const string | SAVE_FILE_EXTENSION = ".json" |
| const string | SESSION_SAVE_NAME = "TestSaveName" |
| const string | SAVE_FORMAT = "%1-%2-%3" |
| static ref SCR_SaveWorkshopManager | s_Instance |
Scripted api for handling workshop and backend interactions.
|
protected |
| void SCR_SaveWorkshopManager.~SCR_SaveWorkshopManager | ( | ) |
|
static |
Check if player can save dirrectly into the save.
Player shouldn't be able to override save downloaded from workshop which are not owned by player.
| [in] | save | Save item to override - is local save item |
| void SCR_SaveWorkshopManager.ClearEditedSaveManifest | ( | ) |
| ResourceName SCR_SaveWorkshopManager.CurrentScenarioImage | ( | ) |
Get thumbnail of current scenario or use fallback back image.
| bool SCR_SaveWorkshopManager.DeleteOfflineSaveByName | ( | string | fileName | ) |
Find local World save item by save file name.
| [in] | string | Save file name to find |
| void SCR_SaveWorkshopManager.DeletePublishedSave | ( | notnull WorldSaveItem | save | ) |
Delete published save from workshop.
Use GetDeletePublishedCallback() to listen to delete response.
| [in] | save | Which save should be deleted - save must be online on workshop. |
| WorldSaveItem SCR_SaveWorkshopManager.FindSaveItemBySaveFileName | ( | string | fileName | ) |
Return world save item that cotains save file with provided name.
| [in] | fileName | Full save file name. |
| string SCR_SaveWorkshopManager.GetCurrentSave | ( | out WorldSaveItem | saveItem | ) |
|
static |
Get mission workshop item of current scenario.
|
static |
Get resource path of current scenario or fallback to path of testing world.
|
static |
Get name of current scenario or fallback to testing world name for save file name.
|
static |
Get translated name of current scenario or fallback to testing world name.
| SCR_BackendCallback SCR_SaveWorkshopManager.GetDeletePublishedCallback | ( | ) |
| SCR_EditedSaveManifest SCR_SaveWorkshopManager.GetEditedSaveManifest | ( | ) |
|
static |
| SCR_BackendCallback SCR_SaveWorkshopManager.GetLoadSavesPageCallback | ( | ) |
| void SCR_SaveWorkshopManager.GetOfflineSaves | ( | out array< WorldSaveItem > | saves | ) |
Get offline workshop items and filter out only WorldSaveItem type.
| [out] | saves | WorldSaveItem array which should be filled by result saves. |
| ScriptInvokerString SCR_SaveWorkshopManager.GetOnCurrentSaveChanged | ( | ) |
|
static |
Find ID in save file name for format 'scenario_name.type_id'.
| [in] | fileName | Full save file name in |
|
static |
|
static |
| SCR_BackendCallback SCR_SaveWorkshopManager.GetUploadCallback | ( | ) |
| void SCR_SaveWorkshopManager.Init | ( | ) |
Setup workshop data to get offline items and scenarios.
|
static |
|
static |
Convert GUID format '{id}Missions/Scenario.cof' to 'id'.
| [in] | guid | GUID in form of resource path - {id}Missions/Scenario.cof |
| void SCR_SaveWorkshopManager.SetCurrentSave | ( | string | fileName, |
| WorldSaveItem | saveItem ) |
| void SCR_SaveWorkshopManager.SetEditedSaveManifest | ( | WorldSaveManifest | manifest, |
| string | editingValue = "", | ||
| string | value = "" ) |
| void SCR_SaveWorkshopManager.SetEditedSaveManifestEditingValue | ( | string | editingValue | ) |
|
static |
Remove '_id' from provided save file name.
_id is present in name of save file downloaded from workshop \parma fileName Save file name
| void SCR_SaveWorkshopManager.UploadSave | ( | notnull WorldSaveItem | save, |
| notnull WorldSaveManifest | manifest, | ||
| bool | public ) |
Upload save to workshop.
Use GetUploadCallback() to listen to upload response.
| [in] | save | Save item that will be uploaded. |
| [in] | manifest | Save meta data that will be used in save description. |
| [in] | public | Will set if save will be visible and downloadable by non owners/contributors. |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |