Skip to content

EffectPack ​

Represents an abstract base class for effect packs.

Kind: Abstract class

Namespace: CrowdControl.Games

Inheritance: IDisposable → IEffectPack → IEffectPack

Public Member Functions

virtual

Task

GetPackState()

virtual

Task

SetPackState(JObject packState)

Task

InterpolateText(string message)

Performs string interpolation on the given text using the metadata values.

Task

FlushQueue()

Flushes the effect queue.

virtual

PrecheckResult

Precheck(string out message)

string

FinalCode(EffectRequest request)

Converts an CrowdControl.Common.EffectRequest to a string representation.

void

ProcessRequest(IEffectPackProcessable request)

void

ProcessRequest(IEffectPackProcessable request, SITimeSpan delay)

Task

StopEffect(Guid requestID)

Stops the effect associated with the given request.

bool

CancelOngoingEffect(Guid requestID)

Cancels a currently-running effect associated with the given request.

bool

CancelOngoingEffects(string effectID)

Cancels a currently-running effect associated with the given request.

bool

StopAllEffects(bool cancelOngoing)

virtual

bool

StopAllEffects()

void

ReportCapabilities()

Stream

GetResource(string name)

Gets the resource stream for the specified resource name.

byte[]

GetResourceBytes(string name)

Gets the resource bytes for the specified resource name.

virtual

string

StartMessage(EffectRequest request, TextEncoding encoding = UTF8)

Displays the start message for the effect.

virtual

string

EndMessage(EffectRequest request, TextEncoding encoding = UTF8)

Displays the start message for the effect.

void

Dispose()

Disposes of the effect pack and releases any resources it holds.

void

ReportStatus(Effect effect, EffectStatus status, string message = null)

Report the status of an of effect type to the server.

void

ReportStatus(string effectID, EffectStatus status, string message = null)

Report the status of an of effect type to the server.

void

ReportStatus(IEnumerable effectIDs, EffectStatus status, string message = null)

Report the status of an of effect type to the server.

void

ReportStatus(string id, ReportIdentifierType idType, EffectStatus status, string message = null)

Report the status of an of effect type to the server.

void

ReportStatus(IEnumerable ids, ReportIdentifierType idType, EffectStatus status, string message = null)

Report the status of an of effect type to the server.

Public Static Functions

bool

CheckRange(long testValue, byte out newValue, byte min, byte max, bool repair)

bool

CheckRange(long testValue, sbyte out newValue, sbyte min, sbyte max, bool repair)

bool

CheckRange(long testValue, ushort out newValue, ushort min, ushort max, bool repair)

bool

CheckRange(long testValue, short out newValue, short min, short max, bool repair)

bool

CheckRange(long testValue, int out newValue, int min, int max, bool repair)

bool

CheckRange(long testValue, uint out newValue, uint min, uint max, bool repair)

bool

CheckRange(long testValue, ulong out newValue, ulong min, ulong max, bool repair)

bool

CheckRange(ulong testValue, ulong out newValue, ulong min, ulong max, bool repair)

bool

CheckRange(long testValue, long out newValue, long min, long max, bool repair)

bool

CheckRange(float testValue, float out newValue, float min, float max, bool repair)

bool

CheckRange(double testValue, double out newValue, double min, double max, bool repair)

Public Attributes

EffectScheduler

EffectScheduler

The queue of effects to be processed.

ConcurrentQueue

ResponseQueue

The queue of responses to be sent back to the Crowd Control service.

Properties

SITimeSpan

RetryMaxTime

[get, set]

The maximum amount of time to retry a failed effect attempt.

SITimeSpan

RetryMaxTimeAggressive

[get, set]

The maximum amount of time to retry a failed effect attempt (aggressive).

uint

RetryMaxAttempts

[get, set]

The maximum number of attempts to retry a failed effect.

uint

RetryMaxAttemptsAggressive

[get, set]

The maximum number of attempts to retry a failed effect (aggressive).

NonNumericRange

RetryInterval

[get, set]

The minimum and maximum intervals to wait between retries of a failed effect.

NonNumericRange

RetryIntervalAggressive

[get, set]

The minimum and maximum intervals to wait between retries of a failed effect (aggressive).

IEffectCallbacks

Callbacks

[get, set]

IGUIProvider

GUIProvider

[get, set]

An optional GUI provider for the effect pack dialogs.

Game

Game

[get, ]

IGameConnector

GameConnector

[get, set]

TextEncoding

TextEncoding

[get, ]

The encoding to be used for text in this effect pack.

string

TestEffectID

[get, ]

The ID of the effect to be used for testing purposes.

SessionID

SessionID

[get, set]

PackStorage

Storage

[get, ]

The persistent storage for the effect pack.

IReadOnlyDictionary

MetadataDefaults

[get, ]

The default/fallback values for game metadata.

List>

MenuActions

[get, ]

UISettings

UISettings

[get, ]

SITimeSpan

GlobalMinimumDelay

[get, set]

ConcurrentDictionary

MetadataLastValue

[get, ]

The last known values of the game metadata.

IDictionary

MetadataAutoPoll

[get, ]

The polling intervals for the game metadata.

List

MetadataCommon

[get, ]

The list of included metadata entries that are common to all effects.

List

MetadataTimed

[get, ]

The list of included metadata entries that are common to all timed effects.

List

MetadataInstant

[get, ]

The list of included metadata entries that are common to all instant (non-timed) effects.

EffectList

ConnectorEffects

[get, ]

List

ConnectorEffectHandlers

[get, ]

The list of connector effect handlers.

EffectList

Effects

[get, ]

IEnumerable

SupportedEffects

[get, ]

IEnumerable

UnsupportedEffects

[get, ]

PackStatus

PackStatus

[get, ]

GameState

GameState

[get, ]

Events

Action<IEnumerable<KeyValuePair<string, object>>>

MetadataChanged

Action

Disposed

Action<string, Dictionary<string, object>, bool>

EventReceived

Handles a generic event.

EventHandler<PackStatus>

PackStateChanged

EventHandler<GameState>

GameStateChanged