From eb5c3590ab546097d1f787d88c9dc805e637168c Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 2 May 2024 05:00:02 +0200 Subject: [PATCH] Tweaks and audios --- media/screenshot-1-1280x720.png | 3 +++ media/screenshot-1-1280x720.png.import | 34 ++++++++++++++++++++++++++ project.godot | 22 ++++++++++++++--- scenes/game/music.gd | 11 +++++++++ scenes/menu/main_menu.tscn | 6 ----- 5 files changed, 67 insertions(+), 9 deletions(-) create mode 100644 media/screenshot-1-1280x720.png create mode 100644 media/screenshot-1-1280x720.png.import diff --git a/media/screenshot-1-1280x720.png b/media/screenshot-1-1280x720.png new file mode 100644 index 0000000..d0cb42a --- /dev/null +++ b/media/screenshot-1-1280x720.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9775b369dacbc5187b88d42580a8ad3cbc4a8c5662263f32a72ba7ada39c15c +size 24818 diff --git a/media/screenshot-1-1280x720.png.import b/media/screenshot-1-1280x720.png.import new file mode 100644 index 0000000..8aa470f --- /dev/null +++ b/media/screenshot-1-1280x720.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://boas3kes3ye7h" +path="res://.godot/imported/screenshot-1-1280x720.png-f2822c78940e54166f44415290ff6bf1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://media/screenshot-1-1280x720.png" +dest_files=["res://.godot/imported/screenshot-1-1280x720.png-f2822c78940e54166f44415290ff6bf1.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project.godot b/project.godot index 62407a0..c803989 100644 --- a/project.godot +++ b/project.godot @@ -11,15 +11,18 @@ config_version=5 [application] config/name="Hella Farm" +config/version="1.0.0" run/main_scene="res://main.tscn" config/features=PackedStringArray("4.2", "GL Compatibility") -config/icon="res://icon.svg" +boot_splash/bg_color=Color(0, 0, 0, 1) +boot_splash/image="res://media/screenshot-1-1280x720.png" +boot_splash/use_filter=false +config/icon="res://entities/sheep_left.png" [display] window/size/viewport_width=1280 window/size/viewport_height=720 -window/size/initial_position_type=3 window/size/resizable=false [editor] @@ -35,16 +38,29 @@ import/blender/enabled=false main_menu={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194317,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194305,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) ] } postprocessing_toggle={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194311,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":70,"physical_keycode":0,"key_label":0,"unicode":102,"echo":false,"script":null) ] } cheat_gold={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":92,"physical_keycode":0,"key_label":0,"unicode":92,"echo":false,"script":null) +"events": [] +} +music_toggle={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194312,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":77,"physical_keycode":0,"key_label":0,"unicode":109,"echo":false,"script":null) +] +} +sound_toggle={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194312,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":78,"physical_keycode":0,"key_label":0,"unicode":110,"echo":false,"script":null) ] } diff --git a/scenes/game/music.gd b/scenes/game/music.gd index 315cd4e..0f0155f 100644 --- a/scenes/game/music.gd +++ b/scenes/game/music.gd @@ -24,3 +24,14 @@ func enable_layer_2(): func enable_layer_3(): layer_3.volume_db = 0 + + +func _process(_delta: float) -> void: + if Input.is_action_just_pressed("music_toggle"): + var bus = AudioServer.get_bus_index(&"Music") + var status = AudioServer.is_bus_mute(bus) + AudioServer.set_bus_mute(bus, !status) + if Input.is_action_just_pressed("sound_toggle"): + var bus = AudioServer.get_bus_index(&"Sounds") + var status = AudioServer.is_bus_mute(bus) + AudioServer.set_bus_mute(bus, !status) diff --git a/scenes/menu/main_menu.tscn b/scenes/menu/main_menu.tscn index ec533b6..839b3ce 100644 --- a/scenes/menu/main_menu.tscn +++ b/scenes/menu/main_menu.tscn @@ -91,10 +91,4 @@ custom_minimum_size = Vector2(200, 0) layout_mode = 2 text = "Play" -[node name="Options" type="Button" parent="Panel/Layout/Buttons/Layout"] -custom_minimum_size = Vector2(200, 0) -layout_mode = 2 -text = "Options" - [connection signal="pressed" from="Panel/Layout/Buttons/Layout/Play" to="." method="_on_play_pressed"] -[connection signal="pressed" from="Panel/Layout/Buttons/Layout/Options" to="." method="_on_options_pressed"]