This files summarizes the plugin behavior and plugin structure. For detailed information about the content of each folder, take a look at their respective README files.
Blockflowplugin is activated by the user:- Godot engine creates
core/plugin_script.gd(Blockflowplugin) instance. - On creation, plugin creates and holds
BlockEditorandCommandRecordinstances, with some inspector tools.
- Godot engine creates
BlockEditoris added as main screen node, displayed along with2Dand3Dscene views.BlockEditoradds aTitleLabel,CollectionDisplayer,Toolbarand aCommandList.- Toolbar menu items are added during creation time.
- The editor adds itself to a fake "singleton" name in
EngineasBlockflow_main_editor. - Even if
CollectionDisplayerdisplayCommandBlocks, it doesn't manipulate the collection, is the editor itself which does this task.
- First time that editor loads or when it doesn't edit any collection, a "welcome" message is displayed and
CommandListbuttons are disabled. - When a command is selected (clicked) from
CommandListit emits a signal that is listened byBlockEditor. That signal contains information about the command selected, which is duplicated and added in the current edited collection. - When a command is drag from any place (from a
CommandBlock,CommandListorFileSystem) drag information is passed to engine:- If is drop in
CollectionDisplayer, the data is handled byBlockEditorand the command is added/moved to the dropped position.
- If is drop in
- Right-click on any
CommandBlockwill display a menu with some manipulation options that can be applied to the block.
Editor is not meant to be used in-game, but many parts of it can be used/replicated in game.
Processor core functions are not designed to work in editor. Data manipulation in this node, however, is. Many aspects of the processor in editor time are modified by many
EditorInspectorplugins, added byBlockflowplugin.
CommandProcessor takes a single CommandCollection at time.
When you play a scene with CommandProcessor nodes (and start_on_ready is enabled or you call start), processor will call the execution steps from the command position passed (being 0, the first command, used) and will repeat this process until there are no more commands left.
Command flow is determined by the processor, the next/previous steps can be determined by the current executed command.
Plugin's folder structure. We aim to group related files by folder, but when we can't find a place for it at its creation moment, we put the file one level higher until
This is the main project folder. It includes general documentation files (like README).
Contains all command templates bundled with the plugin.
Not all of these commands are registered (exposed) in CommandRecord.
Plugin core files. The plugin aims to work isolated as possible, but most (if not all) scripts tends to rely on these files.
You can find the plugin script here.
Plugin debugger.
Debugger UI and debugger scripts that are added under Godot's debugger tab to debug in-game processors.
Documentation files. This folder includes this file.
Even if each script has their own documentation to describe what is their purpose, some extra information can be found in their README files and in this folder.
Editor folder.
All Blockflow UI related files lives here, from the main screen to each individual block script.
Scripts that defines the structure of the basic command block that is seen in editor through CommandDisplayer.
Inspector scripts that defines custom modifications to different classes that are used in this plugin at EditorInspector.
Test (playground) scenes to try Blockflow features and debug them in game.
Some features can't be used in game runtime since they're locked to the editor runtime, so we test those in these playground scenes.
Shortcuts used in the editor, created as Shortcut resources to be able to modify and reuse.
Plugin icons. All icons are here, in SVG Format, with a specific color and size selection.
Script templates that are going to be copied to res:// when plugin loads for the first time.
These templates should appear when you create a new script of Command type.