Enfusion Script API
|
Public Member Functions | |
string | GetCode (int code) |
ApiCode to string. | |
proto native WorkshopTag | RegisterTag (string sName) |
Register new tag. | |
proto native int | GetTags (out notnull array< WorkshopTag > tags) |
Get all known tags. | |
proto native WorkshopItem | GetByName (string name) |
Get item by name. | |
proto native MissionWorkshopItem | GetInGameScenario (ResourceName sResource) |
Find in-game MissionWorkshopItem by its MissionHeader config. | |
proto native WorkshopItem | FindItem (string id) |
Find a WorkshopItem by ID in the local cache. | |
proto native int | GetPageScenarios (out array< MissionWorkshopItem > items, int page, int pageSize) |
Get scenarios of enabled WorkshopItems. | |
proto native void | OnItemsChecked (BackendCallback callback) |
Triggers OnSuccess when check for banned/up-to-date downloaded addons has finished. | |
proto native int | GetOfflineItems (out notnull array< WorkshopItem > items) |
Get downloaded WorskhopItems + WorldSaveItems. | |
proto native void | ReadDefaultScenarios (array< string > resources) |
Scan for default scenarios. | |
proto native void | ScanOfflineAddons () |
Load local addons data. | |
proto native void | ScanOfflineSaves () |
Load local world saves data. | |
proto native bool | NeedScan () |
Trze if local addons or saves data were not loeaded yet. | |
proto native bool | NeedAddonsScan () |
True if local addons data were not loaded yet -> You can load them by ScanOfflineAddons() | |
proto native bool | NeedSavesScan () |
True if local saves data were not loaded yet -> You can load them by ScanOfflineSaves() | |
proto native int | GetPageItems (out array< WorkshopItem > items) |
Get page content. | |
proto native MissionWorkshopItem | GetCurrentMission () |
Get downloaded WorskhopItems. | |
proto native WorldSaveItem | GetCurrentSave () |
Get current world save. | |
proto native void | SetCurrentSave (WorldSaveItem item) |
Set current world save. | |
Public Member Functions inherited from DownloadableCatalogue | |
proto native void | ScanOfflineItems () |
Scans for both local addons and world saves. | |
proto native void | Cleanup () |
Destroy items. | |
proto native int | GetBannedItems (out notnull array< string > items) |
proto native int | GetDownloads (out notnull array< DownloadableItem > items) |
Public Member Functions inherited from WorkshopCatalogue | |
proto external void | RequestPage (BackendCallback pCallback, notnull PageParams pParams, bool bClearCache) |
proto external int | GetTotalItemCount () |
Get total item count on all pages. | |
proto external int | GetPageCount () |
Get page count. | |
proto external void | SetPageItems (int iCount) |
Set number of items per page. | |
proto external int | GetPage () |
Get current page number. | |
proto external int | GetPageItemCount () |
Get item count on actual page. | |
proto native WorkshopItem WorkshopApi.FindItem | ( | string | id | ) |
Find a WorkshopItem by ID in the local cache.
proto native WorkshopItem WorkshopApi.GetByName | ( | string | name | ) |
Get item by name.
proto native MissionWorkshopItem WorkshopApi.GetCurrentMission | ( | ) |
Get downloaded WorskhopItems.
proto native WorldSaveItem WorkshopApi.GetCurrentSave | ( | ) |
Get current world save.
proto native MissionWorkshopItem WorkshopApi.GetInGameScenario | ( | ResourceName | sResource | ) |
Find in-game MissionWorkshopItem by its MissionHeader config.
proto native int WorkshopApi.GetOfflineItems | ( | out notnull array< WorkshopItem > | items | ) |
Get downloaded WorskhopItems + WorldSaveItems.
proto native int WorkshopApi.GetPageItems | ( | out array< WorkshopItem > | items | ) |
Get page content.
items | Array of Workshop Items |
proto native int WorkshopApi.GetPageScenarios | ( | out array< MissionWorkshopItem > | items, |
int | page, | ||
int | pageSize | ||
) |
Get scenarios of enabled WorkshopItems.
proto native int WorkshopApi.GetTags | ( | out notnull array< WorkshopTag > | tags | ) |
Get all known tags.
proto native bool WorkshopApi.NeedAddonsScan | ( | ) |
True if local addons data were not loaded yet -> You can load them by ScanOfflineAddons()
proto native bool WorkshopApi.NeedSavesScan | ( | ) |
True if local saves data were not loaded yet -> You can load them by ScanOfflineSaves()
proto native bool WorkshopApi.NeedScan | ( | ) |
Trze if local addons or saves data were not loeaded yet.
proto native void WorkshopApi.OnItemsChecked | ( | BackendCallback | callback | ) |
Triggers OnSuccess when check for banned/up-to-date downloaded addons has finished.
Scan for default scenarios.
proto native WorkshopTag WorkshopApi.RegisterTag | ( | string | sName | ) |
Register new tag.
proto native void WorkshopApi.ScanOfflineAddons | ( | ) |
Load local addons data.
proto native void WorkshopApi.ScanOfflineSaves | ( | ) |
Load local world saves data.
proto native void WorkshopApi.SetCurrentSave | ( | WorldSaveItem | item | ) |
Set current world save.