aboutsummaryrefslogtreecommitdiff
path: root/client/map/map.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/map/map.gd')
-rw-r--r--client/map/map.gd7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/map/map.gd b/client/map/map.gd
index 235425a0..7f854c25 100644
--- a/client/map/map.gd
+++ b/client/map/map.gd
@@ -13,6 +13,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
+@tool
class_name Map
extends Node3D
@@ -54,7 +55,8 @@ func clear_tile(pos: Vector2i):
@onready var voxelgi: VoxelGI = $VoxelGI
func _ready():
- Settings.hook_changed("graphics.gi", false, apply_gi_setting)
+ if not Engine.is_editor_hint():
+ Settings.hook_changed("graphics.gi", false, apply_gi_setting)
floor_node.material_override = preload("res://map/tiles/floor_material.tres")
for fm in tile_factory.floor_meshers.values():
add_child(fm.mesh_instance)
@@ -73,7 +75,8 @@ func apply_gi_setting(state):
voxelgi.data = null
func gi_bake():
- if Settings.read("graphics.gi") != "voxelgi": return
+ if not Engine.is_editor_hint():
+ if Settings.read("graphics.gi") != "voxelgi": return
print("Map: Rebaking VoxelGI")
currently_baked = true
gi_bake_blocking()