Compare commits

..

No commits in common. "6c216bb4b1987bc211762d4f363e658cbddb833c" and "72e64827e8b4dc6c7aa98baddfdf29e177e4751c" have entirely different histories.

7 changed files with 24 additions and 30 deletions

View File

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

View File

@ -1743,7 +1743,6 @@ grow_horizontal = 2
grow_vertical = 2
mouse_filter = 0
script = ExtResource("1_pjntm")
current_scene_id = 0
[node name="Control" type="Control" parent="."]
layout_mode = 2

View File

@ -1,4 +1,4 @@
extends Node
extends Control
var normal_boot : bool = false

View File

@ -83,8 +83,15 @@ fill = 1
fill_from = Vector2(0.538462, 0.491453)
fill_to = Vector2(1.3, -0.3)
[node name="main" type="Node"]
[node name="main" type="Control"]
process_mode = 3
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 1
script = ExtResource("1_rqkns")
youth_room_path = "uid://b3b0gyvklqn50"
transition_room_path = "uid://fgp3s28h7msy"
@ -92,29 +99,36 @@ adulthood_room_path = "uid://flisupth27th"
[node name="Curtain" parent="." instance=ExtResource("2_nbcxq")]
unique_name_in_owner = true
layout_mode = 1
[node name="Loading" parent="." instance=ExtResource("5_dxvjq")]
unique_name_in_owner = true
layout_mode = 1
offset_bottom = 0.0
[node name="MainMenu" parent="." instance=ExtResource("3_ik73t")]
unique_name_in_owner = true
visible = false
layout_mode = 1
[node name="FPSLabel" type="Label" parent="."]
visible = false
layout_mode = 0
offset_right = 40.0
offset_bottom = 35.0
script = SubResource("GDScript_8sq0u")
[node name="Startup Menu" parent="." instance=ExtResource("1_v5rpm")]
visible = false
layout_mode = 1
[node name="Disclaimer" parent="." instance=ExtResource("7_t45fc")]
visible = false
layout_mode = 1
[node name="PauseContainer" type="CenterContainer" parent="."]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
@ -191,6 +205,7 @@ text = "Skip this Story"
unique_name_in_owner = true
visible = false
modulate = Color(1, 1, 1, 0)
layout_mode = 1
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
bus = &"music"

View File

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

View File

@ -1,14 +0,0 @@
[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

View File

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