From a3634380ed3d0fec388fc3ab95f9c05643b409f9 Mon Sep 17 00:00:00 2001 From: Relintai Date: Mon, 19 Apr 2021 18:39:43 +0200 Subject: [PATCH] Updated Terraman and added the new chunk_lod_first_falloff parameter to the ingame settings. --- HEADS | 2 +- game/project.godot | 1 + game/tw/TerraWorldBlocky.gd | 9 +++++---- game/ui/autoload/SettingsManager.gd | 1 + game/ui/options/Options.tscn | 19 ++++++++++++++----- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/HEADS b/HEADS index 45c36c8f..c04cfea2 100644 --- a/HEADS +++ b/HEADS @@ -1 +1 @@ -{"engine": {"3.2": "94a0fc47f7b4e90f8973f9adbfd3312579ed2825", "master": "8c73e813134001e575b6f59e3b0100471c007410", "3.x": "bb10729c6ee1051965b564c43bb4493e6e7459a5"}, "world_generator": {"master": "d289ee942c19f75ae0ecbdc1d0f38a84ec4ff3e3"}, "entity_spell_system": {"master": "378ebcff23e5ab0a04c0e92119d26391de4be139"}, "ui_extensions": {"master": "f82273f54cb1ab87d458c91af9554acec5c10831"}, "voxelman": {"master": "9253cc53c6fbbd78b5e4268eb498ef55b4dd0181"}, "texture_packer": {"master": "dbf3c59a9c52f155f0d98b567d571708e8b3f253"}, "fastnoise": {"master": "d447fd5364e9ab5a6b14184483eab23cd3fe820b"}, "mesh_data_resource": {"master": "679064ea4f1fe81d14e18b3db9e113384e99cf84"}, "procedural_animations": {"master": "f8aae42bf06b3936cc6bd24cb18e1c3ec9f78f4f"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "6f418a07d491539b0bcd0bf16e84211e950cb21c"}, "mesh_utils": {"master": "6725a4906c0a039eaff4c46c8dea00f6b1b99045"}, "broken_seals_module": {"master": "8bfe7efe6940c701bc9296d6e4eb565b36b6527b"}, "thread_pool": {"master": "b2e8c815392052947e7386f722913a12eea543a4"}, "terraman": {"master": "a3c81f4d0c4c336e3abfe027b06a08f576da0b59"}} \ No newline at end of file +{"engine": {"3.2": "94a0fc47f7b4e90f8973f9adbfd3312579ed2825", "master": "8c73e813134001e575b6f59e3b0100471c007410", "3.x": "bb10729c6ee1051965b564c43bb4493e6e7459a5"}, "world_generator": {"master": "d289ee942c19f75ae0ecbdc1d0f38a84ec4ff3e3"}, "entity_spell_system": {"master": "378ebcff23e5ab0a04c0e92119d26391de4be139"}, "ui_extensions": {"master": "f82273f54cb1ab87d458c91af9554acec5c10831"}, "voxelman": {"master": "9253cc53c6fbbd78b5e4268eb498ef55b4dd0181"}, "texture_packer": {"master": "dbf3c59a9c52f155f0d98b567d571708e8b3f253"}, "fastnoise": {"master": "d447fd5364e9ab5a6b14184483eab23cd3fe820b"}, "mesh_data_resource": {"master": "679064ea4f1fe81d14e18b3db9e113384e99cf84"}, "procedural_animations": {"master": "f8aae42bf06b3936cc6bd24cb18e1c3ec9f78f4f"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "6f418a07d491539b0bcd0bf16e84211e950cb21c"}, "mesh_utils": {"master": "6725a4906c0a039eaff4c46c8dea00f6b1b99045"}, "broken_seals_module": {"master": "8bfe7efe6940c701bc9296d6e4eb565b36b6527b"}, "thread_pool": {"master": "b2e8c815392052947e7386f722913a12eea543a4"}, "terraman": {"master": "034f3b563f6dffc27accf1cc830109f23df9902c"}} \ No newline at end of file diff --git a/game/project.godot b/game/project.godot index 769fe427..6b4f50ae 100644 --- a/game/project.godot +++ b/game/project.godot @@ -306,6 +306,7 @@ level/max_class_level=60 chunk_lod_falloff=2 chunk_spawn_range=8 +chunk_lod_first_falloff=2 [importer_defaults] diff --git a/game/tw/TerraWorldBlocky.gd b/game/tw/TerraWorldBlocky.gd index a3dc65c6..0841b028 100644 --- a/game/tw/TerraWorldBlocky.gd +++ b/game/tw/TerraWorldBlocky.gd @@ -71,14 +71,15 @@ func on_setting_changed(section, key, value): if section == "game": if key == "chunk_spawn_range": chunk_spawn_range = value - - if key == "chunk_lod_falloff": + elif key == "chunk_lod_falloff": chunk_lod_falloff = value - - + elif key == "chunk_lod_first_falloff": + chunk_lod_first_falloff = value + func on_settings_loaded(): chunk_spawn_range = Settings.get_value("game", "chunk_spawn_range") chunk_lod_falloff = Settings.get_value("game", "chunk_lod_falloff") + chunk_lod_first_falloff = Settings.get_value("game", "chunk_lod_first_falloff") vis_update += VIS_UPDATE_INTERVAL diff --git a/game/ui/autoload/SettingsManager.gd b/game/ui/autoload/SettingsManager.gd index c24402ca..f6ac3b04 100644 --- a/game/ui/autoload/SettingsManager.gd +++ b/game/ui/autoload/SettingsManager.gd @@ -45,6 +45,7 @@ var _settings : Dictionary = { "game" : { "chunk_spawn_range" : ProjectSettings.get("game/chunk_spawn_range"), "chunk_lod_falloff" : ProjectSettings.get("game/chunk_lod_falloff"), + "chunk_lod_first_falloff" : ProjectSettings.get("game/chunk_lod_first_falloff"), }, "ui" : { "touchscreen_mode" : OS.has_touchscreen_ui_hint(), diff --git a/game/ui/options/Options.tscn b/game/ui/options/Options.tscn index dd5f5085..7e2cc375 100644 --- a/game/ui/options/Options.tscn +++ b/game/ui/options/Options.tscn @@ -44,7 +44,6 @@ size_flags_vertical = 3 tab_align = 0 [node name="Video" type="VBoxContainer" parent="PanelContainer/VBoxContainer/TabContainer"] -visible = false anchor_right = 1.0 anchor_bottom = 1.0 margin_left = 4.0 @@ -147,6 +146,15 @@ step = 1.0 margin_top = 32.0 margin_bottom = 56.0 property_category = "game" +property_name = "chunk_lod_first_falloff" +property_label = "Chunk Lod First Falloff" +max_value = 30.0 +step = 1.0 + +[node name="OptionsSpinboxRow3" parent="PanelContainer/VBoxContainer/TabContainer/Game" instance=ExtResource( 8 )] +margin_top = 64.0 +margin_bottom = 88.0 +property_category = "game" property_name = "chunk_lod_falloff" property_label = "Chunk Lod Falloff" max_value = 30.0 @@ -170,8 +178,8 @@ property_name = "touchscreen_mode" property_label = "Touchscreen Mode" [node name="OptionsSpinboxRow" parent="PanelContainer/VBoxContainer/TabContainer/Interface" instance=ExtResource( 8 )] -margin_top = 58.0 -margin_bottom = 82.0 +margin_top = 34.0 +margin_bottom = 58.0 property_category = "ui" property_name = "ui_scale" property_label = "UI Scale" @@ -181,8 +189,8 @@ step = 0.01 rounded = false [node name="OptionsSpinboxRow2" parent="PanelContainer/VBoxContainer/TabContainer/Interface" instance=ExtResource( 8 )] -margin_top = 90.0 -margin_bottom = 114.0 +margin_top = 66.0 +margin_bottom = 90.0 property_category = "ui" property_name = "ui_scale_touch" property_label = "UI Scale Touch" @@ -222,4 +230,5 @@ margin_top = 439.0 margin_right = 535.0 margin_bottom = 465.57 text = "Close" + [connection signal="pressed" from="PanelContainer/VBoxContainer/Close" to="." method="hide"]