Table of Contents

Interface IAbility

Namespace
TrinketTinker.Effects.Abilities
Assembly
TrinketTinker.dll
public interface IAbility

Properties

Data

The data associated with this ability

AbilityData Data { get; }

Property Value

AbilityData

ProcSyncIndex

The resolved ProcSyncIndex for Sync, only set to >0 if the ability is enabled

int ProcSyncIndex { get; }

Property Value

int

Valid

Mark the new ability as valid, if this is false after constructor, the ability is discarded

bool Valid { get; }

Property Value

bool

Methods

Activate(Farmer)

Activate the ability by registering events.

bool Activate(Farmer farmer)

Parameters

farmer Farmer

Returns

bool

Deactivate(Farmer)

Deactivate the ability by unregistering events.

bool Deactivate(Farmer farmer)

Parameters

farmer Farmer

Returns

bool

InteractProc(object?, ProcEventArgs)

Manually proc this ability for Interact which has special handling and does not use events.

bool InteractProc(object? sender, ProcEventArgs proc)

Parameters

sender object
proc ProcEventArgs

Returns

bool

Update(Farmer, GameTime, GameLocation)

Perform update every tick.

void Update(Farmer farmer, GameTime time, GameLocation location)

Parameters

farmer Farmer
time GameTime
location GameLocation

Events

EventAbilityProc

Proc event for use with sync procs

event EventHandler<ProcEventArgs>? EventAbilityProc

Event Type

EventHandler<ProcEventArgs>