Interface IQuestAction
Interface to a quest action.
Namespace: DaggerfallWorkshop.Game.Questing
Assembly: Assembly-CSharp.dll
Syntax
public interface IQuestAction
Properties
| Improve this Doc View SourceDebugSource
Gets or sets source code for debugger.
Declaration
string DebugSource { get; set; }
Property Value
Type | Description |
---|---|
String |
IsAlwaysOnTriggerCondition
Returns true if this trigger is always on and should be checked each tick.
Declaration
bool IsAlwaysOnTriggerCondition { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsComplete
Returns true if action called SetComplete().
Declaration
bool IsComplete { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsTriggerCondition
Returns true if this action considers itself a trigger condition.
- Trigger will be checked even on inactive tasks
- When trigger evaluates true the task will become active
Declaration
bool IsTriggerCondition { get; }
Property Value
Type | Description |
---|---|
Boolean |
Pattern
The Regex.Match string pattern expected from source input. Must be provided by action implementor.
Declaration
string Pattern { get; }
Property Value
Type | Description |
---|---|
String |
Methods
| Improve this Doc View SourceCheckTrigger(Task)
Check trigger condition status. Allows task to become active when condition returns true.
Declaration
bool CheckTrigger(Task caller)
Parameters
Type | Name | Description |
---|---|---|
Task | caller |
Returns
Type | Description |
---|---|
Boolean |
CreateNew(String, Quest)
Factory new instance of this action from source line. Overrides should always call base to set debug source line.
Declaration
IQuestAction CreateNew(string source, Quest parentQuest)
Parameters
Type | Name | Description |
---|---|---|
String | source | |
Quest | parentQuest |
Returns
Type | Description |
---|---|
IQuestAction |
Dispose()
Called to dispose action when quest ends.
Declaration
void Dispose()
GetSaveData()
Get action state data to serialize.
Declaration
object GetSaveData()
Returns
Type | Description |
---|---|
Object |
InitialiseOnSet()
Called by parent task any time it is set/rearmed. This enables the action to reset state if needed.
Declaration
void InitialiseOnSet()
RearmAction()
Clears action complete flag. Implementor should override this is if special handling needed on rearm.
Declaration
void RearmAction()
RestoreSaveData(Object)
Restore action state from serialized data.
Declaration
void RestoreSaveData(object dataIn)
Parameters
Type | Name | Description |
---|---|---|
Object | dataIn |
SetComplete()
Sets action as complete so as not to be called again by task. Used for one-and-done actions.
Declaration
void SetComplete()
Test(String)
Helper to test if source is a match for Pattern.
Declaration
Match Test(string source)
Parameters
Type | Name | Description |
---|---|---|
String | source |
Returns
Type | Description |
---|---|
Match |
Update(Task)
Update action activity. Called once per frame by owning task.
Declaration
void Update(Task caller)
Parameters
Type | Name | Description |
---|---|---|
Task | caller |