diff options
author | metamuffin <metamuffin@disroot.org> | 2024-06-26 15:43:57 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-26 15:43:57 +0200 |
commit | c4b0f8d698b574c711b1e205371adfd3e3339487 (patch) | |
tree | 78ccefcc40f02a2579ade4cb5968cd2c2661d7af | |
parent | fd2d5455339a61d8b38bcb47fa40e094ef61856c (diff) | |
parent | 1bc6e59a4dbef9d2770fc5264acd9fda2195872d (diff) | |
download | hurrycurry-c4b0f8d698b574c711b1e205371adfd3e3339487.tar hurrycurry-c4b0f8d698b574c711b1e205371adfd3e3339487.tar.bz2 hurrycurry-c4b0f8d698b574c711b1e205371adfd3e3339487.tar.zst |
Merge branch 'master' of https://codeberg.org/metamuffin/undercooked
-rw-r--r-- | client/global.gd | 32 | ||||
-rw-r--r-- | client/map/tiles/bark.tres | 1 | ||||
-rw-r--r-- | client/map/tiles/leaves.tres | 1 | ||||
-rw-r--r-- | client/project.godot | 8 |
4 files changed, 32 insertions, 10 deletions
diff --git a/client/global.gd b/client/global.gd index a09f8696..095deec8 100644 --- a/client/global.gd +++ b/client/global.gd @@ -1,3 +1,20 @@ +# Undercooked - a game about cooking +# Copyright 2024 metamuffin +# Copyright 2024 tpart +# Copyright 2024 nokoe +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, version 3 of the License only. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# extends Node const DEFAULT_SETTINGS := { @@ -17,7 +34,7 @@ func _ready(): func save_profile(): var f = FileAccess.open("user://profile", FileAccess.WRITE) f.store_var(settings.duplicate(true)) - + print("Saved settings: ", settings) func load_profile(): @@ -26,11 +43,10 @@ func load_profile(): print("Skip profile load") return var f = FileAccess.open("user://profile", FileAccess.READ) - settings = f.get_var() - - # Add missing keys - for k in DEFAULT_SETTINGS.keys(): - if !settings.has(k): - settings[k] = DEFAULT_SETTINGS[k] - + var saved_settings = f.get_var() + if saved_settings != null and saved_settings is Dictionary: + for i in DEFAULT_SETTINGS.keys(): + if saved_settings.has(i): + settings[i] = saved_settings[i] + print("Loaded settings: ", settings) diff --git a/client/map/tiles/bark.tres b/client/map/tiles/bark.tres index 53b9adc6..24bc469b 100644 --- a/client/map/tiles/bark.tres +++ b/client/map/tiles/bark.tres @@ -10,6 +10,5 @@ metallic = 0.4 roughness = 0.301511 normal_enabled = true normal_texture = ExtResource("2_v3ray") -distance_fade_mode = 2 distance_fade_min_distance = 2.0 distance_fade_max_distance = 4.0 diff --git a/client/map/tiles/leaves.tres b/client/map/tiles/leaves.tres index 99486408..5c2b2082 100644 --- a/client/map/tiles/leaves.tres +++ b/client/map/tiles/leaves.tres @@ -7,6 +7,5 @@ resource_name = "NormalTree_Leaves" transparency = 4 albedo_texture = ExtResource("1_jg4r8") metallic_specular = 0.0 -distance_fade_mode = 2 distance_fade_min_distance = 2.0 distance_fade_max_distance = 4.0 diff --git a/client/project.godot b/client/project.godot index e7a93c3a..bb2b6896 100644 --- a/client/project.godot +++ b/client/project.godot @@ -23,6 +23,14 @@ Global="*res://global.gd" [input] +ui_accept={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194309,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194310,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null) +] +} forward={ "deadzone": 0.1, "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":87,"key_label":0,"unicode":119,"echo":false,"script":null) |