|
@@ -22,8 +22,18 @@ func _config_save() -> void:
|
|
|
_config.set_value(_config_section, 'config_path', $config_path.text)
|
|
|
_config.save(_config_path)
|
|
|
|
|
|
-func _on_import_perform_button_down():
|
|
|
- print(_config_path)
|
|
|
+func _on_import_perform_button_down() -> void:
|
|
|
+ var dir_access := DirAccess.open($config_path.text)
|
|
|
+ for config_type in dir_access.get_directories():
|
|
|
+ var config_type_dir: String = $config_path.text.path_join(config_type)
|
|
|
+ var config_dir_access := DirAccess.open(config_type_dir)
|
|
|
+ for config_file in config_dir_access.get_files():
|
|
|
+ if config_file.get_extension() != 'csv':
|
|
|
+ continue
|
|
|
+ var file_access := FileAccess.open(config_type_dir.path_join(config_file), FileAccess.READ)
|
|
|
+ while !file_access.eof_reached():
|
|
|
+ var line := file_access.get_csv_line()
|
|
|
+ print(line)
|
|
|
"
|
|
|
|
|
|
[node name="配置" type="VBoxContainer"]
|