added a small optimization to the level editor, since playing custom levels wont need the tile menu, we can just DELETE IT, since its so fucking big and bulky, i bet it causes like half the issues with performance, and is just not needed

This commit is contained in:
JHDev2006
2025-09-23 21:31:24 +01:00
parent e9f4674dd0
commit 592d250ce9
14 changed files with 4 additions and 1 deletions

View File

@@ -131,6 +131,8 @@ func _ready() -> void:
$Info.hide()
%Grid.hide()
play_level()
for i in [$TileMenu]:
i.queue_free()
else:
Global.current_game_mode = Global.GameMode.LEVEL_EDITOR
else:
@@ -147,7 +149,8 @@ func _physics_process(delta: float) -> void:
handle_tile_cursor()
if [EditorState.IDLE, EditorState.TRACK_EDITING].has(current_state):
handle_camera(delta)
%ThemeName.text = Global.level_theme
if is_instance_valid(%ThemeName):
%ThemeName.text = Global.level_theme
handle_hud()
if Input.is_action_just_pressed("editor_open_menu"):
if current_state == EditorState.IDLE: