Refactor code structure for improved readability and maintainability

This commit is contained in:
Kirill
2026-09-22 23:47:59 +03:00
parent 5a18b41528
commit e87d4083e9
21 changed files with 509 additions and 9 deletions
+48 -9
View File
@@ -60,6 +60,11 @@
[ext_resource type="Texture2D" uid="uid://so06vth6le3b" path="res://ui/main_menu/ru/russian_active.png" id="51_uvuuk"]
[ext_resource type="Texture2D" uid="uid://dwqpcm1pryw44" path="res://ui/main_menu/en/leave_reality.png" id="52_uvuuk"]
[ext_resource type="Texture2D" uid="uid://btghvfdh3guo5" path="res://ui/report/en/report.png" id="60_an6vj"]
[ext_resource type="Texture2D" uid="uid://bce2bpw5642er" path="res://ui/achievements/achievements.en.png" id="61_d36xh"]
[ext_resource type="Script" uid="uid://vy0dj2cqfmk0" path="res://ui/credits/credits.gd" id="62_o2i0n"]
[ext_resource type="Texture2D" uid="uid://c46h78ewwlafk" path="res://ui/credits/credits.en.png" id="62_vu83j"]
[ext_resource type="Texture2D" uid="uid://drvvkd724g8hy" path="res://ui/credits/kid_gp_light.png" id="64_rur7c"]
[ext_resource type="Texture2D" uid="uid://b33ji4mpyw4ks" path="res://ui/credits/kid_gp.png" id="65_y1rwn"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ifjjt"]
@@ -85,7 +90,6 @@ size_flags_vertical = 3
script = ExtResource("3_k83x5")
[node name="World" type="VBoxContainer" parent="Stage" unique_id=1878643860]
visible = false
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
@@ -990,6 +994,7 @@ layout_mode = 2
texture_normal = ExtResource("52_uvuuk")
[node name="Report" type="VBoxContainer" parent="Stage" unique_id=1422399839]
visible = false
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
@@ -1005,8 +1010,12 @@ size_flags_vertical = 4
texture_normal = ExtResource("44_uvuuk")
texture_pressed = ExtResource("45_an6vj")
[node name="Header" type="TextureRect" parent="Stage/Report" unique_id=1321780840]
custom_minimum_size = Vector2(1080, 256)
[node name="Header" type="CenterContainer" parent="Stage/Report" unique_id=590481160]
custom_minimum_size = Vector2(1080, 0)
layout_mode = 2
[node name="Header" type="TextureRect" parent="Stage/Report/Header" unique_id=1321780840]
custom_minimum_size = Vector2(824, 256)
layout_mode = 2
texture = ExtResource("60_an6vj")
@@ -1027,16 +1036,24 @@ size_flags_vertical = 4
texture_normal = ExtResource("44_uvuuk")
texture_pressed = ExtResource("45_an6vj")
[node name="Header" type="TextureRect" parent="Stage/Achievements" unique_id=1195638572]
custom_minimum_size = Vector2(1080, 256)
[node name="Header" type="CenterContainer" parent="Stage/Achievements" unique_id=51521239]
custom_minimum_size = Vector2(1080, 0)
layout_mode = 2
texture = ExtResource("44_mip0j")
[node name="Title" type="TextureRect" parent="Stage/Achievements/Header" unique_id=1195638572]
custom_minimum_size = Vector2(824, 256)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("61_d36xh")
stretch_mode = 3
[node name="Credits" type="VBoxContainer" parent="Stage" unique_id=785042592]
visible = false
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("62_o2i0n")
[node name="TopMenu" type="HBoxContainer" parent="Stage/Credits" unique_id=1983527467]
layout_mode = 2
@@ -1049,10 +1066,27 @@ size_flags_vertical = 4
texture_normal = ExtResource("44_uvuuk")
texture_pressed = ExtResource("45_an6vj")
[node name="Header" type="TextureRect" parent="Stage/Credits" unique_id=218839205]
custom_minimum_size = Vector2(1080, 256)
[node name="Header" type="CenterContainer" parent="Stage/Credits" unique_id=1143557902]
custom_minimum_size = Vector2(1080, 0)
layout_mode = 2
texture = ExtResource("44_mip0j")
[node name="Title" type="TextureRect" parent="Stage/Credits/Header" unique_id=218839205]
custom_minimum_size = Vector2(824, 256)
layout_mode = 2
texture = ExtResource("62_vu83j")
[node name="Logo" type="CenterContainer" parent="Stage/Credits" unique_id=1372105076]
custom_minimum_size = Vector2(1080, 0)
layout_mode = 2
[node name="Highlight" type="TextureRect" parent="Stage/Credits/Logo" unique_id=1035898922]
visible = false
layout_mode = 2
texture = ExtResource("64_rur7c")
[node name="Lamp" type="TextureButton" parent="Stage/Credits/Logo" unique_id=1059180893]
layout_mode = 2
texture_normal = ExtResource("65_y1rwn")
[node name="ItemAmountUpdate" type="Timer" parent="Stage" unique_id=1953928024]
wait_time = 0.2
@@ -1076,6 +1110,11 @@ autostart = true
[connection signal="pressed" from="Stage/World/PageScroller/HBoxContainer/LifePage/LifeHeader/AggressionIndicator" to="Stage" method="_on_indicator_pressed" binds= ["Aggression", 4]]
[connection signal="pressed" from="Stage/World/PageScroller/HBoxContainer/LifePage/LifeHeader/TrendIndicator" to="Stage" method="_on_indicator_pressed" binds= ["Trends", 4]]
[connection signal="pressed" from="Stage/MainMenu/TopMenu/BackButton" to="Stage" method="_on_topmenu_button_pressed" binds= ["World"]]
[connection signal="pressed" from="Stage/MainMenu/Achievements" to="Stage" method="_on_topmenu_button_pressed" binds= ["Achievements"]]
[connection signal="pressed" from="Stage/MainMenu/Credits" to="Stage" method="_on_topmenu_button_pressed" binds= ["Credits"]]
[connection signal="pressed" from="Stage/Report/TopMenu/BackButton" to="Stage" method="_on_topmenu_button_pressed" binds= ["World"]]
[connection signal="pressed" from="Stage/Achievements/TopMenu/BackButton" to="Stage" method="_on_topmenu_button_pressed" binds= ["World"]]
[connection signal="pressed" from="Stage/Credits/TopMenu/BackButton" to="Stage" method="_on_topmenu_button_pressed" binds= ["World"]]
[connection signal="pressed" from="Stage/Credits/Logo/Lamp" to="Stage/Credits" method="_on_lamp_pressed"]
[connection signal="timeout" from="Stage/ItemAmountUpdate" to="Stage" method="set_owniverse_item_value"]
[connection signal="timeout" from="Stage/Unlock&Save" to="Stage" method="_on_unlock_and_save_timeout"]