From ea4bf5efdbcabcc59f81ef6a269021ee04d068af Mon Sep 17 00:00:00 2001 From: Spencer Killen Date: Sun, 27 Sep 2026 15:19:40 -0600 Subject: [PATCH] . --- economy.gd | 2 ++ project.godot | 2 +- start_screen.gd | 10 ++++++++ start_screen.gd.uid | 1 + start_screen.tscn | 59 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 start_screen.gd create mode 100644 start_screen.gd.uid create mode 100644 start_screen.tscn diff --git a/economy.gd b/economy.gd index 43b8fde..1f23f68 100644 --- a/economy.gd +++ b/economy.gd @@ -66,6 +66,7 @@ func produce(production: Production): sync_currency.call_deferred() var c := get_currency(production.currency) c.amount += production.amount + c.amount = clamp(c.amount, 0, 9999) func update_currencies(): productions_update.emit.call_deferred(currencies) @@ -116,6 +117,7 @@ func get_all_inanimate_currencies() -> Array: func _ready() -> void: %SimulateTickTimer.start() update_currencies() + log.emit.call_deferred("Welcome to your kingdom!") func _on_timer_timeout() -> void: if get_tree().current_scene.scene_file_path != "res://game.tscn": diff --git a/project.godot b/project.godot index 5f1bee2..26f7ef1 100644 --- a/project.godot +++ b/project.godot @@ -10,7 +10,7 @@ config_version=5 [application] -run/main_scene="uid://dkui3dlb4vu1c" +run/main_scene="uid://d1hx10534r452" config/features=PackedStringArray("4.7") [autoload] diff --git a/start_screen.gd b/start_screen.gd new file mode 100644 index 0000000..e33ded2 --- /dev/null +++ b/start_screen.gd @@ -0,0 +1,10 @@ +extends Control + +func _on_button_pressed() -> void: + Dialogic.start(preload("res://test/timeline.dtl")) + await Dialogic.timeline_ended + get_tree().change_scene_to_file("res://game.tscn") + + +func _on_button_2_pressed() -> void: + get_tree().change_scene_to_file("res://game.tscn") diff --git a/start_screen.gd.uid b/start_screen.gd.uid new file mode 100644 index 0000000..62251cc --- /dev/null +++ b/start_screen.gd.uid @@ -0,0 +1 @@ +uid://qt8u20vettgk diff --git a/start_screen.tscn b/start_screen.tscn new file mode 100644 index 0000000..7128959 --- /dev/null +++ b/start_screen.tscn @@ -0,0 +1,59 @@ +[gd_scene format=3 uid="uid://d1hx10534r452"] + +[ext_resource type="Script" uid="uid://qt8u20vettgk" path="res://start_screen.gd" id="1_ncxyx"] + +[node name="StartScreen" type="Control" unique_id=637740603] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_ncxyx") + +[node name="ColorRect" type="ColorRect" parent="." unique_id=490588497] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0, 0, 0, 1) + +[node name="HBoxContainer" type="HBoxContainer" parent="." unique_id=384868949] +layout_mode = 1 +anchors_preset = 7 +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +offset_left = -54.0 +offset_top = -71.0 +offset_right = 54.0 +offset_bottom = -31.0 +grow_horizontal = 2 +grow_vertical = 0 + +[node name="Button" type="Button" parent="HBoxContainer" unique_id=1726767847] +layout_mode = 2 +text = "Play Game" + +[node name="Button2" type="Button" parent="HBoxContainer" unique_id=783169397] +layout_mode = 2 +text = "Skip Intro" + +[node name="Label" type="Label" parent="." unique_id=380038515] +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -481.0 +offset_top = 77.0 +offset_right = 482.0 +offset_bottom = 169.0 +grow_horizontal = 2 +theme_override_font_sizes/font_size = 72 +text = "For King and Currency" + +[connection signal="pressed" from="HBoxContainer/Button" to="." method="_on_button_pressed"] +[connection signal="pressed" from="HBoxContainer/Button2" to="." method="_on_button_2_pressed"]