Arma Reforger Script API
|
Static Public Member Functions | |
static void | OnGameStart () |
Call this somewhere once, preferably at start of the game. | |
static void | TryOpenWorkshop () |
Tries to open Workshop UI, if not possible due to privileges, negotiates them. | |
static void | OnEnableAddonButton (SCR_WorkshopItem item) |
Toggles addon enabled state. | |
static void | OnEnableAddonToggleButton (SCR_WorkshopItem item, SCR_ModularButtonComponent buttonComp) |
Sets addon enabled state from a toggleable button. | |
static void | OnDeleteAddonButton (SCR_WorkshopItem item) |
Shows a confirmation dialog when unsubscribing an addon. | |
static void | ExecutePrimaryAction (notnull SCR_WorkshopItem item, out SCR_WorkshopDownloadSequence dlRequest, Revision revision=null) |
Performs the primary suggested action You must store the dlRequest somewhere, in case that the download will be started. | |
static bool | IsDownloadingAddonOrDependencies (SCR_WorkshopItem item) |
static bool | IsDownloadingAddon (SCR_WorkshopItem item) |
static SCR_EAddonPrimaryActionState | GetPrimaryActionState (notnull SCR_WorkshopItem item) |
static string | GetTagImage (string tag) |
Returns image associated with given Workshop tag. | |
static ResourceName | GetDefaultAddonThumbnail (notnull SCR_WorkshopItem item) |
static string | GetPrimaryActionName (SCR_WorkshopItem item) |
Returns name of suggested primary action. | |
static void | GetPrimaryActionLook (SCR_EAddonPrimaryActionState state, SCR_ERevisionAvailability availability, SCR_WorkshopItem item, out string icon, out Color iconColor, out string message, out Color messageColor) |
static string | GetPrimaryActionTooltipMessage (SCR_EAddonPrimaryActionState state, SCR_WorkshopItem item) |
static void | GetVersionDisplayLook (SCR_WorkshopItem item, out bool showUpdateText, out string currentVersionIcon, out Color currentVersionIconColor, out string currentVersionText, out Color currentVersionTextColor, out string updateVersionText) |
static string | GetRestrictedAddonStateText (SCR_WorkshopItem item) |
Returns string such as "Banned" or "Reported" for a restricted item. Otherwise returns empty string. | |
static string | GetReportTypeString (EWorkshopReportType eReportType) |
Converts report type enum to stringtable entry. | |
static void | UpdateEnableAddonToggleButton (SCR_ModularButtonComponent button, SCR_WorkshopItem item, SCR_EAddonPrimaryActionState state, bool alwaysShowWhenDownloaded=true) |
static int | GetDownloadProgressPercentage (float progress) |
static int | GetRatingPercentage (float rating) |
static int | GetUpvotes (notnull SCR_WorkshopItem item) |
static int | GetDownvotes (notnull SCR_WorkshopItem item) |
static string | GetRevisionAvailabilityErrorMessage (WorkshopItem item) |
static string | GetRevisionAvailabilityErrorMessage (SCR_ERevisionAvailability state) |
static string | GetRevisionAvailabilityErrorMessageVerbose (WorkshopItem item) |
static string | GetRevisionAvailabilityErrorMessageVerbose (SCR_ERevisionAvailability state) |
static string | GetRevisionAvailabilityErrorTexture (WorkshopItem item) |
static string | GetRevisionAvailabilityErrorTexture (SCR_ERevisionAvailability state) |
Static Public Attributes | |
static const float | IMAGE_SIZE_RATIO = 16.0 / 9.0 |
static const string | PRIMARY_ACTION_MESSAGE_DECORATION = "[%1]" |
static const int | CONTINUOUS_UPDATE_DELAY = 1000 |
static const int | MAX_DEPENDENCIES_SHOWN = 999 |
static const int | MAX_VOTES_SHOWN = 99999 |
static const int | PAGE_SCENARIOS = 4096 |
static const ResourceName | ADDON_TYPE_FILTER_CATEGORY_CONFIG = "{A557E41062372854}Configs/ContentBrowser/Filters/category_type.conf" |
static ref map< string, string > | s_sAddonTagImageMap = new map<string, string>() |
static ref map< string, ResourceName > | s_sAddonTagDefaultThumbnailMap = new map<string, ResourceName>() |
static const ResourceName | ADDON_DEFAULT_THUMBNAIL = "{04EB797EBF59CDEF}UI/Textures/Workshop/AddonThumbnails/workshop_defaultFallback_UI.edds" |
static const ResourceName | ADDON_DEFAULT_THUMBNAIL_LOADING = "{75455009AFED376B}UI/Textures/Workshop/AddonThumbnails/workshop_loading_UI.edds" |
static const ResourceName | SCENARIO_SP_DEFAULT_THUMBNAIL = "{17D65C6D78C7722C}UI/Textures/Workshop/AddonThumbnails/workshop_scenarios_UI.edds" |
static const ResourceName | SCENARIO_MP_DEFAULT_THUMBNAIL = "{62A03BAAAED612E8}UI/Textures/Workshop/AddonThumbnails/workshop_mpScenarios_UI.edds" |
static const string | MESSAGE_DEPENDENCIES_MISSING = "#AR-Workshop_State_MissingDependencies" |
static const string | MESSAGE_DEPENDENCIES_DISABLED = "#AR-Workshop_State_MustEnableDependencies" |
static const string | MESSAGE_DEPENDENCIES_OUTDATED = "#AR-Workshop_State_DependencyUpdateAvailable" |
static const string | MESSAGE_UPDATE_AVAILABLE = "#AR-Workshop_State_UpdateAvailable" |
static const string | MESSAGE_REPORTED = "#AR-Workshop_State_Reported" |
static const string | MESSAGE_BANNED = "#AR-Workshop_State_Banned" |
static const string | MESSAGE_RESTRICTED = "#AR-Workshop_State_Restricted" |
static const string | MESSAGE_RESTRICTED_GENERIC = "#AR-Workshop_Dialog_Error_ModIsBlocked" |
static const string | MESSAGE_FALLBACK = "#AR-CoreMenus_Tooltips_Unavailable" |
static const string | LABEL_DOWNLOAD = "#AR-Workshop_ButtonDownload" |
static const string | LABEL_UPDATE = "#AR-Workshop_ButtonUpdate" |
static const string | LABEL_CANCEL = "#AR-Workshop_ButtonCancel" |
static const string | LABEL_ENABLE = "#AR-Workshop_ButtonEnable" |
static const string | LABEL_DISABLE = "#AR-Workshop_ButtonDisable" |
static const string | LABEL_DELETE = "#AR-Workshop_ButtonDelete" |
static const string | LABEL_DEPENDENCIES_DOWNLOAD = "#AR-Workshop_ButtonDownloadDependencies" |
static const string | LABEL_DEPENDENCIES_ENABLE = "#AR-Workshop_ButtonEnableDependencies" |
static const string | LABEL_DEPENDENCIES_UPDATE = "#AR-Workshop_ButtonUpdateDependencies" |
static const string | LABEL_ADDON_DISABLED = "#AR-Workshop_State_Disabled" |
static const string | LABEL_ADDON_MISSING = "#AR-ServerBrowser_JoinMissingModsTittle" |
static const string | LABEL_REPORT = "#AR-Workshop_ButtonReport" |
static const string | LABEL_CANCEL_REPORT = "#AR-Workshop_CancelReportTitle" |
static const string | LABEL_DEPENDENCIES_NUMBER_ONE = "#AR-Workshop_Details_ModDependencies_Short_One_LC" |
static const string | LABEL_DEPENDENCIES_NUMBER = "#AR-Workshop_Details_ModDependencies_Short_LC" |
static const string | LABEL_DEPENDENT_NUMBER_ONE = "#AR-Workshop_Details_DependentMods_Short_One_LC" |
static const string | LABEL_DEPENDENT_NUMBER = "#AR-Workshop_Details_DependentMods_Short_LC" |
static const string | ICON_DOWNLOAD = "download" |
static const string | ICON_UPDATE = "update" |
static const string | ICON_CANCEL_DOWNLOAD = "cancel" |
static const string | ICON_REPAIR = "repairCircle" |
static const string | ICON_DEPENDENCIES = "dependencies" |
static const string | ICON_REPORTED = "reportedByMe" |
static const string | ICON_ENABLED = "okCircle" |
static const string | ICON_DISABLED = "cancelCircle" |
static const string | ICON_LINKED = "linked" |
static const string | ICON_VERSION_MATCH = "version_match" |
static const string | ICON_VERSION_MISMATCH = "version_mismatch" |
static const string | MESSAGE_MOD_NOT_AVAILABLE = "#AR-Workshop_State_NotAvailable" |
static const string | MESSAGE_MOD_NOT_AVAILABLE_REMOVED = "#AR-Workshop_State_Removed" |
static const string | MESSAGE_MOD_NOT_AVAILABLE_INCOMPATIBLE = "#AR-Workshop_State_Incompatible" |
static const string | MESSAGE_MOD_AVAILABLE_WHEN_UPDATED = "#AR-Workshop_State_UpdateRequired" |
static const string | MESSAGE_MOD_DOWNLOAD_NOT_FINISHED = "#AR-Workshop_State_DownloadNotFinished" |
static const string | MESSAGE_VERBOSE_MOD_NOT_AVAILABLE = "#AR-Workshop_State_NotAvailableDesc" |
static const string | MESSAGE_VERBOSE_MOD_NOT_AVAILABLE_REMOVED = "#AR-Workshop_State_RemovedDesc" |
static const string | MESSAGE_VERBOSE_MOD_NOT_AVAILABLE_INCOMPATIBLE = "#AR-Workshop_State_IncompatibleDesc" |
static const string | MESSAGE_VERBOSE_MOD_AVAILABLE_WHEN_UPDATED = "#AR-Workshop_State_UpdateRequiredDesc" |
static const string | MESSAGE_VERBOSE_MOD_DOWNLOAD_NOT_FINISHED = "#AR-Workshop_State_DownloadNotFinishedDesc" |
static const string | ICON_MOD_NOT_AVAILABLE = "not-available" |
static const string | ICON_MOD_NOT_AVAILABLE_REMOVED = "cancelCircle" |
static const string | ICON_MOD_NOT_AVAILABLE_INCOMPATIBLE = "incompatible" |
static const string | ICON_MOD_AVAILABLE_WHEN_UPDATED = "available-when-updated" |
static const string | ICON_MOD_DOWNLOAD_NOT_FINISHED = "downloading" |
static const string | DOWNLOAD_STATE_DOWNLOADING = "#AR-DownloadManager_State_Downloading" |
static const string | DOWNLOAD_STATE_PROCESSING = "#AR-DownloadManager_State_Processing" |
static const string | DOWNLOAD_STATE_PAUSED = "#AR-Workshop_ButtonPause" |
static const string | DOWNLOAD_STATE_CANCELED = "#AR-Workshop_Canceled" |
static const string | DOWNLOAD_STATE_DOWNLOAD_FAIL = "#AR-Workshop_DownloadFail" |
static const string | DOWNLOAD_STATE_COMPLETED = "#AR-Workshop_Details_Downloaded" |
static const string | DOWNLOAD_STATE_ICON_DOWNLOADING = "downloading" |
static const string | DOWNLOAD_STATE_ICON_PROCESSING = "update" |
static const string | DOWNLOAD_STATE_ICON_PAUSED = "download-pause" |
static const string | LINK_NAME_LICENSES = "Link_Bohemia" |
Static Protected Member Functions | |
static void | OnTryOpenWorkshopUgcPrivilegeResult (bool result) |
static void | Callback_OnAddonsChecked () |
Callback from addon manager when addons are checked. | |
static void | SetAddonEnabled (SCR_WorkshopItem item, bool newEnabled) |
Internal method to handle addon enabling. Might show a dialog or enable some other addons(dependnecies) if needed. | |
static void | InitAddonTagMaps () |
|
staticprotected |
Callback from addon manager when addons are checked.
|
static |
Performs the primary suggested action You must store the dlRequest somewhere, in case that the download will be started.
|
static |
|
static |
|
static |
|
static |
|
static |
Returns name of suggested primary action.
|
static |
|
static |
|
static |
|
static |
Converts report type enum to stringtable entry.
|
static |
Returns string such as "Banned" or "Reported" for a restricted item. Otherwise returns empty string.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Returns image associated with given Workshop tag.
|
static |
|
static |
|
staticprotected |
|
static |
|
static |
|
static |
Shows a confirmation dialog when unsubscribing an addon.
|
static |
Toggles addon enabled state.
Must be called from non-toggleable buttons. Might show confirmation dialog.
|
static |
Sets addon enabled state from a toggleable button.
Might show confirmation dialog.
|
static |
Call this somewhere once, preferably at start of the game.
|
staticprotected |
|
staticprotected |
Internal method to handle addon enabling. Might show a dialog or enable some other addons(dependnecies) if needed.
|
static |
Tries to open Workshop UI, if not possible due to privileges, negotiates them.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |