Enfusion Script API
|
Workshop Item instance. More...
Public Member Functions | |
void | ~WorkshopItem () |
proto external EWorkshopItemType | GetType () |
Returns type of this item. | |
proto external string | GetBackendEnv () |
Returns name of Backend Environment of Workshop from which item originates. | |
proto external bool | IsLoaded () |
Returns true if item is currently loaded. | |
proto external bool | IsReadyToRun () |
Returns true if this item can be loaded. | |
proto external void | Enable (bool enable) |
Sets enable state for this item - if it should be loaded or not. | |
proto external bool | IsEnabled () |
Returns true if addon is set as enabled and would be loaded. | |
proto external int | GetAccessState () |
Returns access state flag -> EWorkshopItemAccessState. | |
proto external bool | IsUnlisted () |
Returns true when item have been Unlisted on the Workshop. | |
proto external int | GetTimeSinceLastPlay () |
Returns time since last played game with this addon. | |
proto external int | GetTimeSinceFirstDownload () |
Time in seconds since we downloaded this addon first time. Further updates do not affect this. | |
proto external void | NotifyPlay () |
Resets the GetTimeSinceLastPlay time. | |
proto external bool | IsSubscribed () |
Returns true if item is subscribed. | |
proto external void | Subscribe (BackendCallback callback) |
Request to subscribe this item. | |
proto external void | Unsubscribe (BackendCallback callback) |
Request to unsubscribe this item. | |
proto external bool | IsFavorite () |
Returns true if item is set as favorite. | |
proto external void | SetFavorite (BackendCallback pCallback, bool isFavorite) |
Request to set favorite state for this item. | |
proto external bool | IsAuthor () |
Returns true if the current user is author of this item. | |
proto external WorkshopAuthor | Author () |
Returns objects containing details about author of this item. | |
proto external bool | IsContributor () |
Returns true if the current user is contributor of this item. | |
proto external int | Contributors (out notnull array< WorkshopAuthor > outContributors) |
Provides array of contributors of this item. | |
proto external string | License () |
Returns type of license for this item. | |
proto external string | LicenseText () |
Returns additional text to license for this item. | |
proto external void | Report (EWorkshopReportType eReport, string sDesc, BackendCallback pCallback) |
Request creation of report to this item. | |
proto external void | LoadReport (BackendCallback pCallback) |
Request load of already existing report to this item. | |
proto external void | CancelReport (BackendCallback pCallback) |
Request to cancel/delete your report of this item. | |
proto external EWorkshopReportType | GetReportType () |
Returns type of report that was already submitted to this item. | |
proto external string | GetReportDescription () |
Returns description message provided by user to the report. | |
proto external void | Rate (bool bUpvote, BackendCallback pCallback) |
Request up vote or down vote rating for this item. | |
proto external void | ResetRating (BackendCallback pCallback) |
Request reset of user vote for rating. | |
proto external bool | IsRatingSet () |
Returns true if user voted in rating for this item. | |
proto external bool | MyRating () |
Returns what vote user chose for this item. | |
proto external int | RatingCount () |
Returns count of how many votes item has in rating. | |
proto external float | AverageRating () |
Returns average rating of this item. | |
proto external int | GetTags (out notnull array< WorkshopTag > items) |
Provides array of tags on this item. | |
proto external bool | HasAnyTag (notnull array< WorkshopTag > tags) |
Returns true if any of tags passed via array is present on item. | |
proto external int | Gallery (out notnull array< BackendImage > images) |
Returns gallery of images for this item. | |
proto external bool | EnoughLocalSpace () |
Returns true if there is enough space on local storage to fit this item. | |
![]() | |
void | ~DownloadableItem () |
proto external void | VerifyIntegrity (BackendCallback pCallback) |
Request verification of files integrity. | |
proto external void | RepairIntegrity (BackendCallback pCallback) |
Request repair of local files integrity in case of corruption. | |
proto external bool | IsVerificationRunning () |
Returns true if verification is currently in process. | |
proto external int | GetVerificationProgress () |
Returns progress of current verification process in range of <0.0. ... 1.0> | |
proto external string | Id () |
Returns Id of item. | |
proto external string | Summary () |
Returns Summary text of this item. | |
proto external BackendImage | Thumbnail () |
Returns thumbnail image of this item. | |
proto external void | AskDetail (notnull BackendCallback pCallback) |
Request details about this item from Workshop. | |
proto external void | LoadDependencies (BackendCallback pCallback, notnull Revision pRevision) |
Request list of all dependencies for this item on specific Revision. | |
proto external void | LoadScenarios (BackendCallback pCallback, notnull Revision pRevision) |
Request list of all scenarios for this item on specific Revision. | |
proto external void | LoadChangelog (BackendCallback pCallback, notnull Revision pRevision) |
Request changelog for this item on specific Revision. | |
proto external void | Download (BackendCallback pCallback, Revision pRevision) |
Request download of this item. | |
proto external void | PauseDownload (BackendCallback pCallback) |
Will pause download of this item. | |
proto external void | ResumeDownload (BackendCallback pCallback) |
Will resume download of this item. | |
proto external void | Cancel (BackendCallback pCallback) |
Will cancel download of this item. | |
proto external void | DeleteLocally () |
Will delete locally downloaded item. | |
proto external void | DeleteDownloadProgress () |
Will delete progress from downloading of this item. Download must be first canceled. | |
proto external void | DeleteOnline (BackendCallback pCallback) |
Request to delete this item from the Workshop. | |
proto external bool | HasLatestVersion () |
Returns true if latest Revision is downloaded. | |
proto external Revision | GetLatestRevision () |
Returns latest Revision of this item. | |
proto external Revision | GetActiveRevision () |
Returns currently downloaded Revision of item. | |
proto external Revision | GetPendingDownload () |
Returns currently pending/downloading Revision. | |
proto external Revision | GetDownloadingRevision () |
Returns currently downloading Revision (will return null if it is paused) | |
proto external Revision | GetLocalRevision () |
Returns pseudo Revision for local non-workshop item. | |
proto external int | GetRevisions (out notnull array< Revision > revisions) |
Provides array of Revision history of X latest revisions. | |
proto external float | GetProgress () |
Returns progress of current download in range of <0.0. ... 1.0>. Returns 1 if it is already downloaded. | |
proto external float | GetProcessingProgress () |
Return progress of current processing (delta patching) in range of <0.0. ... 1.0>. Returns 1 if it is already downloaded. | |
proto external bool | IsProcessing () |
Returns true if addon is currently processing delta patches from already downloaded version. | |
proto external bool | IsProcessed () |
Returns true if item is currently processing with Workshop. Is Downloading or Uploading. | |
proto external int | GetStateFlags () |
Returns current state flags. | |
proto external int | GetScriptFlag () |
Returns current persistent flags defined and set by scripts. | |
proto external void | SetScriptFlag (int iFlag) |
Set persistent flag defined by script. | |
proto external void | ClearScriptFlag (int iFlag) |
Clears specific persistent flag defined by script. | |
![]() | |
void | ~BaseWorkshopItem () |
proto external string | Name () |
Get name of the item. | |
proto external string | Description () |
Get description of the item. | |
![]() | |
proto external ref Managed | Clone () |
Return shallow copy of object, or null if it is not allowed (not public constructor) | |
Static Public Member Functions | |
static proto void | SetThumbnailGridScale (int iWidth) |
Set the preferred thumbnail size (width) that is automatically downloaded when page is requested. | |
Workshop Item instance.
void WorkshopItem.~WorkshopItem | ( | ) |
proto external WorkshopAuthor WorkshopItem.Author | ( | ) |
Returns objects containing details about author of this item.
proto external float WorkshopItem.AverageRating | ( | ) |
Returns average rating of this item.
proto external void WorkshopItem.CancelReport | ( | BackendCallback | pCallback | ) |
Request to cancel/delete your report of this item.
pCallback | - Is script callback where you will receive result/error when request finishes |
proto external int WorkshopItem.Contributors | ( | out notnull array< WorkshopAuthor > | outContributors | ) |
Provides array of contributors of this item.
[out] | outContributors | - array of WorkshopAuthor containing details about contributors |
proto external void WorkshopItem.Enable | ( | bool | enable | ) |
Sets enable state for this item - if it should be loaded or not.
Cannot be changed if item is already loaded.
proto external bool WorkshopItem.EnoughLocalSpace | ( | ) |
Returns true if there is enough space on local storage to fit this item.
proto external int WorkshopItem.Gallery | ( | out notnull array< BackendImage > | images | ) |
Returns gallery of images for this item.
proto external int WorkshopItem.GetAccessState | ( | ) |
Returns access state flag -> EWorkshopItemAccessState.
proto external string WorkshopItem.GetBackendEnv | ( | ) |
Returns name of Backend Environment of Workshop from which item originates.
Can be used to validate origin of item to confirm that source and current environment are same.
proto external string WorkshopItem.GetReportDescription | ( | ) |
Returns description message provided by user to the report.
proto external EWorkshopReportType WorkshopItem.GetReportType | ( | ) |
Returns type of report that was already submitted to this item.
proto external int WorkshopItem.GetTags | ( | out notnull array< WorkshopTag > | items | ) |
Provides array of tags on this item.
items | - array of tags |
proto external int WorkshopItem.GetTimeSinceFirstDownload | ( | ) |
Time in seconds since we downloaded this addon first time. Further updates do not affect this.
proto external int WorkshopItem.GetTimeSinceLastPlay | ( | ) |
Returns time since last played game with this addon.
proto external EWorkshopItemType WorkshopItem.GetType | ( | ) |
Returns type of this item.
proto external bool WorkshopItem.HasAnyTag | ( | notnull array< WorkshopTag > | tags | ) |
Returns true if any of tags passed via array is present on item.
proto external bool WorkshopItem.IsAuthor | ( | ) |
Returns true if the current user is author of this item.
proto external bool WorkshopItem.IsContributor | ( | ) |
Returns true if the current user is contributor of this item.
proto external bool WorkshopItem.IsEnabled | ( | ) |
Returns true if addon is set as enabled and would be loaded.
Will always return true if it is already loaded.
proto external bool WorkshopItem.IsFavorite | ( | ) |
Returns true if item is set as favorite.
proto external bool WorkshopItem.IsLoaded | ( | ) |
Returns true if item is currently loaded.
proto external bool WorkshopItem.IsRatingSet | ( | ) |
Returns true if user voted in rating for this item.
proto external bool WorkshopItem.IsReadyToRun | ( | ) |
Returns true if this item can be loaded.
When item or dependencies are not Offline and Revision is equal to selected.
proto external bool WorkshopItem.IsSubscribed | ( | ) |
Returns true if item is subscribed.
proto external bool WorkshopItem.IsUnlisted | ( | ) |
Returns true when item have been Unlisted on the Workshop.
proto external string WorkshopItem.License | ( | ) |
Returns type of license for this item.
proto external string WorkshopItem.LicenseText | ( | ) |
Returns additional text to license for this item.
proto external void WorkshopItem.LoadReport | ( | BackendCallback | pCallback | ) |
Request load of already existing report to this item.
pCallback | - Is script callback where you will receive result/error when request finishes |
proto external bool WorkshopItem.MyRating | ( | ) |
Returns what vote user chose for this item.
proto external void WorkshopItem.NotifyPlay | ( | ) |
Resets the GetTimeSinceLastPlay time.
proto external void WorkshopItem.Rate | ( | bool | bUpvote, |
BackendCallback | pCallback ) |
Request up vote or down vote rating for this item.
bUpvote | - up or down vote |
pCallback | - Is script callback where you will receive result/error when request finishes |
proto external int WorkshopItem.RatingCount | ( | ) |
Returns count of how many votes item has in rating.
proto external void WorkshopItem.Report | ( | EWorkshopReportType | eReport, |
string | sDesc, | ||
BackendCallback | pCallback ) |
Request creation of report to this item.
eReport | - type of report |
sDesc | - user description message attached to the report |
pCallback | - Is script callback where you will receive result/error when request finishes |
proto external void WorkshopItem.ResetRating | ( | BackendCallback | pCallback | ) |
Request reset of user vote for rating.
pCallback | - Is script callback where you will receive result/error when request finishes |
proto external void WorkshopItem.SetFavorite | ( | BackendCallback | pCallback, |
bool | isFavorite ) |
Request to set favorite state for this item.
pCallback | - Is script callback where you will receive result/error when request finishes |
isFavorite | - which state is desired |
|
static |
Set the preferred thumbnail size (width) that is automatically downloaded when page is requested.
proto external void WorkshopItem.Subscribe | ( | BackendCallback | callback | ) |
Request to subscribe this item.
proto external void WorkshopItem.Unsubscribe | ( | BackendCallback | callback | ) |
Request to unsubscribe this item.