From 8bfd8e1bef5cb960312dc62c1c4d0833da64f0c4 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Mon, 29 Aug 2022 13:30:53 +0200 Subject: [PATCH] Add Fail task and missing icons --- limboai/bt/bt_fail.cpp | 7 +++++++ limboai/bt/bt_fail.h | 16 ++++++++++++++++ limboai/icons/icon_b_t_always_fail.svg | 1 + limboai/icons/icon_b_t_always_succeed.svg | 1 + limboai/icons/icon_b_t_cooldown.svg | 1 + limboai/icons/icon_b_t_delay.svg | 1 + limboai/icons/icon_b_t_fail.svg | 1 + limboai/icons/icon_b_t_invert.svg | 1 + limboai/icons/icon_b_t_limit.svg | 1 + limboai/icons/icon_b_t_probability.svg | 1 + limboai/icons/icon_b_t_repeat.svg | 1 + limboai/icons/icon_b_t_repeat_until_failure.svg | 1 + limboai/icons/icon_b_t_repeat_until_success.svg | 1 + limboai/icons/icon_b_t_run_limit.svg | 1 + limboai/icons/icon_b_t_succeed.svg | 1 + limboai/icons/icon_b_t_time_limit.svg | 1 + limboai/icons/icon_b_t_wait.svg | 1 + limboai/register_types.cpp | 3 +++ 18 files changed, 41 insertions(+) create mode 100644 limboai/bt/bt_fail.cpp create mode 100644 limboai/bt/bt_fail.h create mode 100644 limboai/icons/icon_b_t_always_fail.svg create mode 100644 limboai/icons/icon_b_t_always_succeed.svg create mode 100644 limboai/icons/icon_b_t_cooldown.svg create mode 100644 limboai/icons/icon_b_t_delay.svg create mode 100644 limboai/icons/icon_b_t_fail.svg create mode 100644 limboai/icons/icon_b_t_invert.svg create mode 100644 limboai/icons/icon_b_t_limit.svg create mode 100644 limboai/icons/icon_b_t_probability.svg create mode 100644 limboai/icons/icon_b_t_repeat.svg create mode 100644 limboai/icons/icon_b_t_repeat_until_failure.svg create mode 100644 limboai/icons/icon_b_t_repeat_until_success.svg create mode 100644 limboai/icons/icon_b_t_run_limit.svg create mode 100644 limboai/icons/icon_b_t_succeed.svg create mode 100644 limboai/icons/icon_b_t_time_limit.svg create mode 100644 limboai/icons/icon_b_t_wait.svg diff --git a/limboai/bt/bt_fail.cpp b/limboai/bt/bt_fail.cpp new file mode 100644 index 0000000..82e5b13 --- /dev/null +++ b/limboai/bt/bt_fail.cpp @@ -0,0 +1,7 @@ +/* bt_fail.cpp */ + +#include "bt_fail.h" + +int BTFail::_tick(float p_delta) { + return FAILURE; +} diff --git a/limboai/bt/bt_fail.h b/limboai/bt/bt_fail.h new file mode 100644 index 0000000..88689b6 --- /dev/null +++ b/limboai/bt/bt_fail.h @@ -0,0 +1,16 @@ +/* bt_fail.h */ + +#ifndef BT_FAIL_H +#define BT_FAIL_H + +#include "bt_action.h" +#include "core/object.h" + +class BTFail : public BTAction { + GDCLASS(BTFail, BTAction); + +protected: + virtual int _tick(float p_delta); +}; + +#endif // BT_FAIL_H \ No newline at end of file diff --git a/limboai/icons/icon_b_t_always_fail.svg b/limboai/icons/icon_b_t_always_fail.svg new file mode 100644 index 0000000..5a57fd8 --- /dev/null +++ b/limboai/icons/icon_b_t_always_fail.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/icons/icon_b_t_always_succeed.svg b/limboai/icons/icon_b_t_always_succeed.svg new file mode 100644 index 0000000..656f23a --- /dev/null +++ b/limboai/icons/icon_b_t_always_succeed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/icons/icon_b_t_cooldown.svg b/limboai/icons/icon_b_t_cooldown.svg new file mode 100644 index 0000000..02cc1c6 --- /dev/null +++ b/limboai/icons/icon_b_t_cooldown.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/icons/icon_b_t_delay.svg b/limboai/icons/icon_b_t_delay.svg new file mode 100644 index 0000000..02cc1c6 --- /dev/null +++ b/limboai/icons/icon_b_t_delay.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/icons/icon_b_t_fail.svg b/limboai/icons/icon_b_t_fail.svg new file mode 100644 index 0000000..5a57fd8 --- /dev/null +++ b/limboai/icons/icon_b_t_fail.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/icons/icon_b_t_invert.svg b/limboai/icons/icon_b_t_invert.svg new file mode 100644 index 0000000..0daf913 --- /dev/null +++ b/limboai/icons/icon_b_t_invert.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/icons/icon_b_t_limit.svg b/limboai/icons/icon_b_t_limit.svg new file mode 100644 index 0000000..51d399c --- /dev/null +++ b/limboai/icons/icon_b_t_limit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/icons/icon_b_t_probability.svg b/limboai/icons/icon_b_t_probability.svg new file mode 100644 index 0000000..9a4c991 --- /dev/null +++ b/limboai/icons/icon_b_t_probability.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/icons/icon_b_t_repeat.svg b/limboai/icons/icon_b_t_repeat.svg new file mode 100644 index 0000000..b55ce34 --- /dev/null +++ b/limboai/icons/icon_b_t_repeat.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/icons/icon_b_t_repeat_until_failure.svg b/limboai/icons/icon_b_t_repeat_until_failure.svg new file mode 100644 index 0000000..9bfb4c8 --- /dev/null +++ b/limboai/icons/icon_b_t_repeat_until_failure.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/icons/icon_b_t_repeat_until_success.svg b/limboai/icons/icon_b_t_repeat_until_success.svg new file mode 100644 index 0000000..cd46fb3 --- /dev/null +++ b/limboai/icons/icon_b_t_repeat_until_success.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/icons/icon_b_t_run_limit.svg b/limboai/icons/icon_b_t_run_limit.svg new file mode 100644 index 0000000..51d399c --- /dev/null +++ b/limboai/icons/icon_b_t_run_limit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/icons/icon_b_t_succeed.svg b/limboai/icons/icon_b_t_succeed.svg new file mode 100644 index 0000000..656f23a --- /dev/null +++ b/limboai/icons/icon_b_t_succeed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/icons/icon_b_t_time_limit.svg b/limboai/icons/icon_b_t_time_limit.svg new file mode 100644 index 0000000..51d399c --- /dev/null +++ b/limboai/icons/icon_b_t_time_limit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/icons/icon_b_t_wait.svg b/limboai/icons/icon_b_t_wait.svg new file mode 100644 index 0000000..935727c --- /dev/null +++ b/limboai/icons/icon_b_t_wait.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/limboai/register_types.cpp b/limboai/register_types.cpp index d67133d..c3f4f48 100644 --- a/limboai/register_types.cpp +++ b/limboai/register_types.cpp @@ -14,6 +14,7 @@ #include "bt/bt_delay.h" #include "bt/bt_dynamic_selector.h" #include "bt/bt_dynamic_sequence.h" +#include "bt/bt_fail.h" #include "bt/bt_invert.h" #include "bt/bt_parallel.h" #include "bt/bt_probability.h" @@ -59,6 +60,8 @@ void register_limboai_types() { ClassDB::register_class(); ClassDB::register_class(); + ClassDB::register_class(); + LimboStringNames::create(); }