-
-
Notifications
You must be signed in to change notification settings - Fork 127
ScriptObject
Extends: Reference
This is a parent class containing the methods for lookup of subjects and script properties.
It is typically never instanced directly.
var owner_card: Card
The card which owns this Task
var subjects: Array
The subjects is typically a Card
object
in the future might be other things
var script_name: String
The name of the method to call in the ScriptingEngine to implement this task
var script_definition: Dictionary
Storage for all details of the task definition
var is_primed: bool
Used by the ScriptingEngine to know if the task has finished processing targetting and optional confirmations
var is_valid: bool
If true if this task is valid to run. A task is invalid to run if some filter does not match.
var requested_subjects: int
The amount of subjects card the script requested to modify We use this to compare against costs during dry_runs
This is typically set during the _find_subjects() call
var trigger_card: Card
The card which triggered this script.
func _init(card: Card, script: Dictionary, _trigger_card = null) -> void
prepares the properties needed by the script to function.
func get_property(property: String, default = null)
Returns the specified property of the string. Also sets appropriate defaults when then property has not beend defined. A default value can also be passed directly, which is useful when ScriptingEngine has been extended by custom tasks.
func count_per(per_seek: String, script_owner: Card, per_definitions: Dictionary, _trigger_card = null) -> int
- signal primed(): Sent when the _init() method has completed warning-ignore:unused_signal