Compare commits

..

No commits in common. "a2a62f636bce1d1a94ece34739ffc7db889f7c60" and "09185211ffdec7e6e15b2ffa300e953649c5336a" have entirely different histories.

10 changed files with 20 additions and 30 deletions

View File

@ -24,9 +24,8 @@ void BTCheckVar::set_check_type(LimboUtility::CheckType p_check_type) {
void BTCheckVar::set_value(const Ref<BBVariant> &p_value) { void BTCheckVar::set_value(const Ref<BBVariant> &p_value) {
value = p_value; value = p_value;
emit_changed(); emit_changed();
if (Engine::get_singleton()->is_editor_hint() && value.is_valid() && if (Engine::get_singleton()->is_editor_hint() && value.is_valid()) {
!value->is_connected(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed))) { value->connect(LW_NAME(changed), Callable(this, LW_NAME(emit_changed)));
value->connect(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed));
} }
} }

View File

@ -48,9 +48,8 @@ void BTSetVar::set_variable(const StringName &p_variable) {
void BTSetVar::set_value(const Ref<BBVariant> &p_value) { void BTSetVar::set_value(const Ref<BBVariant> &p_value) {
value = p_value; value = p_value;
emit_changed(); emit_changed();
if (Engine::get_singleton()->is_editor_hint() && value.is_valid() && if (Engine::get_singleton()->is_editor_hint() && value.is_valid()) {
!value->is_connected(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed))) { value->connect(LW_NAME(changed), Callable(this, LW_NAME(emit_changed)));
value->connect(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed));
} }
} }

View File

@ -16,9 +16,8 @@
void BTAwaitAnimation::set_animation_player(Ref<BBNode> p_animation_player) { void BTAwaitAnimation::set_animation_player(Ref<BBNode> p_animation_player) {
animation_player_param = p_animation_player; animation_player_param = p_animation_player;
emit_changed(); emit_changed();
if (Engine::get_singleton()->is_editor_hint() && animation_player_param.is_valid() && if (Engine::get_singleton()->is_editor_hint() && animation_player_param.is_valid()) {
!animation_player_param->is_connected(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed))) { animation_player_param->connect(LW_NAME(changed), Callable(this, LW_NAME(emit_changed)));
animation_player_param->connect(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed));
} }
} }

View File

@ -24,9 +24,8 @@ void BTCheckAgentProperty::set_check_type(LimboUtility::CheckType p_check_type)
void BTCheckAgentProperty::set_value(Ref<BBVariant> p_value) { void BTCheckAgentProperty::set_value(Ref<BBVariant> p_value) {
value = p_value; value = p_value;
emit_changed(); emit_changed();
if (Engine::get_singleton()->is_editor_hint() && value.is_valid() && if (Engine::get_singleton()->is_editor_hint() && value.is_valid()) {
!value->is_connected(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed))) { value->connect(LW_NAME(changed), Callable(this, LW_NAME(emit_changed)));
value->connect(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed));
} }
} }

View File

@ -16,9 +16,8 @@
void BTPauseAnimation::set_animation_player(Ref<BBNode> p_animation_player) { void BTPauseAnimation::set_animation_player(Ref<BBNode> p_animation_player) {
animation_player_param = p_animation_player; animation_player_param = p_animation_player;
emit_changed(); emit_changed();
if (Engine::get_singleton()->is_editor_hint() && animation_player_param.is_valid() && if (Engine::get_singleton()->is_editor_hint() && animation_player_param.is_valid()) {
!animation_player_param->is_connected(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed))) { animation_player_param->connect(LW_NAME(changed), Callable(this, LW_NAME(emit_changed)));
animation_player_param->connect(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed));
} }
} }

View File

@ -16,9 +16,8 @@
void BTPlayAnimation::set_animation_player(Ref<BBNode> p_animation_player) { void BTPlayAnimation::set_animation_player(Ref<BBNode> p_animation_player) {
animation_player_param = p_animation_player; animation_player_param = p_animation_player;
emit_changed(); emit_changed();
if (Engine::get_singleton()->is_editor_hint() && animation_player_param.is_valid() && if (Engine::get_singleton()->is_editor_hint() && animation_player_param.is_valid()) {
!animation_player_param->is_connected(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed))) { animation_player_param->connect(LW_NAME(changed), Callable(this, LW_NAME(emit_changed)));
animation_player_param->connect(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed));
} }
} }

View File

@ -19,9 +19,8 @@ void BTSetAgentProperty::set_property(StringName p_prop) {
void BTSetAgentProperty::set_value(Ref<BBVariant> p_value) { void BTSetAgentProperty::set_value(Ref<BBVariant> p_value) {
value = p_value; value = p_value;
emit_changed(); emit_changed();
if (Engine::get_singleton()->is_editor_hint() && value.is_valid() && if (Engine::get_singleton()->is_editor_hint() && value.is_valid()) {
!value->is_connected(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed))) { value->connect(LW_NAME(changed), Callable(this, LW_NAME(emit_changed)));
value->connect(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed));
} }
} }

View File

@ -16,9 +16,8 @@
void BTStopAnimation::set_animation_player(Ref<BBNode> p_animation_player) { void BTStopAnimation::set_animation_player(Ref<BBNode> p_animation_player) {
animation_player_param = p_animation_player; animation_player_param = p_animation_player;
emit_changed(); emit_changed();
if (Engine::get_singleton()->is_editor_hint() && animation_player_param.is_valid() && if (Engine::get_singleton()->is_editor_hint() && animation_player_param.is_valid()) {
!animation_player_param->is_connected(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed))) { animation_player_param->connect(LW_NAME(changed), Callable(this, LW_NAME(emit_changed)));
animation_player_param->connect(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed));
} }
} }

View File

@ -28,9 +28,8 @@ void BTCallMethod::set_method(const StringName &p_method_name) {
void BTCallMethod::set_node_param(const Ref<BBNode> &p_object) { void BTCallMethod::set_node_param(const Ref<BBNode> &p_object) {
node_param = p_object; node_param = p_object;
emit_changed(); emit_changed();
if (Engine::get_singleton()->is_editor_hint() && node_param.is_valid() && if (Engine::get_singleton()->is_editor_hint() && node_param.is_valid()) {
!node_param->is_connected(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed))) { node_param->connect(LW_NAME(changed), Callable(this, LW_NAME(emit_changed)));
node_param->connect(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed));
} }
} }

View File

@ -29,9 +29,8 @@ void BTEvaluateExpression::set_expression_string(const String &p_expression_stri
void BTEvaluateExpression::set_node_param(Ref<BBNode> p_object) { void BTEvaluateExpression::set_node_param(Ref<BBNode> p_object) {
node_param = p_object; node_param = p_object;
emit_changed(); emit_changed();
if (Engine::get_singleton()->is_editor_hint() && node_param.is_valid() && if (Engine::get_singleton()->is_editor_hint() && node_param.is_valid()) {
!node_param->is_connected(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed))) { node_param->connect(LW_NAME(changed), Callable(this, LW_NAME(emit_changed)));
node_param->connect(LW_NAME(changed), callable_mp((Resource *)this, &Resource::emit_changed));
} }
} }