Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_WorkshopItemAction Interface Reference
Inheritance diagram for SCR_WorkshopItemAction:
[legend]

Public Member Functions

void SCR_WorkshopItemAction (SCR_WorkshopItem wrapper)
 
void ~SCR_WorkshopItemAction ()
 
bool IsInactive ()
 
bool IsActive ()
 
bool IsCompleted ()
 
bool IsCanceled ()
 
bool IsPaused ()
 
bool IsFailed ()
 
bool IsAttached ()
 When action is attached, it means that it wasn't completed or wasn't replaced by another action.
 
SCR_WorkshopItem GetWorkshopItem ()
 
void SetUserData (Managed data)
 
Managed GetUserData (Managed data)
 
string GetAddonName ()
 Returns the cached addon name, even if WorkshopItem object is already deleted.
 
string GetAddonId ()
 Returns the cached addon ID, even if WorkshopItem object is already deleted.
 
bool Activate ()
 Public methods to interact with the action They return true if the operation was successful.
 
bool Cancel ()
 Cancels an action. Valid in active, inactive, paused states.
 
bool Pause ()
 Pauses an active action.
 
bool Resume ()
 Resumes a paused action.
 
bool Reactivate ()
 Starts action again Only valid in failed state.
 
void Internal_Update (float timeSlice)
 Called on each frame by the SCR_WorkshopItem which owns it.
 
void Internal_Detach ()
 
void _print (string str, LogLevel logLevel=LogLevel.DEBUG)
 

Public Attributes

ref ScriptInvoker m_OnActivated = new ScriptInvoker
 
ref ScriptInvoker m_OnCompleted = new ScriptInvoker
 
ref ScriptInvoker m_OnCanceled = new ScriptInvoker
 
ref ScriptInvoker m_OnResumed = new ScriptInvoker
 
ref ScriptInvoker m_OnPaused = new ScriptInvoker
 
ref ScriptInvoker m_OnFailed = new ScriptInvoker
 
ref ScriptInvoker m_OnChanged = new ScriptInvoker
 
SCR_WorkshopItem m_Wrapper
 

Protected Member Functions

void Fail (int reason=-1)
 Action must call this when it has failed.
 
void Complete ()
 Action must call this when it is completed.
 
void InvokeOnChanged ()
 Call this in inherited classes to invoke the OnChanged event handler.
 
bool OnActivate ()
 These methods must be overridden in derived classes to implement the functionality.
 
bool OnCancel ()
 
bool OnPause ()
 
bool OnResume ()
 
bool OnReactivate ()
 
void OnFail (int reason=-1)
 
void OnComplete ()
 

Protected Attributes

int m_State
 
bool m_bAttached
 
ref Managed m_UserData
 
string m_sAddonName
 
string m_sAddonId
 

Static Protected Attributes

const int STATE_INACTIVE = 0
 
const int STATE_ACTIVE = 1
 
const int STATE_COMPLETED = 2
 
const int STATE_FAILED = 3
 
const int STATE_CANCELED = 4
 
const int STATE_PAUSED = 5
 

Constructor & Destructor Documentation

◆ SCR_WorkshopItemAction()

void SCR_WorkshopItemAction.SCR_WorkshopItemAction ( SCR_WorkshopItem  wrapper)

◆ ~SCR_WorkshopItemAction()

void SCR_WorkshopItemAction.~SCR_WorkshopItemAction ( )

Member Function Documentation

◆ _print()

void SCR_WorkshopItemAction._print ( string  str,
LogLevel  logLevel = LogLevel::DEBUG 
)

◆ Activate()

bool SCR_WorkshopItemAction.Activate ( )

Public methods to interact with the action They return true if the operation was successful.

If operation was not successful, false is returned, and action is in Failed state. Activates an inactive action, or resumes a paused action.

◆ Cancel()

bool SCR_WorkshopItemAction.Cancel ( )

Cancels an action. Valid in active, inactive, paused states.

◆ Complete()

void SCR_WorkshopItemAction.Complete ( )
protected

Action must call this when it is completed.

◆ Fail()

void SCR_WorkshopItemAction.Fail ( int  reason = -1)
protected

Action must call this when it has failed.

◆ GetAddonId()

string SCR_WorkshopItemAction.GetAddonId ( )

Returns the cached addon ID, even if WorkshopItem object is already deleted.

◆ GetAddonName()

string SCR_WorkshopItemAction.GetAddonName ( )

Returns the cached addon name, even if WorkshopItem object is already deleted.

◆ GetUserData()

Managed SCR_WorkshopItemAction.GetUserData ( Managed  data)

◆ GetWorkshopItem()

SCR_WorkshopItem SCR_WorkshopItemAction.GetWorkshopItem ( )

◆ Internal_Detach()

void SCR_WorkshopItemAction.Internal_Detach ( )

◆ Internal_Update()

void SCR_WorkshopItemAction.Internal_Update ( float  timeSlice)

Called on each frame by the SCR_WorkshopItem which owns it.

Here we can perform polling to detect state transitions

Implemented in SCR_WorkshopItemActionDownload, and SCR_WorkshopItemActionDownloadDependenciesLatest.

◆ InvokeOnChanged()

void SCR_WorkshopItemAction.InvokeOnChanged ( )
protected

Call this in inherited classes to invoke the OnChanged event handler.

◆ IsActive()

bool SCR_WorkshopItemAction.IsActive ( )

◆ IsAttached()

bool SCR_WorkshopItemAction.IsAttached ( )

When action is attached, it means that it wasn't completed or wasn't replaced by another action.

It is detached when another action takes its place, when it is completed or canceled. If an action is detached, you can only read its state, but you can't do any operations like activate, restart, pause, etc.

◆ IsCanceled()

bool SCR_WorkshopItemAction.IsCanceled ( )

◆ IsCompleted()

bool SCR_WorkshopItemAction.IsCompleted ( )

◆ IsFailed()

bool SCR_WorkshopItemAction.IsFailed ( )

◆ IsInactive()

bool SCR_WorkshopItemAction.IsInactive ( )

◆ IsPaused()

bool SCR_WorkshopItemAction.IsPaused ( )

◆ OnActivate()

bool SCR_WorkshopItemAction.OnActivate ( )
protected

These methods must be overridden in derived classes to implement the functionality.

If the specific action can't be paused, canceled, or resumed, the methods must return false.

Implemented in SCR_WorkshopItemActionDownload, SCR_WorkshopItemActionDownloadDependenciesLatest, and SCR_WorkshopItemActionReportBase.

◆ OnCancel()

bool SCR_WorkshopItemAction.OnCancel ( )
protected

◆ OnComplete()

void SCR_WorkshopItemAction.OnComplete ( )
protected

◆ OnFail()

void SCR_WorkshopItemAction.OnFail ( int  reason = -1)
protected

◆ OnPause()

bool SCR_WorkshopItemAction.OnPause ( )
protected

◆ OnReactivate()

bool SCR_WorkshopItemAction.OnReactivate ( )
protected

◆ OnResume()

bool SCR_WorkshopItemAction.OnResume ( )
protected

◆ Pause()

bool SCR_WorkshopItemAction.Pause ( )

Pauses an active action.

◆ Reactivate()

bool SCR_WorkshopItemAction.Reactivate ( )

Starts action again Only valid in failed state.

◆ Resume()

bool SCR_WorkshopItemAction.Resume ( )

Resumes a paused action.

◆ SetUserData()

void SCR_WorkshopItemAction.SetUserData ( Managed  data)

Member Data Documentation

◆ m_bAttached

bool SCR_WorkshopItemAction.m_bAttached
protected

◆ m_OnActivated

ref ScriptInvoker SCR_WorkshopItemAction.m_OnActivated = new ScriptInvoker

◆ m_OnCanceled

ref ScriptInvoker SCR_WorkshopItemAction.m_OnCanceled = new ScriptInvoker

◆ m_OnChanged

ref ScriptInvoker SCR_WorkshopItemAction.m_OnChanged = new ScriptInvoker

◆ m_OnCompleted

ref ScriptInvoker SCR_WorkshopItemAction.m_OnCompleted = new ScriptInvoker

◆ m_OnFailed

ref ScriptInvoker SCR_WorkshopItemAction.m_OnFailed = new ScriptInvoker

◆ m_OnPaused

ref ScriptInvoker SCR_WorkshopItemAction.m_OnPaused = new ScriptInvoker

◆ m_OnResumed

ref ScriptInvoker SCR_WorkshopItemAction.m_OnResumed = new ScriptInvoker

◆ m_sAddonId

string SCR_WorkshopItemAction.m_sAddonId
protected

◆ m_sAddonName

string SCR_WorkshopItemAction.m_sAddonName
protected

◆ m_State

int SCR_WorkshopItemAction.m_State
protected

◆ m_UserData

ref Managed SCR_WorkshopItemAction.m_UserData
protected

◆ m_Wrapper

SCR_WorkshopItem SCR_WorkshopItemAction.m_Wrapper

◆ STATE_ACTIVE

const int SCR_WorkshopItemAction.STATE_ACTIVE = 1
staticprotected

◆ STATE_CANCELED

const int SCR_WorkshopItemAction.STATE_CANCELED = 4
staticprotected

◆ STATE_COMPLETED

const int SCR_WorkshopItemAction.STATE_COMPLETED = 2
staticprotected

◆ STATE_FAILED

const int SCR_WorkshopItemAction.STATE_FAILED = 3
staticprotected

◆ STATE_INACTIVE

const int SCR_WorkshopItemAction.STATE_INACTIVE = 0
staticprotected

◆ STATE_PAUSED

const int SCR_WorkshopItemAction.STATE_PAUSED = 5
staticprotected

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