-
-
Notifications
You must be signed in to change notification settings - Fork 105
AlterantEngine
Extends: Reference
This class contains all the functionality required to modify a running task during runtime
The automation is based on ScriptAlter definitions.
This class is on request when one of a number of specific tasks which allow it, are going through all the cards, looking for valid Alterants definitions.
var all_alterations_completed: bool
This is checked by the yield in get_altered_value to know execution has completed.
var alteration: int
This is checked by the yield in get_altered_value to know execution has completed. The total amount of alterations that this card's script will perform.
func _init(trigger_object: Card, alterant_object, scripts_queue: Array, task_details: Dictionary) -> void
Sets the owner of this Scripting Engine
func calculate_next_alteration(trigger_object: Card, alterant_object, scripts_queue: Array, task_details: Dictionary) -> var
The main engine starts here. It receives array with all the possible alterations to execute, then turns each array element into a ScriptAlter object which check against the relevant filters and per_ requests.
func calculate_alteration(script: ScriptAlter) -> void
This is called if the alterants passes all validity checks it calculates how much to alter, based on the script definition.
- signal alterations_completed(): Emitted when all alterations have been run succesfully