From 8f63c462dccfa321e33bf4436cb33d845bdca879 Mon Sep 17 00:00:00 2001 From: tpart Date: Sat, 29 Jun 2024 20:53:47 +0200 Subject: Fix apply value is entire dictionary instead of reference; Tweak default presets --- client/global.gd | 6 +++--- client/menu/settings_row.gd | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'client') diff --git a/client/global.gd b/client/global.gd index da1d8515..427809be 100644 --- a/client/global.gd +++ b/client/global.gd @@ -52,9 +52,9 @@ var default_settings := { "graphics_preset": { "type": "dropdown_preset", "options": [tr("Low"), tr("Medium"), tr("High"), tr("Ultra")], - "value":1, + "value": 1, "description": tr("Graphics preset"), - "apply": GRAPHICS_PRESETS + "apply": "GRAPHICS_PRESETS" }, "voxel_gi": { "type": "toggle", @@ -98,7 +98,7 @@ const GRAPHICS_PRESETS = [ { "voxel_gi": true, "sdfgi": false, - "grass_amount": 24 + "grass_amount": 16 } ] diff --git a/client/menu/settings_row.gd b/client/menu/settings_row.gd index bfa7064e..879fb363 100644 --- a/client/menu/settings_row.gd +++ b/client/menu/settings_row.gd @@ -32,7 +32,7 @@ func setup(key: String, dict: Dictionary, defaults: Dictionary): for i in setting["options"]: value_node.add_item(i) value_node.select(value) - value_node.connect("item_selected", apply.bind(setting["apply"])) + value_node.connect("item_selected", apply.bind(Global.get(setting["apply"]))) "range": value_node = HSlider.new() value_node.min_value = setting["min"] -- cgit v1.2.3-70-g09d2