Enfusion Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
WorkshopItem Interface Reference
Inheritance diagram for WorkshopItem:
[legend]

Public Member Functions

void ~WorkshopItem ()
 
proto native WorkshopAuthor Author ()
 Get name of the author.
 
proto native int Contributors (out notnull array< WorkshopAuthor > contributors)
 Get contributors of this Item.
 
proto native void Subscribe (BackendCallback callback)
 Subscribe this Item.
 
proto native void Unsubscribe (BackendCallback callback)
 Unsubscribe this Item.
 
proto native bool IsSubscribed ()
 Is this item subscribed?
 
proto native void LoadScenarios (BackendCallback callback, notnull Revision revision)
 Load revision's scenarios.
 
proto native void LoadChangelog (BackendCallback callback, notnull Revision revision)
 Load revision's changelog.
 
proto native void Report (EWorkshopReportType eReport, string sMessage, BackendCallback callback)
 Call report (feedback) upon specific item.
 
proto native void CancelReport (BackendCallback callback)
 Deletes an existing report from backend.
 
proto native void LoadReport (BackendCallback callback)
 Loads existing report from backend.
 
proto native string GetReportDescription ()
 Returns description of report.
 
proto native int GetReportType ()
 Returns type of report.
 
proto native int GetStateFlags ()
 Get current state flags (EWorkshopItemState)
 
proto native float GetSizeBytes ()
 Get size of the package in bytes.
 
proto native float AverageRating ()
 Get average rating - number in <0,5>
 
proto native void ResetRating (BackendCallback callback)
 Reset my rating.
 
proto native void Rate (bool upvote, BackendCallback callback)
 Set rating.
 
proto native bool IsRatingSet ()
 Is my rating set.
 
proto native bool MyRating ()
 Get rating value - true upvote, false downvote.
 
proto native int RatingCount ()
 Get rating count.
 
proto native int GetTags (out notnull array< WorkshopTag > items)
 Copy all tags to given Array.
 
proto native bool IsProcessed ()
 Returns true if process pending ATM (download, upload, delete)
 
proto native void Enable (bool enable)
 Activate addon.
 
proto native bool IsEnabled ()
 Returns True if addon is currently activated.
 
proto native string License ()
 Read Licence type.
 
proto native string LicenseText ()
 Read Licence text.
 
proto native int Gallery (out notnull array< BackendImage > gallery)
 Get image gallery.
 
proto native void SetFavorite (BackendCallback callback, bool isFavorite)
 Add to favourites.
 
proto native bool IsFavorite ()
 Returns True - when item when item is Favourite.
 
proto native void PauseDownload (BackendCallback callback)
 Pause download.
 
proto native void ResumeDownload (BackendCallback callback)
 Resume download.
 
proto native bool EnoughLocalSpace ()
 Is there enough space on the local storage.
 
proto native bool IsLoaded ()
 True if not only enabled, but actually loaded.
 
proto native bool HasAnyTag (notnull array< WorkshopTag > tags)
 Results True if any of tags passed via.
 
proto native int GetAccessState ()
 Returns access state flag -> EWorkshopItemAccessState.
 
proto native int GetTimeSinceFirstDownload ()
 Time in seconds since we downloaded this addon first time.
 
proto native int GetTimeSinceLastPlay ()
 Time since last time we played with this addon.
 
proto native void NotifyPlay ()
 Resets TimeSinceLastPlay value.
 
proto native owned string GetBackendEnv ()
 Read actual environment as string (can be validated against addon to confirm source and current environment are same)
 
proto native bool IsReadyToRun ()
 Returns True - when item or dependencies are not Offline and Revision is equal to selected.
 
proto native bool IsUnlisted ()
 True when mod have been Unlisted (regular maintenance when major update is released)
 
proto native bool IsAuthor ()
 Is the current user author of this asset.
 
proto native bool IsContributor ()
 Is the current user contributor of this asset.
 
- Public Member Functions inherited from DownloadableItem
proto native string Id ()
 
proto native void Download (BackendCallback callback, Revision revision)
 Request download of this item.
 
proto native void AskDetail (BackendCallback callback)
 Request detail info.
 
proto native float GetProgress ()
 Get Download/ Upload progress in range <0.0.
 
proto native float GetProcessingProgress ()
 Get download/update progress based on file operations in range <0.0.
 
proto native bool IsProcessing ()
 True if download is waiting for file processing.
 
proto native BackendImage Thumbnail ()
 Get thumbnail image.
 
proto native bool HasLatestVersion ()
 Is the local version the latest one?
 
proto native int GetRevisions (out notnull array< Revision > revisions)
 
proto native Revision GetActiveRevision ()
 Returns currently used revision or null if no revision is downloaded.
 
proto native Revision GetDownloadingRevision ()
 Returns currently downloading revision.
 
proto native void Cancel (BackendCallback callback)
 Cancel upload or download.
 
proto native void DeleteLocally ()
 Delete local copy of an asset.
 
proto native void DeleteDownloadProgress ()
 
proto native Revision GetPendingDownload ()
 
proto native void SetScriptFlag (int iFlag)
 Set script-defined persistent flags.
 
proto native void ClearScriptFlag (int iFlag)
 Clear script-defined persistent flags.
 
proto native int GetScriptFlag ()
 Get script-defined persistent flags.
 
proto native Revision GetLatestRevision ()
 
proto native void LoadDependencies (BackendCallback callback, notnull Revision revision)
 Load revision's dependency list.
 
proto native Revision GetLocalRevision ()
 Get local (non-workshop) revision.
 
proto native string Summary ()
 Get summary.
 
- Public Member Functions inherited from BaseWorkshopItem
proto native string Name ()
 
proto native string Description ()
 

Static Public Member Functions

proto static native void SetThumbnailGridScale (int scale)
 Set the prefed thumbnail size (width) that is automatically downloaded when called RequestPage.
 

Constructor & Destructor Documentation

◆ ~WorkshopItem()

void WorkshopItem.~WorkshopItem ( )

Member Function Documentation

◆ Author()

proto native WorkshopAuthor WorkshopItem.Author ( )

Get name of the author.

◆ AverageRating()

proto native float WorkshopItem.AverageRating ( )

Get average rating - number in <0,5>

◆ CancelReport()

proto native void WorkshopItem.CancelReport ( BackendCallback  callback)

Deletes an existing report from backend.

When completed, the item will no longer report that it is reported.

◆ Contributors()

proto native int WorkshopItem.Contributors ( out notnull array< WorkshopAuthor contributors)

Get contributors of this Item.

Parameters
contributorsArray of contributors
Returns
Count of contributors

◆ Enable()

proto native void WorkshopItem.Enable ( bool  enable)

Activate addon.

◆ EnoughLocalSpace()

proto native bool WorkshopItem.EnoughLocalSpace ( )

Is there enough space on the local storage.

◆ Gallery()

proto native int WorkshopItem.Gallery ( out notnull array< BackendImage gallery)

Get image gallery.

◆ GetAccessState()

proto native int WorkshopItem.GetAccessState ( )

Returns access state flag -> EWorkshopItemAccessState.

◆ GetBackendEnv()

proto native owned string WorkshopItem.GetBackendEnv ( )

Read actual environment as string (can be validated against addon to confirm source and current environment are same)

◆ GetReportDescription()

proto native string WorkshopItem.GetReportDescription ( )

Returns description of report.

◆ GetReportType()

proto native int WorkshopItem.GetReportType ( )

Returns type of report.

◆ GetSizeBytes()

proto native float WorkshopItem.GetSizeBytes ( )

Get size of the package in bytes.

◆ GetStateFlags()

proto native int WorkshopItem.GetStateFlags ( )

Get current state flags (EWorkshopItemState)

◆ GetTags()

proto native int WorkshopItem.GetTags ( out notnull array< WorkshopTag items)

Copy all tags to given Array.

Parameters
itemsArray of Workshop Items
Returns
Count of items

◆ GetTimeSinceFirstDownload()

proto native int WorkshopItem.GetTimeSinceFirstDownload ( )

Time in seconds since we downloaded this addon first time.

Further updates do not affect this.

◆ GetTimeSinceLastPlay()

proto native int WorkshopItem.GetTimeSinceLastPlay ( )

Time since last time we played with this addon.

◆ HasAnyTag()

proto native bool WorkshopItem.HasAnyTag ( notnull array< WorkshopTag tags)

Results True if any of tags passed via.

array 'tags' is present

Parameters
tagsArray of tags to check against

◆ IsAuthor()

proto native bool WorkshopItem.IsAuthor ( )

Is the current user author of this asset.

◆ IsContributor()

proto native bool WorkshopItem.IsContributor ( )

Is the current user contributor of this asset.

◆ IsEnabled()

proto native bool WorkshopItem.IsEnabled ( )

Returns True if addon is currently activated.

◆ IsFavorite()

proto native bool WorkshopItem.IsFavorite ( )

Returns True - when item when item is Favourite.

◆ IsLoaded()

proto native bool WorkshopItem.IsLoaded ( )

True if not only enabled, but actually loaded.

◆ IsProcessed()

proto native bool WorkshopItem.IsProcessed ( )

Returns true if process pending ATM (download, upload, delete)

◆ IsRatingSet()

proto native bool WorkshopItem.IsRatingSet ( )

Is my rating set.

◆ IsReadyToRun()

proto native bool WorkshopItem.IsReadyToRun ( )

Returns True - when item or dependencies are not Offline and Revision is equal to selected.

◆ IsSubscribed()

proto native bool WorkshopItem.IsSubscribed ( )

Is this item subscribed?

◆ IsUnlisted()

proto native bool WorkshopItem.IsUnlisted ( )

True when mod have been Unlisted (regular maintenance when major update is released)

◆ License()

proto native string WorkshopItem.License ( )

Read Licence type.

◆ LicenseText()

proto native string WorkshopItem.LicenseText ( )

Read Licence text.

◆ LoadChangelog()

proto native void WorkshopItem.LoadChangelog ( BackendCallback  callback,
notnull Revision  revision 
)

Load revision's changelog.

◆ LoadReport()

proto native void WorkshopItem.LoadReport ( BackendCallback  callback)

Loads existing report from backend.

When done, use ... to get report data.

◆ LoadScenarios()

proto native void WorkshopItem.LoadScenarios ( BackendCallback  callback,
notnull Revision  revision 
)

Load revision's scenarios.

◆ MyRating()

proto native bool WorkshopItem.MyRating ( )

Get rating value - true upvote, false downvote.

◆ NotifyPlay()

proto native void WorkshopItem.NotifyPlay ( )

Resets TimeSinceLastPlay value.

◆ PauseDownload()

proto native void WorkshopItem.PauseDownload ( BackendCallback  callback)

Pause download.

◆ Rate()

proto native void WorkshopItem.Rate ( bool  upvote,
BackendCallback  callback 
)

Set rating.

◆ RatingCount()

proto native int WorkshopItem.RatingCount ( )

Get rating count.

◆ Report()

proto native void WorkshopItem.Report ( EWorkshopReportType  eReport,
string  sMessage,
BackendCallback  callback 
)

Call report (feedback) upon specific item.

◆ ResetRating()

proto native void WorkshopItem.ResetRating ( BackendCallback  callback)

Reset my rating.

◆ ResumeDownload()

proto native void WorkshopItem.ResumeDownload ( BackendCallback  callback)

Resume download.

◆ SetFavorite()

proto native void WorkshopItem.SetFavorite ( BackendCallback  callback,
bool  isFavorite 
)

Add to favourites.

◆ SetThumbnailGridScale()

proto static native void WorkshopItem.SetThumbnailGridScale ( int  scale)
static

Set the prefed thumbnail size (width) that is automatically downloaded when called RequestPage.

◆ Subscribe()

proto native void WorkshopItem.Subscribe ( BackendCallback  callback)

Subscribe this Item.

◆ Unsubscribe()

proto native void WorkshopItem.Unsubscribe ( BackendCallback  callback)

Unsubscribe this Item.


The documentation for this interface was generated from the following file: