tiger-cleanup #1

Merged
tiger merged 97 commits from tiger-cleanup into development 2026-01-15 14:54:23 +00:00
5 changed files with 29 additions and 8 deletions
Showing only changes of commit 80d29e9819 - Show all commits

View File

@ -11,6 +11,9 @@ enum {
DONE DONE
} }
@export var current_scene_id : Scenes.id = Scenes.id.NONE
var _input_locked: bool = true var _input_locked: bool = true
var selection_state := INI: var selection_state := INI:
@ -47,7 +50,9 @@ signal cards_picked(cardnames: Array[String])
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready() -> void: func _ready() -> void:
reset() if current_scene_id != Scenes.id.NONE:
pick_cards(current_scene_id, false)
func reset(): func reset():
card_anim_skipped = false card_anim_skipped = false
@ -230,8 +235,7 @@ func handle_mouse_button(button_event: InputEventMouseButton, new_selection: Nod
pick(options.find(new_selection)) pick(options.find(new_selection))
var current_scene_id func pick_cards(id: Scenes.id, repeat: bool):
func pick_cards(id: int, repeat: bool):
current_scene_id = id current_scene_id = id
print_debug("Reached actor %s in sequence %s. Is%s repeating." % [name, Scenes.id.keys()[id], " not" if repeat else ""]) print_debug("Reached actor %s in sequence %s. Is%s repeating." % [name, Scenes.id.keys()[id], " not" if repeat else ""])
if not repeat: if not repeat:

View File

@ -91,7 +91,7 @@ anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
mouse_filter = 1 mouse_filter = 2
script = ExtResource("1_rqkns") script = ExtResource("1_rqkns")
youth_room_path = "uid://b3b0gyvklqn50" youth_room_path = "uid://b3b0gyvklqn50"
transition_room_path = "uid://fgp3s28h7msy" transition_room_path = "uid://fgp3s28h7msy"

View File

@ -13,6 +13,7 @@ var is_playing: bool:
get: return current_sequence != -1 get: return current_sequence != -1
enum id { enum id {
NONE = -1,
YOUTH_DRAVEN, YOUTH_DRAVEN,
YOUTH_CHILDHOOD, YOUTH_CHILDHOOD,
YOUTH_VOICE_TRAINING, YOUTH_VOICE_TRAINING,

View File

@ -0,0 +1,15 @@
[gd_scene load_steps=2 format=3 uid="uid://muv3hojyeqel"]
[ext_resource type="PackedScene" uid="uid://brk4hjdf2x81a" path="res://logic-scenes/card_picker/card_picker.tscn" id="1_ko41i"]
[node name="PickerTests" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="picker" parent="." instance=ExtResource("1_ko41i")]
layout_mode = 1
current_scene_id = 0

View File

@ -13,7 +13,7 @@ signal success
func execute() -> void: func execute() -> void:
print_debug("main_menu.gd: execute()") print_debug("main_menu.gd: execute()")
modulate.a = 0 modulate.a = 0.0
assert(is_node_ready(), "MainMenu node not ready yet! (???)") assert(is_node_ready(), "MainMenu node not ready yet! (???)")
if State.save_game == null or State.save_game.current_room == 0: if State.save_game == null or State.save_game.current_room == 0:
@ -50,19 +50,17 @@ func _new_game() -> void:
func _start_game() -> void: func _start_game() -> void:
print_debug("main_menu.gd: _start_game()") print_debug("main_menu.gd: _start_game()")
_deactivate()
success.emit() success.emit()
await Main.start_game(State.save_game) await Main.start_game(State.save_game)
func _load_save_game() -> void: func _load_save_game() -> void:
print_debug("main_menu.gd: _load_save_game()") print_debug("main_menu.gd: _load_save_game()")
var save: SaveGame = await save_game_list.pick_save_slot() var save: SaveGame = await save_game_list.pick_save_slot()
if (save != null): if (save != null):
State.save_game = save State.save_game = save
_start_game()
_deactivate() _deactivate()
_start_game()
else: else:
_activate() _activate()
@ -82,6 +80,7 @@ func _activate() -> void:
else: else:
new_game_button.grab_focus() new_game_button.grab_focus()
visible = true
func _deactivate() -> void: func _deactivate() -> void:
for child: Control in $PanelContainer.get_children(): for child: Control in $PanelContainer.get_children():
@ -91,6 +90,7 @@ func _deactivate() -> void:
func _appear() -> void: func _appear() -> void:
modulate.a = 0 modulate.a = 0
visible = true
show() show()
var tween := create_tween() var tween := create_tween()
tween.tween_property(self, "modulate:a", 1.0, 0.5) tween.tween_property(self, "modulate:a", 1.0, 0.5)
@ -101,3 +101,4 @@ func _vanish() -> void:
tween.tween_property(self, "modulate:a", 0.0, 0.5) tween.tween_property(self, "modulate:a", 0.0, 0.5)
await tween.finished await tween.finished
hide() hide()
visible = false