fix: untyped variables removed, fixed issue with unknown fields
This commit is contained in:
parent
98c15559b7
commit
8c3b0e03a3
|
|
@ -11,7 +11,7 @@ enum {
|
|||
DONE
|
||||
}
|
||||
|
||||
var has_stage = false:
|
||||
var has_stage: bool = false:
|
||||
set(focus):
|
||||
if not focus == has_stage:
|
||||
if focus:
|
||||
|
|
@ -24,15 +24,15 @@ var has_stage = false:
|
|||
process_mode = Node.PROCESS_MODE_DISABLED
|
||||
has_stage = focus
|
||||
|
||||
var _input_locked = true
|
||||
var selection_state = INI:
|
||||
var _input_locked: bool = true
|
||||
var selection_state := INI:
|
||||
set(state):
|
||||
print_debug("Setting picker state to %s" % ["INI","CARDS","CARDS_SELECTED","TRANSITION","POSTS","POSTS_SELECTED","DONE"][state])
|
||||
selection_state = state
|
||||
_input_locked = !(state == CARDS or state == POSTS)
|
||||
|
||||
if state == CARDS_SELECTED:
|
||||
var tween = get_tree().create_tween()
|
||||
var tween: Tween = get_tree().create_tween()
|
||||
tween.tween_property($thought_prompt, "modulate", Color(1, 1, 1, 0), 0.5)
|
||||
elif state == DONE:
|
||||
reset()
|
||||
|
|
@ -57,7 +57,7 @@ var options:Array = []
|
|||
signal cards_picked(cardnames: Array[String])
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
func _ready() -> void:
|
||||
reset()
|
||||
return
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ func reset():
|
|||
output = []
|
||||
options = []
|
||||
anim_players = []
|
||||
var card_controls = $cards.get_children()
|
||||
var card_controls: Array[Node] = $cards.get_children()
|
||||
for control in card_controls:
|
||||
options.append(control.get_child(1))
|
||||
anim_players.append(control.get_child(0))
|
||||
|
|
@ -97,7 +97,7 @@ func reset():
|
|||
for player in anim_players: player.play("reveal")
|
||||
|
||||
func fill_card_slots(id: int):
|
||||
var new_cards = HardCards.get_cards_by_scene_id(id)
|
||||
var new_cards := HardCards.get_cards_by_scene_id(id)
|
||||
|
||||
for i in range(new_cards.size()):
|
||||
$cards.get_child(i).remove_child($cards.get_child(i).get_child(1))
|
||||
|
|
@ -138,6 +138,9 @@ func _input(event):
|
|||
#if event.is_action_pressed("ui_end"):
|
||||
# fill_card_slots(3)
|
||||
# selection_state = CARDS
|
||||
|
||||
if event is not InputEventAction:
|
||||
return
|
||||
|
||||
if has_stage:
|
||||
if not _input_locked:
|
||||
|
|
|
|||
Loading…
Reference in New Issue