summaryrefslogtreecommitdiff
path: root/client/global.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/global.gd')
-rw-r--r--client/global.gd12
1 files changed, 10 insertions, 2 deletions
diff --git a/client/global.gd b/client/global.gd
index 35244fa7..b70f4894 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")
}
}
@@ -143,7 +151,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])