From c06d39a894906c17bd04be6281da9d2e2bb08838 Mon Sep 17 00:00:00 2001 From: tpart Date: Sat, 29 Jun 2024 20:42:38 +0200 Subject: Add graphics preset for grass amount; FIx typo in grass generation script --- client/global.gd | 12 ++++++++---- client/map/tiles/grass_generation.gd | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'client') diff --git a/client/global.gd b/client/global.gd index b70f4894..da1d8515 100644 --- a/client/global.gd +++ b/client/global.gd @@ -79,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 } ] diff --git a/client/map/tiles/grass_generation.gd b/client/map/tiles/grass_generation.gd index 192d6790..02f9bf83 100644 --- a/client/map/tiles/grass_generation.gd +++ b/client/map/tiles/grass_generation.gd @@ -8,7 +8,7 @@ func _ready(): var random = RandomNumberGenerator.new() random.randomize() - for _i in Global.setting["grass_amount"]["value"]: + for _i in Global.settings["grass_amount"]["value"]: var g: Node3D = grass_side.instantiate() add_child(g) g.position = Vector3(random.randf_range(-.5, .5), 0, random.randf_range(-.5, .5)) -- cgit v1.2.3-70-g09d2