|
Enfusion Script API
|
Workshop Api instance. More...
Public Member Functions | |
| string | GetCode (int code) |
| ApiCode to string. | |
| proto external void | StopAllRunningProcesses () |
| Stops all currently running downloads and verification processes. | |
| proto external void | Cleanup () |
| Destroy items. | |
| proto external WorldSaveItem | GetCurrentSave () |
| Get current world save. | |
| proto external void | SetCurrentSave (WorldSaveItem item) |
| Set current world save. | |
| proto external int | GetBannedItems (out notnull array< string > items) |
| proto external int | GetDownloads (out notnull array< WorkshopItem > items) |
| proto external bool | NeedSavesScan () |
| True if local saves data were not loaded yet -> You can load them by ScanOfflineSaves() | |
| proto external bool | NeedAddonsScan () |
| True if local addons data were not loaded yet -> You can load them by ScanOfflineAddons() | |
| proto external int | GetTags (out notnull array< WorkshopTag > tags) |
| Get all known tags. | |
| proto external int | GetPageScenarios (out array< MissionWorkshopItem > items, int page, int pageSize) |
| Get scenarios of enabled WorkshopItems. | |
| proto external MissionWorkshopItem | GetInGameScenario (ResourceName sResource) |
| Find in-game MissionWorkshopItem by its MissionHeader config. | |
| proto external WorkshopTag | RegisterTag (string sName) |
| Register new tag. | |
| proto external void | ScanOfflineItems () |
| Scans for both local addons and world saves. | |
| proto external void | ScanOfflineAddons () |
| Load local addons data. | |
| proto external void | ScanOfflineSaves () |
| Load local world saves data. | |
| proto external int | GetOfflineItems (out notnull array< WorkshopItem > items) |
| Get downloaded WorkshopItems + WorldSaveItems. | |
| proto external WorkshopItem | FindItem (string id) |
| Find a WorkshopItem by ID in the local cache. | |
| proto external void | OnItemsChecked (BackendCallback callback) |
| Triggers OnSuccess when check for banned/up-to-date downloaded addons has finished. | |
| proto external void | ReadDefaultScenarios (array< string > resources) |
| Scan for default scenarios. | |
| proto external WorkshopItem | GetByName (string name) |
| Get item by name. | |
Public Member Functions inherited from WorkshopCatalogue | |
| proto external int | MaxPageSize () |
| Returns max possible size of page that is allowed to be set. | |
| proto external void | RequestPage (BackendCallback pCallback, notnull PageParams pParams, bool bClearCache) |
| proto external int | GetTotalItemCount () |
| proto external int | GetPageCount () |
| proto external void | SetPageItems (int iCount) |
| Set number of items per page. | |
| proto external void | SetPageSize (int iCount) |
| Set number of items per page. | |
| proto external int | GetPage () |
| proto external int | GetPageItemCount () |
| proto external int | GetPageItems (out notnull array< WorkshopItem > items) |
Static Public Member Functions | |
| static proto MissionWorkshopItem | GetCurrentMission () |
| Get downloaded WorkshopItems. | |
Workshop Api instance.
| proto external void WorkshopApi.Cleanup | ( | ) |
Destroy items.
| proto external WorkshopItem WorkshopApi.FindItem | ( | string | id | ) |
Find a WorkshopItem by ID in the local cache.
| proto external WorkshopItem WorkshopApi.GetByName | ( | string | name | ) |
Get item by name.
|
static |
Get downloaded WorkshopItems.
| proto external WorldSaveItem WorkshopApi.GetCurrentSave | ( | ) |
Get current world save.
| proto external int WorkshopApi.GetDownloads | ( | out notnull array< WorkshopItem > | items | ) |
| proto external MissionWorkshopItem WorkshopApi.GetInGameScenario | ( | ResourceName | sResource | ) |
Find in-game MissionWorkshopItem by its MissionHeader config.
| proto external int WorkshopApi.GetOfflineItems | ( | out notnull array< WorkshopItem > | items | ) |
Get downloaded WorkshopItems + WorldSaveItems.
| proto external int WorkshopApi.GetPageScenarios | ( | out array< MissionWorkshopItem > | items, |
| int | page, | ||
| int | pageSize ) |
Get scenarios of enabled WorkshopItems.
| proto external int WorkshopApi.GetTags | ( | out notnull array< WorkshopTag > | tags | ) |
Get all known tags.
| proto external bool WorkshopApi.NeedAddonsScan | ( | ) |
True if local addons data were not loaded yet -> You can load them by ScanOfflineAddons()
| proto external bool WorkshopApi.NeedSavesScan | ( | ) |
True if local saves data were not loaded yet -> You can load them by ScanOfflineSaves()
| proto external void WorkshopApi.OnItemsChecked | ( | BackendCallback | callback | ) |
Triggers OnSuccess when check for banned/up-to-date downloaded addons has finished.
| proto external void WorkshopApi.ReadDefaultScenarios | ( | array< string > | resources | ) |
Scan for default scenarios.
| proto external WorkshopTag WorkshopApi.RegisterTag | ( | string | sName | ) |
Register new tag.
| proto external void WorkshopApi.ScanOfflineAddons | ( | ) |
Load local addons data.
| proto external void WorkshopApi.ScanOfflineItems | ( | ) |
Scans for both local addons and world saves.
| proto external void WorkshopApi.ScanOfflineSaves | ( | ) |
Load local world saves data.
| proto external void WorkshopApi.SetCurrentSave | ( | WorldSaveItem | item | ) |
Set current world save.
| proto external void WorkshopApi.StopAllRunningProcesses | ( | ) |
Stops all currently running downloads and verification processes.