瀏覽代碼

refactor: use project path as TBL settings path

LanzaSchneider 1 年之前
父節點
當前提交
6ef06843f5
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      tblext.gd

+ 3 - 1
tblext.gd

@@ -1,12 +1,14 @@
 @tool
 extends EditorPlugin
 
+const config_root_path := 'res://.tbl'
+
 func _enter_tree() -> void:
 	_setup_panel(preload('editor/config-importer.tscn'))
 
 func _setup_panel(prefab:PackedScene):
 	var panel := prefab.instantiate()
-	panel.set('path', prefab.resource_path.get_base_dir())
+	panel.set('path', config_root_path)
 	add_control_to_dock(EditorPlugin.DOCK_SLOT_LEFT_BR, panel)
 	tree_exiting.connect(func():
 		remove_control_from_docks(panel)