Hide update_mode for non-root HSMs
This commit is contained in:
parent
64df43c7c9
commit
bed04dbf87
|
@ -253,6 +253,13 @@ void LimboHSM::_initialize(Node *p_agent, const Ref<Blackboard> &p_blackboard) {
|
|||
}
|
||||
}
|
||||
|
||||
void LimboHSM::_validate_property(PropertyInfo &p_property) const {
|
||||
if (p_property.name == LW_NAME(update_mode) && !is_root()) {
|
||||
// Hide update_mode for non-root HSMs.
|
||||
p_property.usage = PROPERTY_USAGE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
void LimboHSM::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_POST_ENTER_TREE: {
|
||||
|
|
|
@ -64,6 +64,7 @@ protected:
|
|||
static void _bind_methods();
|
||||
|
||||
void _notification(int p_what);
|
||||
void _validate_property(PropertyInfo &p_property) const;
|
||||
|
||||
virtual void _initialize(Node *p_agent, const Ref<Blackboard> &p_blackboard) override;
|
||||
virtual bool _dispatch(const StringName &p_event, const Variant &p_cargo = Variant()) override;
|
||||
|
|
|
@ -156,6 +156,7 @@ LimboStringNames::LimboStringNames() {
|
|||
Tools = SN("Tools");
|
||||
Tree = SN("Tree");
|
||||
TripleBar = SN("TripleBar");
|
||||
update_mode = SN("update_mode");
|
||||
update_task = SN("update_task");
|
||||
update_tree = SN("update_tree");
|
||||
updated = SN("updated");
|
||||
|
|
|
@ -173,6 +173,7 @@ public:
|
|||
StringName Tools;
|
||||
StringName Tree;
|
||||
StringName TripleBar;
|
||||
StringName update_mode;
|
||||
StringName update_task;
|
||||
StringName update_tree;
|
||||
StringName updated;
|
||||
|
|
Loading…
Reference in New Issue