Compare commits
4 Commits
c9e9e5319a
...
7319cab6a5
Author | SHA1 | Date |
---|---|---|
|
7319cab6a5 | |
|
f7a63ca673 | |
|
691208016c | |
|
2dfe775f7b |
|
@ -121,7 +121,8 @@ LimboAI can be used as either a C++ module or as a GDExtension shared library. G
|
|||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome! Please open issues for bug reports, feature requests, or code changes. Keep the minor versions backward-compatible when submitting pull requests.
|
||||
Contributions are welcome! Please open issues for bug reports, feature requests, or code changes.
|
||||
For detailed guidelines on contributing to code or documentation, check out our [Contributing](https://limboai.readthedocs.io/en/latest/getting-started/contributing.html) page.
|
||||
|
||||
If you have an idea for a behavior tree task or a feature that could be useful in a variety of projects, open an issue to discuss it.
|
||||
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
.. _contributing:
|
||||
|
||||
Contributing
|
||||
============
|
||||
|
||||
We target the latest stable version of the Godot Engine for development until a
|
||||
third beta or a release candidate of an upcoming Godot release becomes available.
|
||||
If you want to contribute to the project, please ensure that you are using the
|
||||
corresponding Godot version.
|
||||
|
||||
We follow the `Godot code style guidelines <https://docs.godotengine.org/en/stable/contributing/development/code_style_guidelines.html#doc-code-style-guidelines>`_.
|
||||
Please use ``clang-format`` to maintain consistent styling. You can install
|
||||
``pre-commit`` hooks for Git using ``pre-commit install`` to automate this process.
|
||||
|
||||
Please keep the minor versions backward-compatible when submitting pull requests.
|
||||
|
||||
We support building LimboAI as a module for the Godot Engine and as a GDExtension library.
|
||||
Make sure your contribution is compatible with both. Our CI workflow will verify
|
||||
that your changes can be compiled in both configurations.
|
||||
|
||||
Compiling as module of the Godot Engine
|
||||
---------------------------------------
|
||||
|
||||
1. Clone the Godot Engine repository.
|
||||
2. Switch to the latest stable tag.
|
||||
3. Clone the LimboAI repository into the ``modules/limboai`` directory.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone https://github.com/godotengine/godot.git
|
||||
git checkout 4.3-stable # Replace "4.3-stable" with the latest stable tag
|
||||
git clone https://github.com/limbonaut/limboai modules/limboai
|
||||
|
||||
Consult the `Godot Engine documentation <https://docs.godotengine.org/en/stable/contributing/development/compiling/index.html>`_~
|
||||
for detailed instructions on building the engine.
|
||||
|
||||
**Unit tests** can be compiled using the ``tests=yes`` build option. To execute them,
|
||||
run the compiled Godot binary with the ``--test --tc="*[LimboAI]*"`` command-line options.
|
||||
|
||||
Compiling as GDExtension library
|
||||
--------------------------------
|
||||
|
||||
You'll need the SCons build tool and a C++ compiler. See also `Compiling <https://docs.godotengine.org/en/stable/contributing/development/compiling/index.html>`_.
|
||||
Run ``scons target=editor`` to build the plugin library for your current platform.
|
||||
|
||||
- SCons will automatically clone the ``godot-cpp`` repository if it doesn't already exist in the ``limboai/godot-cpp`` directory.
|
||||
- By default, built targets are placed in the demo project: ``demo/addons/limboai/bin/``.
|
||||
|
||||
Check ``scons -h`` for other options and targets.
|
||||
|
||||
Contributing to the documentation
|
||||
---------------------------------
|
||||
|
||||
Online documentation is created using `Sphinx <https://www.sphinx-doc.org/en/master/>`_.
|
||||
Source files are located in the ``doc/source`` directory in RST format and can
|
||||
be built locally with ``sphinx-build``. See the
|
||||
`Sphinx documentation <https://www.sphinx-doc.org/en/master/tutorial/getting-started.html>`_
|
||||
for more details.
|
||||
|
||||
Class documentation resides in XML files within the ``doc_classes/`` directory.
|
||||
If you create a new class or modify an existing one, you can run the compiled
|
||||
Godot binary with the ``--doctool`` option in the root of the Godot source code
|
||||
to generate the missing XML files or sections within those files in the class documentation.
|
||||
After editing the XML files, please run the compiled editor binary with the ``--doctool``
|
||||
option again to update and tidy up the XML files.
|
||||
|
||||
Sphinx RST files for the class documentation are generated from
|
||||
XML files using the Godot script ``make_rst.py`` and stored in the ``doc/source/classes`` directory.
|
||||
This process is performed using our own script ``gdextension/update_rst.sh``. RST files
|
||||
in ``doc/source/classes`` should not be edited manually.
|
|
@ -85,6 +85,7 @@ Creating your own behavior trees
|
|||
getting-started/gdextension
|
||||
getting-started/c-sharp
|
||||
getting-started/featured-classes
|
||||
getting-started/contributing
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
|
|
@ -287,14 +287,14 @@ void EditorPropertyBBParam::update_property() {
|
|||
variable_editor->update_property();
|
||||
variable_editor->show();
|
||||
bottom_container->hide();
|
||||
type_choice->set_icon(get_editor_theme_icon(SNAME("LimboExtraVariable")));
|
||||
type_choice->set_button_icon(get_editor_theme_icon(SNAME("LimboExtraVariable")));
|
||||
} else {
|
||||
_create_value_editor(param->get_type());
|
||||
variable_editor->hide();
|
||||
value_editor->show();
|
||||
value_editor->set_object_and_property(param.ptr(), SNAME("saved_value"));
|
||||
value_editor->update_property();
|
||||
type_choice->set_icon(get_editor_theme_icon(Variant::get_type_name(param->get_type())));
|
||||
type_choice->set_button_icon(get_editor_theme_icon(Variant::get_type_name(param->get_type())));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -316,7 +316,7 @@ void EditorPropertyBBParam::_notification(int p_what) {
|
|||
|
||||
{
|
||||
String type = Variant::get_type_name(_get_edited_param()->get_type());
|
||||
type_choice->set_icon(get_editor_theme_icon(type));
|
||||
type_choice->set_button_icon(get_editor_theme_icon(type));
|
||||
}
|
||||
|
||||
// Initialize type choice.
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "core/object/object.h"
|
||||
#include "core/templates/hash_set.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_main_screen.h"
|
||||
#include "editor/editor_undo_redo_manager.h"
|
||||
#include "editor/gui/editor_spin_slider.h"
|
||||
#include "editor/plugins/editor_plugin.h"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "core/io/resource.h"
|
||||
#include "core/variant/variant.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_main_screen.h"
|
||||
#include "editor/plugins/script_editor_plugin.h"
|
||||
#endif // TOOLS_ENABLED
|
||||
|
||||
|
@ -213,7 +214,7 @@ Variant VARIANT_DEFAULT(Variant::Type p_type) {
|
|||
void SHOW_BUILTIN_DOC(const String &p_topic) {
|
||||
#ifdef LIMBOAI_MODULE
|
||||
ScriptEditor::get_singleton()->goto_help(p_topic);
|
||||
EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT);
|
||||
EditorNode::get_singleton()->get_editor_main_screen()->select(EditorMainScreen::EDITOR_SCRIPT);
|
||||
#elif LIMBOAI_GDEXTENSION
|
||||
TypedArray<ScriptEditorBase> open_editors = EditorInterface::get_singleton()->get_script_editor()->get_open_script_editors();
|
||||
ERR_FAIL_COND_MSG(open_editors.size() == 0, "Can't open help page. Need at least one script open in the script editor.");
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#define EDITOR_FILE_SYSTEM() (EditorFileSystem::get_singleton())
|
||||
#define EDITOR_SETTINGS() (EditorSettings::get_singleton())
|
||||
#define BASE_CONTROL() (EditorNode::get_singleton()->get_gui_base())
|
||||
#define MAIN_SCREEN_CONTROL() (EditorNode::get_singleton()->get_main_screen_control())
|
||||
#define MAIN_SCREEN_CONTROL() (EditorNode::get_singleton()->get_editor_main_screen()->get_control())
|
||||
#define SCENE_TREE() (SceneTree::get_singleton())
|
||||
#define IS_DEBUGGER_ACTIVE() (EngineDebugger::is_active())
|
||||
#define FS_DOCK_SELECT_FILE(m_path) FileSystemDock::get_singleton()->select_file(m_path)
|
||||
|
@ -37,7 +37,7 @@
|
|||
#define IS_CLASS(m_obj, m_class) (m_obj->is_class_ptr(m_class::get_class_ptr_static()))
|
||||
#define RAND_RANGE(m_from, m_to) (Math::random(m_from, m_to))
|
||||
#define RANDF() (Math::randf())
|
||||
#define BUTTON_SET_ICON(m_btn, m_icon) m_btn->set_icon(m_icon)
|
||||
#define BUTTON_SET_ICON(m_btn, m_icon) m_btn->set_button_icon(m_icon)
|
||||
#define RESOURCE_LOAD(m_path, m_hint) ResourceLoader::load(m_path, m_hint)
|
||||
#define RESOURCE_LOAD_NO_CACHE(m_path, m_hint) ResourceLoader::load(m_path, m_hint, ResourceFormatLoader::CACHE_MODE_IGNORE)
|
||||
#define RESOURCE_SAVE(m_res, m_path, m_flags) ResourceSaver::save(m_res, m_path, m_flags)
|
||||
|
@ -47,7 +47,7 @@
|
|||
#define GET_PROJECT_SETTINGS_DIR() EditorPaths::get_singleton()->get_project_settings_dir()
|
||||
#define EDIT_RESOURCE(m_res) EditorNode::get_singleton()->edit_resource(m_res)
|
||||
#define INSPECTOR_GET_EDITED_OBJECT() (InspectorDock::get_inspector_singleton()->get_edited_object())
|
||||
#define SET_MAIN_SCREEN_EDITOR(m_name) (EditorNode::get_singleton()->select_editor_by_name(m_name))
|
||||
#define SET_MAIN_SCREEN_EDITOR(m_name) (EditorNode::get_singleton()->get_editor_main_screen()->select_by_name(m_name))
|
||||
#define FILE_EXISTS(m_path) FileAccess::exists(m_path)
|
||||
#define DIR_ACCESS_CREATE() DirAccess::create(DirAccess::ACCESS_RESOURCES)
|
||||
#define PERFORMANCE_ADD_CUSTOM_MONITOR(m_id, m_callable) (Performance::get_singleton()->add_custom_monitor(m_id, m_callable, Variant()))
|
||||
|
|
Loading…
Reference in New Issue