-
-
Notifications
You must be signed in to change notification settings - Fork 106
Token
Divided by Zer0 edited this page Jul 11, 2021
·
9 revisions
Extends: HBoxContainer
The token class is controlling the creation of new tokens as well as the control of their counter
export var count: int = 0
-
Setter:
set_count
-
Getter:
get_count
var token_drawer
var count_label
func setup(token_name: String, _token_drawer = null) -> void
Initializes the token with the right texture and name based on the values in the configuration
func set_count(value: int = 1) -> void
Sets the token counter to the specified value
func get_count() -> int
Returns the amount of tokens of this type
func get_count_and_alterants() -> var
Discovers the modified value of this token from alterants
Returns a dictionary with the following keys:
- count: The final value of this token after all modifications
- alteration: The full dictionary returned by CFScriptUtils.get_altered_value()
func expand() -> void
Reveals the Name label.
Used when the token drawer is expanded
func retract() -> void
Hides the Name label.
Used when the token drawer is withdrawn
func get_token_name() -> String
Returns the lowercase name of the token