You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,9 @@ FlowKit is a Godot 4 editor plugin for visual event-driven programming, inspired
7
7
**Plugin Structure**: FlowKit is a dual-mode system with editor-time visual authoring and runtime execution:
8
8
9
9
-**Editor side** (`flowkit.gd`, `ui/`): Godot `@tool` plugin that adds a bottom panel for visual event editing
10
-
-**Runtime side** (`runtime/flowkit_engine.gd`): Autoloaded singleton that executes event sheets during gameplay
10
+
-**Runtime side** (`runtime/flowkit_engine.gd`, `runtime/flowkit_system.gd`): Autoloaded singletons that execute event sheets during gameplay
11
11
-**Registry system** (`registry.gd`): Auto-discovers and instantiates provider scripts at plugin load
12
+
-**Generator system** (`generator.gd`): Automatically generates actions, conditions, and events from scene node types and their properties/methods/signals
12
13
13
14
**Event Sheet Model**: Scene-specific `.tres` resources saved to `saved/event_sheet/{scene_name}.tres`:
14
15
@@ -33,10 +34,11 @@ FKEventSheet
33
34
34
35
**Creating New Providers**:
35
36
36
-
1. Add `.gd` file to `actions/{NodeType}/`, `conditions/`, or `events/`
37
+
1. Add `.gd` file to `actions/{NodeType}/`, `conditions/{NodeType}/`, or `events/{NodeType}/`
37
38
2. Extend `FKAction`, `FKCondition`, or `FKEvent`
38
-
3. Implement required methods (see `actions/Node/print.gd` for reference)
39
+
3. Implement required methods (see base classes in `resources/` directory)
39
40
4. Registry auto-discovers on plugin reload (no manual registration needed)
41
+
5.**Alternative**: Use `generator.gd` to auto-generate providers from scene nodes - it introspects node properties, methods, and signals to create boilerplate providers
40
42
41
43
**Event Sheet Execution** (runtime):
42
44
@@ -135,12 +137,16 @@ Each modal step stores context in `pending_*` variables (e.g., `pending_action_n
135
137
136
138
## Key Integration Points
137
139
138
-
**Runtime Autoload**: `FlowKitEngine` added as singleton in `_enter_tree()`:
140
+
**Runtime Autoloads**: Two singletons added in `_enter_tree()`:
-`FlowKitSystem`: System-level utilities and global state management
148
+
-`FlowKit`: Main execution engine for event sheet processing
149
+
144
150
**Scene Detection**: Engine uses deferred `_check_current_scene()` + `_process()` polling to handle scene changes robustly (works even if scene loads before engine ready).
145
151
146
152
**UI-Resource Sync**: Editor saves via `ResourceSaver.save()`, then calls `_display_sheet()` to rebuild UI from saved resource (single source of truth).
0 commit comments