Arma Reforger Script API
|
Public Member Functions | |
WorkshopItem | GetWorkshopItem () |
Use these only if absoulutely necessary to intarract with game API. | |
Dependency | GetDependency () |
bool | GetItemDataLoaded () |
Getters for loading state. | |
bool | GetDetailsLoaded () |
bool | GetScenariosLoaded () |
bool | GetRevisionsLoaded () |
bool | GetDependenciesLoaded () |
bool | GetRequestFailed () |
bool | IsDownloadRunning () |
void | LogState () |
Logs all properties of the object into console. | |
void | LoadDetails () |
Loads details from backend, or if they are already loaded, calls the callbacks immediately. | |
void | GetScenarios (array< MissionWorkshopItem > scenarios) |
Returns array of scenarios. | |
array< ref SCR_WorkshopItem > | GetLatestDependencies () |
Returns array of dependencies. | |
array< ref SCR_WorkshopItem > | GetDependentAddons () |
Returns array of dependendent addons. | |
string | GetLatestVersion () |
array< string > | GetVersions () |
Returns array of versions. | |
bool | IsDownloadedVersionCompatible () |
Returns true if downloaded revision was uploded after 1.0. | |
void | SetMyRating (bool newRating) |
void | ResetMyRating () |
void | GetMyRating (out bool ratingSet, out bool rating) |
void | SetFavourite (bool favourite) |
bool | GetFavourite () |
void | SetSubscribed (bool subscribe) |
bool | GetSubscribed () |
void | SetEnabled (bool enable) |
void | SetDependenciesEnabled (bool enable) |
Enables/disables all downloaded dependencies. | |
bool | GetEnabled () |
bool | GetLoaded () |
True when addon is loaded by engine. It means that the game is already running with this mod. | |
bool | GetBlocked () |
bool | GetReportedByMe () |
bool | GetModAuthorReportedByMe () |
bool | IsWorldSave () |
bool | GetRestricted () |
Returns true when item is restricted for any reason (blocked or reported) | |
bool | DeleteLocally () |
void | DeleteDownloadProgress () |
string | GetName () |
string | GetId () |
string | GetAuthorName () |
bool | GetOnline () |
True when the item is stored in the backend. | |
bool | GetOffline () |
True when we have the item on our local storage. | |
Revision | GetCurrentLocalRevision () |
Returns the revision which we currently have on the local storage. | |
bool | GetCurrentLocalVersionMatchDependency () |
Returns true if current local version matches version of dependency. | |
bool | GetCorrupted () |
BackendImage | GetThumbnail () |
array< BackendImage > | GetGallery () |
string | GetDescription () |
string | GetSummary () |
int | GetRatingCount () |
float | GetSizeBytes () |
float | GetAverageRating () |
void | GetDownloadState (out bool inProgress, out bool paused, out float progress, out Revision targetRevision) |
Returns state of the download process. | |
SCR_WorkshopItemActionDownload | GetDownloadAction () |
Returns current download action. | |
SCR_WorkshopItemActionComposite | GetDependencyCompositeAction () |
Returns the current composite action performed for dependencies of this addon. | |
bool | GetUpdateAvailable () |
Returns true when we have an old version offline, and the new version. | |
array< ref SCR_WorkshopItem > | GetMissingDependencies () |
Returns dependencies which are missing. | |
bool | GetAnyDependencyMissing () |
bool | GetAnyDependencyUpdateAvailable () |
bool | GetEnabledAndAnyDependencyDisabled () |
Returns true if any dependency is offline and disabled. | |
EWorkshopItemProblem | GetHighestPriorityProblem () |
Returns highest priority issue of this addon if it's downloaded, Addon might have all issue types at once, but this method returns only the most important issue In the order most suitable for UI. | |
array< ref SCR_WorkshopItem > | GetOutdatedDependencies () |
Returns dependencies which can be updated. | |
int | GetTimeSinceLastPlay () |
int | GetTimeSinceFirstDownload () |
SCR_WorkshopItemActionDownload | Download (notnull Revision targetRevision) |
Starts download of a specific version. | |
SCR_WorkshopItemActionDownload | DownloadLatestVersion () |
SCR_WorkshopItemActionDownload | RetryDownload (Revision targetRevision) |
SCR_WorkshopItemActionDownloadDependenciesLatest | DownloadDependenciesLatest (array< ref SCR_WorkshopItem > dependencies) |
Starts downloading latest version of dependencies which are offline !!! If a previous same action is running, it doesn't create a new action but !!! Returns a previous action instead. | |
bool | PauseDownload () |
Pauses current download, if possible. | |
bool | CancelDownload () |
Cancels current download, if possible. | |
bool | ResumeDownload () |
Resumes current download, if it's already started. | |
SCR_WorkshopItemActionReport | Report (EWorkshopReportType eReport, string sMessage) |
Sends a report about this workshop item. | |
void | LoadReport () |
Loads report of current user from backend. Subscribe to m_OnMyReportLoaded to get result. | |
void | GetReport (out EWorkshopReportType reportType, out string reportDescription) |
Returns our own report. | |
SCR_WorkshopItemActionCancelReport | CancelReport () |
Sends a cancel report about this workshop item. | |
SCR_WorkshopItemActionAddAuthorBlock | AddAuthorBlock () |
Add block for workshop author and all author mods. | |
SCR_WorkshopItemActionRemoveAuthorBlock | RemoveAuthorBlock () |
Add block for workshop author and all author mods. | |
Revision | FindRevision (string version) |
Finds revision object by string version. | |
Revision | GetLatestRevision () |
array< ref SCR_WorkshopItem > | GetLoadedDependencies () |
bool | Internal_StartDownload (notnull Revision targetRevision, BackendCallback callback) |
bool | Internal_CancelDownload () |
bool | Internal_Report (EWorkshopReportType eReport, string sMessage, BackendCallback callback) |
bool | Internal_CancelReport (BackendCallback callback) |
bool | Internal_AddAuthorBlock (BackendCallback callback) |
bool | Internal_RemoveAuthorBlock (BackendCallback callback) |
void | Internal_Update (float timeSlice) |
Called each frame by Addon Manager. | |
void | Internal_OnChanged () |
Called by actions when some change happens. | |
bool | Internal_GetCanBeUnregistered () |
Returns true when it can be unregistered bu addon manager We don't unregister items if they are offline or have any actions in progress, or if we have reported them (to avoid flushing item cache) | |
WorkshopItem | Internal_GetWorkshopItem () |
Returns true when it can be unregistered bu addon manager. | |
float | Internal_GetDownloadProgress () |
bool | Internal_GetIsProcessing () |
float | Internal_GetProcessingProgress () |
void | Internal_LoadDetails () |
Creates a callback object, requests workshop API to load details. | |
void | SetItemTargetRevision (Revision revision) |
Revision | GetItemTargetRevision () |
void | SetTargetRevisionPatchSize (float size) |
float | GetTargetRevisionPatchSize () |
Get dependency target revision patch size Dependency has to be define and patch has to be computed. | |
void | ~SCR_WorkshopItem () |
void | Internal_UpdateObjects (WorkshopItem item, Dependency dependency) |
void | Internal_OnAddonsChecked () |
Called by SCR_AddonManager when the game checks addons after game start. | |
void | UpdateStateFromWorkshopItem () |
void | _print (string str, LogLevel logLevel=LogLevel.DEBUG) |
Static Public Member Functions | |
static SCR_WorkshopItem | Internal_CreateFromWorkshopItem (WorkshopItem item) |
static SCR_WorkshopItem | Internal_CreateFromDependency (Dependency dependency) |
static void | _sprint (string str, LogLevel logLevel=LogLevel.DEBUG) |
Public Attributes | |
ref ScriptInvoker | m_OnChanged = new ScriptInvoker() |
ref ScriptInvoker | m_OnGetAsset = new ScriptInvoker() |
ref ScriptInvoker | m_OnDependenciesLoaded = new ScriptInvoker() |
ref ScriptInvoker | m_OnScenariosLoaded = new ScriptInvoker() |
ref ScriptInvoker | m_OnError = new ScriptInvoker() |
ref ScriptInvoker | m_OnTimeout = new ScriptInvoker() |
ref ScriptInvoker | m_OnDownloadComplete = new ScriptInvoker() |
ref ScriptInvoker | m_OnOfflineStateChanged = new ScriptInvoker() |
ref ScriptInvoker | m_OnReportStateChanged = new ScriptInvoker() |
ref ScriptInvoker | m_OnMyReportLoaded = new ScriptInvoker() |
ref ScriptInvoker | m_OnMyReportLoadError = new ScriptInvoker() |
ref ScriptInvoker | m_OnRedownload = new ScriptInvoker() |
ref ScriptInvoker | m_OnCanceled = new ScriptInvoker() |
void SCR_WorkshopItem.~SCR_WorkshopItem | ( | ) |
void SCR_WorkshopItem._print | ( | string | str, |
LogLevel | logLevel = LogLevel::DEBUG |
||
) |
|
static |
SCR_WorkshopItemActionAddAuthorBlock SCR_WorkshopItem.AddAuthorBlock | ( | ) |
Add block for workshop author and all author mods.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
bool SCR_WorkshopItem.CancelDownload | ( | ) |
Cancels current download, if possible.
SCR_WorkshopItemActionCancelReport SCR_WorkshopItem.CancelReport | ( | ) |
Sends a cancel report about this workshop item.
|
protected |
void SCR_WorkshopItem.DeleteDownloadProgress | ( | ) |
bool SCR_WorkshopItem.DeleteLocally | ( | ) |
SCR_WorkshopItemActionDownload SCR_WorkshopItem.Download | ( | notnull Revision | targetRevision | ) |
Starts download of a specific version.
Returns an action object, use it to control the download process or To get notified about its events.
!!! If a download of same version is already running, it doesn't create a new action !!! But returns a previous one instead.
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
! You must call Activate() of the returned action yourself. ! This is done this way so that you can subscribe to events before the action is started. ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
SCR_WorkshopItemActionDownloadDependenciesLatest SCR_WorkshopItem.DownloadDependenciesLatest | ( | array< ref SCR_WorkshopItem > | dependencies | ) |
Starts downloading latest version of dependencies which are offline !!! If a previous same action is running, it doesn't create a new action but !!! Returns a previous action instead.
SCR_WorkshopItemActionDownload SCR_WorkshopItem.DownloadLatestVersion | ( | ) |
|
protected |
Unified download to target revision There can be different revisions and reasons to setup new download No target revision = latest.
Revision SCR_WorkshopItem.FindRevision | ( | string | version | ) |
Finds revision object by string version.
bool SCR_WorkshopItem.GetAnyDependencyMissing | ( | ) |
bool SCR_WorkshopItem.GetAnyDependencyUpdateAvailable | ( | ) |
string SCR_WorkshopItem.GetAuthorName | ( | ) |
float SCR_WorkshopItem.GetAverageRating | ( | ) |
bool SCR_WorkshopItem.GetBlocked | ( | ) |
bool SCR_WorkshopItem.GetCorrupted | ( | ) |
Revision SCR_WorkshopItem.GetCurrentLocalRevision | ( | ) |
Returns the revision which we currently have on the local storage.
bool SCR_WorkshopItem.GetCurrentLocalVersionMatchDependency | ( | ) |
Returns true if current local version matches version of dependency.
bool SCR_WorkshopItem.GetDependenciesLoaded | ( | ) |
Dependency SCR_WorkshopItem.GetDependency | ( | ) |
SCR_WorkshopItemActionComposite SCR_WorkshopItem.GetDependencyCompositeAction | ( | ) |
Returns the current composite action performed for dependencies of this addon.
array< ref SCR_WorkshopItem > SCR_WorkshopItem.GetDependentAddons | ( | ) |
Returns array of dependendent addons.
string SCR_WorkshopItem.GetDescription | ( | ) |
bool SCR_WorkshopItem.GetDetailsLoaded | ( | ) |
SCR_WorkshopItemActionDownload SCR_WorkshopItem.GetDownloadAction | ( | ) |
Returns current download action.
void SCR_WorkshopItem.GetDownloadState | ( | out bool | inProgress, |
out bool | paused, | ||
out float | progress, | ||
out Revision | targetRevision | ||
) |
Returns state of the download process.
bool SCR_WorkshopItem.GetEnabled | ( | ) |
bool SCR_WorkshopItem.GetEnabledAndAnyDependencyDisabled | ( | ) |
Returns true if any dependency is offline and disabled.
bool SCR_WorkshopItem.GetFavourite | ( | ) |
array< BackendImage > SCR_WorkshopItem.GetGallery | ( | ) |
EWorkshopItemProblem SCR_WorkshopItem.GetHighestPriorityProblem | ( | ) |
Returns highest priority issue of this addon if it's downloaded, Addon might have all issue types at once, but this method returns only the most important issue In the order most suitable for UI.
string SCR_WorkshopItem.GetId | ( | ) |
bool SCR_WorkshopItem.GetItemDataLoaded | ( | ) |
Getters for loading state.
Revision SCR_WorkshopItem.GetItemTargetRevision | ( | ) |
array< ref SCR_WorkshopItem > SCR_WorkshopItem.GetLatestDependencies | ( | ) |
Returns array of dependencies.
Revision SCR_WorkshopItem.GetLatestRevision | ( | ) |
string SCR_WorkshopItem.GetLatestVersion | ( | ) |
bool SCR_WorkshopItem.GetLoaded | ( | ) |
True when addon is loaded by engine. It means that the game is already running with this mod.
array< ref SCR_WorkshopItem > SCR_WorkshopItem.GetLoadedDependencies | ( | ) |
array< ref SCR_WorkshopItem > SCR_WorkshopItem.GetMissingDependencies | ( | ) |
Returns dependencies which are missing.
bool SCR_WorkshopItem.GetModAuthorReportedByMe | ( | ) |
void SCR_WorkshopItem.GetMyRating | ( | out bool | ratingSet, |
out bool | rating | ||
) |
string SCR_WorkshopItem.GetName | ( | ) |
bool SCR_WorkshopItem.GetOffline | ( | ) |
True when we have the item on our local storage.
bool SCR_WorkshopItem.GetOnline | ( | ) |
True when the item is stored in the backend.
array< ref SCR_WorkshopItem > SCR_WorkshopItem.GetOutdatedDependencies | ( | ) |
Returns dependencies which can be updated.
int SCR_WorkshopItem.GetRatingCount | ( | ) |
void SCR_WorkshopItem.GetReport | ( | out EWorkshopReportType | reportType, |
out string | reportDescription | ||
) |
Returns our own report.
We must load it first with LoadMyReport. How the function behaves immediately relative to data passed through Report() is undefined.
bool SCR_WorkshopItem.GetReportedByMe | ( | ) |
bool SCR_WorkshopItem.GetRequestFailed | ( | ) |
bool SCR_WorkshopItem.GetRestricted | ( | ) |
Returns true when item is restricted for any reason (blocked or reported)
bool SCR_WorkshopItem.GetRevisionsLoaded | ( | ) |
void SCR_WorkshopItem.GetScenarios | ( | array< MissionWorkshopItem > | scenarios | ) |
Returns array of scenarios.
bool SCR_WorkshopItem.GetScenariosLoaded | ( | ) |
float SCR_WorkshopItem.GetSizeBytes | ( | ) |
bool SCR_WorkshopItem.GetSubscribed | ( | ) |
string SCR_WorkshopItem.GetSummary | ( | ) |
float SCR_WorkshopItem.GetTargetRevisionPatchSize | ( | ) |
Get dependency target revision patch size Dependency has to be define and patch has to be computed.
BackendImage SCR_WorkshopItem.GetThumbnail | ( | ) |
int SCR_WorkshopItem.GetTimeSinceFirstDownload | ( | ) |
int SCR_WorkshopItem.GetTimeSinceLastPlay | ( | ) |
bool SCR_WorkshopItem.GetUpdateAvailable | ( | ) |
Returns true when we have an old version offline, and the new version.
array< string > SCR_WorkshopItem.GetVersions | ( | ) |
Returns array of versions.
WorkshopItem SCR_WorkshopItem.GetWorkshopItem | ( | ) |
Use these only if absoulutely necessary to intarract with game API.
bool SCR_WorkshopItem.Internal_AddAuthorBlock | ( | BackendCallback | callback | ) |
bool SCR_WorkshopItem.Internal_CancelDownload | ( | ) |
bool SCR_WorkshopItem.Internal_CancelReport | ( | BackendCallback | callback | ) |
|
static |
|
static |
bool SCR_WorkshopItem.Internal_GetCanBeUnregistered | ( | ) |
Returns true when it can be unregistered bu addon manager We don't unregister items if they are offline or have any actions in progress, or if we have reported them (to avoid flushing item cache)
float SCR_WorkshopItem.Internal_GetDownloadProgress | ( | ) |
bool SCR_WorkshopItem.Internal_GetIsProcessing | ( | ) |
float SCR_WorkshopItem.Internal_GetProcessingProgress | ( | ) |
|
protected |
WorkshopItem SCR_WorkshopItem.Internal_GetWorkshopItem | ( | ) |
Returns true when it can be unregistered bu addon manager.
void SCR_WorkshopItem.Internal_LoadDetails | ( | ) |
Creates a callback object, requests workshop API to load details.
void SCR_WorkshopItem.Internal_OnAddonsChecked | ( | ) |
Called by SCR_AddonManager when the game checks addons after game start.
void SCR_WorkshopItem.Internal_OnChanged | ( | ) |
Called by actions when some change happens.
bool SCR_WorkshopItem.Internal_RemoveAuthorBlock | ( | BackendCallback | callback | ) |
bool SCR_WorkshopItem.Internal_Report | ( | EWorkshopReportType | eReport, |
string | sMessage, | ||
BackendCallback | callback | ||
) |
bool SCR_WorkshopItem.Internal_StartDownload | ( | notnull Revision | targetRevision, |
BackendCallback | callback | ||
) |
void SCR_WorkshopItem.Internal_Update | ( | float | timeSlice | ) |
Called each frame by Addon Manager.
void SCR_WorkshopItem.Internal_UpdateObjects | ( | WorkshopItem | item, |
Dependency | dependency | ||
) |
bool SCR_WorkshopItem.IsDownloadedVersionCompatible | ( | ) |
Returns true if downloaded revision was uploded after 1.0.
bool SCR_WorkshopItem.IsDownloadRunning | ( | ) |
bool SCR_WorkshopItem.IsWorldSave | ( | ) |
void SCR_WorkshopItem.LoadDetails | ( | ) |
Loads details from backend, or if they are already loaded, calls the callbacks immediately.
void SCR_WorkshopItem.LoadReport | ( | ) |
Loads report of current user from backend. Subscribe to m_OnMyReportLoaded to get result.
void SCR_WorkshopItem.LogState | ( | ) |
Logs all properties of the object into console.
|
protected |
bool SCR_WorkshopItem.PauseDownload | ( | ) |
Pauses current download, if possible.
|
protected |
|
protected |
SCR_WorkshopItemActionRemoveAuthorBlock SCR_WorkshopItem.RemoveAuthorBlock | ( | ) |
Add block for workshop author and all author mods.
SCR_WorkshopItemActionReport SCR_WorkshopItem.Report | ( | EWorkshopReportType | eReport, |
string | sMessage | ||
) |
Sends a report about this workshop item.
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
! You must call Activate() of the returned action yourself. ! This is done this way so that you can subscribe to events before the action is started. ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
void SCR_WorkshopItem.ResetMyRating | ( | ) |
bool SCR_WorkshopItem.ResumeDownload | ( | ) |
Resumes current download, if it's already started.
SCR_WorkshopItemActionDownload SCR_WorkshopItem.RetryDownload | ( | Revision | targetRevision | ) |
|
protected |
void SCR_WorkshopItem.SetDependenciesEnabled | ( | bool | enable | ) |
Enables/disables all downloaded dependencies.
void SCR_WorkshopItem.SetEnabled | ( | bool | enable | ) |
void SCR_WorkshopItem.SetFavourite | ( | bool | favourite | ) |
void SCR_WorkshopItem.SetItemTargetRevision | ( | Revision | revision | ) |
void SCR_WorkshopItem.SetMyRating | ( | bool | newRating | ) |
void SCR_WorkshopItem.SetSubscribed | ( | bool | subscribe | ) |
void SCR_WorkshopItem.SetTargetRevisionPatchSize | ( | float | size | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Check state of action to add and remove author block in update.
void SCR_WorkshopItem.UpdateStateFromWorkshopItem | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
ref ScriptInvoker SCR_WorkshopItem.m_OnCanceled = new ScriptInvoker() |
ref ScriptInvoker SCR_WorkshopItem.m_OnChanged = new ScriptInvoker() |
ref ScriptInvoker SCR_WorkshopItem.m_OnDependenciesLoaded = new ScriptInvoker() |
ref ScriptInvoker SCR_WorkshopItem.m_OnDownloadComplete = new ScriptInvoker() |
ref ScriptInvoker SCR_WorkshopItem.m_OnError = new ScriptInvoker() |
ref ScriptInvoker SCR_WorkshopItem.m_OnGetAsset = new ScriptInvoker() |
ref ScriptInvoker SCR_WorkshopItem.m_OnMyReportLoaded = new ScriptInvoker() |
ref ScriptInvoker SCR_WorkshopItem.m_OnMyReportLoadError = new ScriptInvoker() |
ref ScriptInvoker SCR_WorkshopItem.m_OnOfflineStateChanged = new ScriptInvoker() |
ref ScriptInvoker SCR_WorkshopItem.m_OnRedownload = new ScriptInvoker() |
ref ScriptInvoker SCR_WorkshopItem.m_OnReportStateChanged = new ScriptInvoker() |
ref ScriptInvoker SCR_WorkshopItem.m_OnScenariosLoaded = new ScriptInvoker() |
ref ScriptInvoker SCR_WorkshopItem.m_OnTimeout = new ScriptInvoker() |