|
Enfusion Script API
|
Workshop Item instance. More...
Public Member Functions | |
| void | ~WorkshopItem () |
| proto external EWorkshopItemType | GetType () |
| Returns type of this item. | |
| proto external void | Download (BackendCallback pCallback, Revision pRevision) |
| Request download of this item. | |
| proto external void | ResumeDownload (BackendCallback pCallback) |
| Will resume download of this item. | |
| proto external void | PauseDownload (BackendCallback pCallback) |
| Will pause download of this item. | |
| proto external void | Cancel (BackendCallback pCallback) |
| Will cancel download of this item. | |
| 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 void | DeleteDownloadProgress () |
| Will delete progress from downloading of this item. Download must be first canceled. | |
| 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 void | CancelVerification () |
| Request cancellation of verification process. | |
| proto external bool | IsVerificationRunning () |
| Returns true if verification is currently in process. | |
| proto external float | GetVerificationProgress () |
| Returns progress of current verification process in range of <0.0. ... 1.0> | |
| proto external string | GetBackendEnv () |
| Returns name of Backend Environment of Workshop from which item originates. | |
| proto external void | DeleteLocally () |
| Will delete locally downloaded item. | |
| proto external void | DeleteOnline (BackendCallback pCallback) |
| Request to delete this item from the Workshop. | |
| proto external bool | IsLoaded () |
| Returns true if item is currently loaded. | |
| proto external void | AskDetail (notnull BackendCallback pCallback) |
| Request details about this item from Workshop. | |
| 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 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 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 | RateFloat (float fRating, BackendCallback pCallback) |
| Request submit of user rating. | |
| 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 rating in up vote and down vote boolean value. | |
| proto external float | MyRatingFloat () |
| Returns rating as raw float value of 0.0 ... 1.0 or -1 if no rating was submitted. | |
| proto external int | RatingCount () |
| Returns count of how many votes item has in rating. | |
| proto external float | AverageRating () |
| Returns average rating of this item in between 0.0 ... 1.0. | |
| proto external float | GetTrendingScore () |
| Returns random value between 0.0 ... 1000.0 representing trending score. | |
| proto external float | GetCommunityChoiceScore () |
| Returns random value between 0.0 ... 1000.0 representing community choice score. | |
| proto external float | GetTotalDownloadCount () |
| Returns random value between 0 ... 10000 representing total download count. | |
| 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. | |
Public Member Functions inherited from BaseWorkshopItem | |
| void | ~BaseWorkshopItem () |
| proto external bool | IsProcessed () |
| Returns true if item is currently processing with Workshop - is downloading. | |
| proto external string | Name () |
| Get name of the item. | |
| proto external BackendImage | Thumbnail () |
| Returns thumbnail image of this item. | |
| 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 string | Description () |
| Get description of the item. | |
| proto external string | Id () |
| Returns Id of item. | |
| proto external string | Summary () |
| Returns Summary text of this item. | |
| proto external int | GetStateFlags () |
| Returns current state flags. | |
Public Member Functions inherited from Managed | |
| 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 void WorkshopItem.AskDetail | ( | notnull BackendCallback | pCallback | ) |
Request details about this item from Workshop.
| pCallback | - Is script callback where you will receive result/error when request finishes |
| 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 in between 0.0 ... 1.0.
| proto external void WorkshopItem.Cancel | ( | BackendCallback | pCallback | ) |
Will cancel download of this item.
Data will be cleared. param pCallback - Is script callback where you will receive result/error when request finishes
| 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 void WorkshopItem.CancelVerification | ( | ) |
Request cancellation of verification process.
| 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.DeleteDownloadProgress | ( | ) |
Will delete progress from downloading of this item. Download must be first canceled.
| proto external void WorkshopItem.DeleteLocally | ( | ) |
Will delete locally downloaded item.
| proto external void WorkshopItem.DeleteOnline | ( | BackendCallback | pCallback | ) |
Request to delete this item from the Workshop.
Client must be owner of item for successful delete.
| pCallback | - Is script callback where you will receive result/error when request finishes |
| proto external void WorkshopItem.Download | ( | BackendCallback | pCallback, |
| Revision | pRevision ) |
Request download of this item.
| pCallback | - Is script callback where you will receive result/error when request finishes |
| pRevision | - Is Revision which will be requested to download |
| 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 float WorkshopItem.GetCommunityChoiceScore | ( | ) |
Returns random value between 0.0 ... 1000.0 representing community choice score.
| proto external float WorkshopItem.GetProcessingProgress | ( | ) |
Return progress of current processing (delta patching) in range of <0.0. ... 1.0>. Returns 1 if it is already downloaded.
| proto external float WorkshopItem.GetProgress | ( | ) |
Returns progress of current download in range of <0.0. ... 1.0>. Returns 1 if it is already downloaded.
| 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 float WorkshopItem.GetTotalDownloadCount | ( | ) |
Returns random value between 0 ... 10000 representing total download count.
| proto external float WorkshopItem.GetTrendingScore | ( | ) |
Returns random value between 0.0 ... 1000.0 representing trending score.
| proto external EWorkshopItemType WorkshopItem.GetType | ( | ) |
Returns type of this item.
| proto external float WorkshopItem.GetVerificationProgress | ( | ) |
Returns progress of current verification process in range of <0.0. ... 1.0>
| 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.IsProcessing | ( | ) |
Returns true if addon is currently processing delta patches from already downloaded version.
| 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 bool WorkshopItem.IsVerificationRunning | ( | ) |
Returns true if verification is currently in process.
| 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 rating in up vote and down vote boolean value.
| proto external float WorkshopItem.MyRatingFloat | ( | ) |
Returns rating as raw float value of 0.0 ... 1.0 or -1 if no rating was submitted.
| proto external void WorkshopItem.NotifyPlay | ( | ) |
Resets the GetTimeSinceLastPlay time.
| proto external void WorkshopItem.PauseDownload | ( | BackendCallback | pCallback | ) |
Will pause download of this item.
| pCallback | - Is script callback where you will receive result/error when request finishes |
| 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 void WorkshopItem.RateFloat | ( | float | fRating, |
| BackendCallback | pCallback ) |
Request submit of user rating.
| fRating | - rating 0.0 ... 1.0 |
| 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.RepairIntegrity | ( | BackendCallback | pCallback | ) |
Request repair of local files integrity in case of corruption.
Corrupted files are deleted and downloaded as new.
| pCallback | - Is script callback where you will receive result/error when request finishes |
| 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.ResumeDownload | ( | BackendCallback | pCallback | ) |
Will resume download of this item.
| 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.
| proto external void WorkshopItem.VerifyIntegrity | ( | BackendCallback | pCallback | ) |
Request verification of files integrity.
Sets flags of revision and each file accordingly.
| pCallback | - Is script callback where you will receive result/error when request finishes |