diff options
author | metamuffin <metamuffin@disroot.org> | 2024-06-29 20:41:23 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-29 20:41:23 +0200 |
commit | c1a65adf8aecaa56ee3a7495d5eb59bcce694d93 (patch) | |
tree | c7127df6af7e4943f0c85eab97e79a7f3f8e2873 /client/global.gd | |
parent | 3ac2dc4abaeedea61c3a60bd5c4ae11166d8b188 (diff) | |
parent | c06d39a894906c17bd04be6281da9d2e2bb08838 (diff) | |
download | hurrycurry-c1a65adf8aecaa56ee3a7495d5eb59bcce694d93.tar hurrycurry-c1a65adf8aecaa56ee3a7495d5eb59bcce694d93.tar.bz2 hurrycurry-c1a65adf8aecaa56ee3a7495d5eb59bcce694d93.tar.zst |
Merge branch 'master' of https://codeberg.org/metamuffin/undercooked
Diffstat (limited to 'client/global.gd')
-rw-r--r-- | client/global.gd | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/client/global.gd b/client/global.gd index 35244fa7..da1d8515 100644 --- a/client/global.gd +++ b/client/global.gd @@ -18,10 +18,11 @@ extends Node # Each setting contains a dictionary with the following keys: -# "type": The type of the setting. Can be "toggle", "line", "dropdown", or "dropdown_preset" +# "type": The type of the setting. Can be "toggle", "line", "range", "dropdown", or "dropdown_preset" # "value": The value of the setting. When using "dropdown", this contains an int # as the index for the respecitve element in the "options" array. # "apply": Only for type "dropdown_preset": A dictionary to override all other settings. +# "min" and "max": Only for type "range": The min and max values. # "description": The setting name displayed in the settings menu. # (Optional: Only when type = "dropdown") "options": An array which contains all # possible values. @@ -64,6 +65,13 @@ var default_settings := { "type": "toggle", "value": false, "description": tr("Use SDFGI (Doesn't block the game but is more resource-hungry)") + }, + "grass_amount": { + "type": "range", + "value": 16, + "min": 0, + "max": 32, + "description": tr("3D grass amount per grass tile") } } @@ -71,22 +79,26 @@ const GRAPHICS_PRESETS = [ # Low: { "voxel_gi": false, - "sdfgi": false + "sdfgi": false, + "grass_amount": 0 }, # Medium: { "voxel_gi": false, - "sdfgi": false + "sdfgi": false, + "grass_amount": 16 }, # High: { "voxel_gi": false, - "sdfgi": true + "sdfgi": true, + "grass_amount": 16 }, # Ultra: { "voxel_gi": true, - "sdfgi": false + "sdfgi": false, + "grass_amount": 24 } ] @@ -143,7 +155,7 @@ func focus_first_button(node: Node) -> bool: func add_missing_keys(dict: Dictionary, reference: Dictionary): for k in reference.keys(): if !dict.has(k): - dict[k] = reference + dict[k] = reference[k] else: if dict[k] is Dictionary: add_missing_keys(dict[k], reference[k]) |