Enfusion Script API
Loading...
Searching...
No Matches
Dependency Interface Reference

Dependency represent minimal structure of workshop item that other things depends on. More...

Inheritance diagram for Dependency:
Managed

Public Member Functions

void ~Dependency ()
 
proto external string GetID ()
 Returns ID of this item.
 
proto external string GetName ()
 Returns Name of this item.
 
proto external float TotalFileSize ()
 Returns total size of files in Bytes.
 
proto external string GetVersion ()
 Returns Version from Revision of this item.
 
proto external Revision GetRevision ()
 Returns Revision of this item.
 
proto external bool IsOffline ()
 Returns true if it is already locally downloaded.
 
proto external void LoadItem (BackendCallback callback)
 Will request to load WorkshopItem of this item from backend into cache.
 
proto external WorkshopItem GetCachedItem ()
 Returns cached WorkshopItem of this item or null if it was not yet cached.
 
proto external void Download (BackendCallback callback)
 Will request to download of this item.
 
- 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)
 

Detailed Description

Dependency represent minimal structure of workshop item that other things depends on.

  • WorkshopItem - addon can depend on other addons
  • WorldSaveItem - world save can depend on addons that were loaded at the time of its creation
  • Room - modded servers depends on addons that are loaded on them

It is provided with specific Revision which cannot be changed. With Revision you can access dependencies of this dependency.

You can request load of entire WorkshopItem that is full representation of this item.

It provided by:

  • Revision to reference Dependencies of WorkshopItem on specific version.
  • Room as list of addons necessary for specific server.

Constructor & Destructor Documentation

◆ ~Dependency()

void Dependency.~Dependency ( )

Member Function Documentation

◆ Download()

proto external void Dependency.Download ( BackendCallback callback)

Will request to download of this item.

Parameters
callback- Is script callback where you will receive result/error when request finishes

◆ GetCachedItem()

proto external WorkshopItem Dependency.GetCachedItem ( )

Returns cached WorkshopItem of this item or null if it was not yet cached.

Item can be cached by calling LoadItem(BackendCallback callback).

◆ GetID()

proto external string Dependency.GetID ( )

Returns ID of this item.

◆ GetName()

proto external string Dependency.GetName ( )

Returns Name of this item.

◆ GetRevision()

proto external Revision Dependency.GetRevision ( )

Returns Revision of this item.

◆ GetVersion()

proto external string Dependency.GetVersion ( )

Returns Version from Revision of this item.

◆ IsOffline()

proto external bool Dependency.IsOffline ( )

Returns true if it is already locally downloaded.

Revision is also checked so if it is already downloaded with different Revision then it will return false.

◆ LoadItem()

proto external void Dependency.LoadItem ( BackendCallback callback)

Will request to load WorkshopItem of this item from backend into cache.

Parameters
callbackIs script callback where you will receive result/error when request finishes

◆ TotalFileSize()

proto external float Dependency.TotalFileSize ( )

Returns total size of files in Bytes.


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