Refactor save/load functionality; improve error messages and add save data timer

This commit is contained in:
Kirill
2026-07-10 20:36:44 +03:00
parent 45cfc8c8ee
commit 5820bbc7b2
5 changed files with 83 additions and 33 deletions
+4 -10
View File
@@ -45,14 +45,6 @@
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ifjjt"]
[sub_resource type="GDScript" id="GDScript_behgl"]
script/source = "extends Node
func print_smth(smth: String):
pass
print(smth)
"
[node name="World" type="Node2D" unique_id=1392592456]
[node name="Background" type="Node2D" parent="." unique_id=1988758765]
@@ -880,8 +872,9 @@ layout_mode = 2
wait_time = 0.2
autostart = true
[node name="CommandProcessor" type="Node" parent="." unique_id=2069361293]
script = SubResource("GDScript_behgl")
[node name="SaveData" type="Timer" parent="Stage" unique_id=1208861837]
wait_time = 5.0
autostart = true
[connection signal="timeout" from="Background/Timer" to="Background" method="randomize_parallax"]
[connection signal="pressed" from="Stage/StageRows/TopMenu/BurgerButton" to="Stage" method="_on_topmenu_button_pressed" binds= ["Burger"]]
@@ -897,3 +890,4 @@ script = SubResource("GDScript_behgl")
[connection signal="pressed" from="Stage/StageRows/PageScroller/HBoxContainer/LifePage/LifeHeader/AggressionIndicator" to="Stage" method="_on_indicator_pressed" binds= ["Aggression", 4]]
[connection signal="pressed" from="Stage/StageRows/PageScroller/HBoxContainer/LifePage/LifeHeader/TrendIndicator" to="Stage" method="_on_indicator_pressed" binds= ["Trends", 4]]
[connection signal="timeout" from="Stage/ItemAmountUpdate" to="Stage" method="set_owniverse_item_value"]
[connection signal="timeout" from="Stage/SaveData" to="Stage" method="_on_save_data"]