diff --git a/.gitignore b/.gitignore index 0af181c..2f0a81b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ # Godot 4+ specific ignores .godot/ /android/ +/Releases/ diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..bc8d8bd --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,49 @@ +[runnable_presets] + +Linux="Linux" + +[preset.0] + +name="Linux" +platform="Linux" +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="Releases/PrintingSim-v0.1" +patches=PackedStringArray() +patch_delta_encoding=false +patch_delta_compression_level_zstd=19 +patch_delta_min_reduction=0.1 +patch_delta_include_filters="*" +patch_delta_exclude_filters="" +encryption_include_filters="" +encryption_exclude_filters="" +seed=0 +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_wrapper=1 +binary_format/embed_pck=true +texture_format/s3tc_bptc=true +texture_format/etc2_astc=false +shader_baker/enabled=false +binary_format/architecture="x86_64" +ssh_remote_deploy/enabled=false +ssh_remote_deploy/host="user@host_ip" +ssh_remote_deploy/port="22" +ssh_remote_deploy/extra_args_ssh="" +ssh_remote_deploy/extra_args_scp="" +ssh_remote_deploy/run_script="#!/usr/bin/env bash +export DISPLAY=:0 +unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" +\"{temp_dir}/{exe_name}\" {cmd_args}" +ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash +pkill -x -f \"{temp_dir}/{exe_name} {cmd_args}\" +rm -rf \"{temp_dir}\"" diff --git a/ui.gd b/ui.gd index 858296c..bb01fd1 100644 --- a/ui.gd +++ b/ui.gd @@ -7,6 +7,7 @@ var jobs_tab_button: Button @onready var debug_xp: Button = $VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugXP @onready var debug_money: Button = $VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugMoney +@onready var debug_button: Button = $VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugButton const JOB_SCENE = preload("uid://dvfcie8hqcb0") const PRINTER = preload("uid://33ctlyrpibs3") @@ -75,3 +76,13 @@ func _on_debug_money_pressed() -> void: func _on_debug_xp_pressed() -> void: var xp = randf() * 100 PlayerData.give_experience.emit(xp) + +func _on_debug_button_pressed() -> void: + toggle_debug() + +func toggle_debug() -> void: + if debug == true: + debug = false + else: + debug = true + check_debug() diff --git a/ui.tscn b/ui.tscn index 16b1b43..52a4a5e 100644 --- a/ui.tscn +++ b/ui.tscn @@ -92,6 +92,10 @@ size_flags_horizontal = 3 text = "Level: 1" horizontal_alignment = 2 +[node name="DebugButton" type="Button" parent="VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer" unique_id=255003152] +layout_mode = 2 +text = "Debug" + [node name="Experience" type="ProgressBar" parent="VBoxContainer/TopBar/VBoxContainer" unique_id=38033766] unique_name_in_owner = true custom_minimum_size = Vector2(0, 5) @@ -215,6 +219,7 @@ autostart = true [connection signal="pressed" from="VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugMoney" to="." method="_on_debug_money_pressed"] [connection signal="pressed" from="VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugXP" to="." method="_on_debug_xp_pressed"] +[connection signal="pressed" from="VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugButton" to="." method="_on_debug_button_pressed"] [connection signal="pressed" from="VBoxContainer/MainArea/RightColumn/TabSwitcher/TabButtons/JobsTabButton" to="VBoxContainer/MainArea/RightColumn/TabSwitcher" method="_on_jobs_tab_button_pressed"] [connection signal="pressed" from="VBoxContainer/MainArea/RightColumn/TabSwitcher/TabButtons/ShopTabButton" to="VBoxContainer/MainArea/RightColumn/TabSwitcher" method="_on_shop_tab_button_pressed"] [connection signal="pressed" from="VBoxContainer/MainArea/RightColumn/TabSwitcher/TabButtons/MenuTabButton" to="VBoxContainer/MainArea/RightColumn/TabSwitcher" method="_on_menu_tab_button_pressed"]