gdharness 1.1.21 → 1.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/build/cli.js +1470 -726
  2. package/build/godot/addons/gdharness_editor/bridge_client.gd +12 -2
  3. package/build/godot/addons/gdharness_editor/property_values.gd +484 -65
  4. package/build/godot/addons/gdharness_editor/reading.gd +17 -0
  5. package/build/godot/addons/gdharness_editor/scene_file.gd +229 -0
  6. package/build/godot/addons/gdharness_editor/scene_file.gd.uid +1 -0
  7. package/build/godot/addons/gdharness_editor/serialisation.gd +116 -7
  8. package/build/godot/addons/gdharness_editor/tool_executor.gd +10 -3
  9. package/build/godot/addons/gdharness_editor/tools/animation_tools.gd +374 -242
  10. package/build/godot/addons/gdharness_editor/tools/class_tools.gd +47 -9
  11. package/build/godot/addons/gdharness_editor/tools/filesystem_tools.gd +206 -0
  12. package/build/godot/addons/gdharness_editor/tools/filesystem_tools.gd.uid +1 -0
  13. package/build/godot/addons/gdharness_editor/tools/play_tools.gd +90 -15
  14. package/build/godot/addons/gdharness_editor/tools/resource_tools.gd +373 -140
  15. package/build/godot/addons/gdharness_editor/tools/scene_tools.gd +566 -472
  16. package/build/godot/addons/gdharness_runtime/call_errors.gd +42 -0
  17. package/build/godot/addons/gdharness_runtime/call_errors.gd.uid +1 -0
  18. package/build/godot/addons/gdharness_runtime/reading.gd +17 -0
  19. package/build/godot/addons/gdharness_runtime/runtime_autoload.gd +15 -5
  20. package/build/godot/addons/gdharness_runtime/runtime_capture.gd +51 -5
  21. package/build/godot/addons/gdharness_runtime/runtime_changes.gd +440 -0
  22. package/build/godot/addons/gdharness_runtime/runtime_changes.gd.uid +1 -0
  23. package/build/godot/addons/gdharness_runtime/runtime_input.gd +184 -338
  24. package/build/godot/addons/gdharness_runtime/runtime_paths.gd +89 -16
  25. package/build/godot/addons/gdharness_runtime/runtime_queries.gd +107 -343
  26. package/build/godot/addons/gdharness_runtime/runtime_screen.gd +13 -1
  27. package/build/godot/addons/gdharness_runtime/runtime_targets.gd +90 -24
  28. package/build/godot/addons/gdharness_runtime/runtime_typing.gd +351 -0
  29. package/build/godot/addons/gdharness_runtime/runtime_typing.gd.uid +1 -0
  30. package/build/godot/addons/gdharness_runtime/runtime_values.gd +92 -33
  31. package/build/godot/addons/gdharness_runtime/runtime_waits.gd +61 -28
  32. package/build/godot/addons/gdharness_runtime/serialisation.gd +116 -7
  33. package/build/godot/operations/audio_buses.gd +47 -11
  34. package/build/godot/operations/class_cache.gd +18 -2
  35. package/build/godot/operations/classdb_queries.gd +28 -17
  36. package/build/godot/operations/dependencies.gd +128 -17
  37. package/build/godot/operations/file_walk.gd +20 -0
  38. package/build/godot/operations/gdscript_analysis.gd +59 -20
  39. package/build/godot/operations/gdscript_authoring.gd +127 -60
  40. package/build/godot/operations/godot_operations.gd +24 -5
  41. package/build/godot/operations/import_pipeline.gd +179 -19
  42. package/build/godot/operations/logger.gd +2 -2
  43. package/build/godot/operations/plugins.gd +88 -70
  44. package/build/godot/operations/project_config.gd +41 -6
  45. package/build/godot/operations/project_diagnostics.gd +27 -11
  46. package/build/godot/operations/reading.gd +17 -0
  47. package/build/godot/operations/resource_files.gd +60 -17
  48. package/build/godot/operations/serialisation.gd +116 -7
  49. package/build/index.js +1385 -553
  50. package/build/keeper.js +4 -0
  51. package/package.json +1 -1
@@ -98,12 +98,21 @@ var _tried_announced: bool = false
98
98
  var _told_about_url: String = ""
99
99
  var _connecting_for: float = 0.0
100
100
 
101
+ ## Whether this editor was started by another editor, which is Godot's own restart and the project
102
+ ## manager opening a project: the new editor is the old one's child and has its environment, with
103
+ ## the variable this addon sets as it loads still naming the old one. Its arguments are gone, since
104
+ ## the engine consumes `--lsp-port`, `--dap-port` and `--log-file` and hands none of them back, so the
105
+ ## ports and the marker a server put in that environment describe the editor before this one.
106
+ var _started_by_an_editor: bool = false
107
+
101
108
 
102
109
  func _ready() -> void:
103
110
  _project_path = ProjectSettings.globalize_path("res://")
104
111
  version_at_load = _loaded_version()
105
112
  digest_at_load = _loaded_digest()
106
113
  _keep_breakpoints_through_sessions()
114
+ var inherited: String = OS.get_environment(EDITOR_PID_VARIABLE)
115
+ _started_by_an_editor = not inherited.is_empty() and inherited != str(OS.get_process_id())
107
116
  OS.set_environment(EDITOR_PID_VARIABLE, str(OS.get_process_id()))
108
117
 
109
118
  _reconnect_timer = Timer.new()
@@ -306,7 +315,8 @@ func _handle_connect() -> void:
306
315
  # Whether a server started this editor, which is the only kind that can be started again
307
316
  # as itself: the engine hands back none of the arguments it was given, so the arguments
308
317
  # have to come from whoever wrote them. See `restart_editor` in play_tools.gd.
309
- "opened_by_a_server": _opened_by_a_server()
318
+ "opened_by_a_server": _opened_by_a_server() and not _started_by_an_editor,
319
+ "started_by_an_editor": _started_by_an_editor
310
320
  }
311
321
  )
312
322
 
@@ -338,7 +348,7 @@ static func _opened_by_a_server() -> bool:
338
348
  ## collided with the editor it was moved away from. Restarting is done by starting the editor again
339
349
  ## with the same arguments now, which is `editor_launch restart`, so there is nothing to persist.
340
350
  func _serves(variable: String, setting: String) -> int:
341
- var asked: int = _asked_for(variable)
351
+ var asked: int = 0 if _started_by_an_editor else _asked_for(variable)
342
352
  return asked if asked > 0 else _serving(setting)
343
353
 
344
354