Added the ability to disable combo action nodes. Enabling them will come later.
This commit is contained in:
parent
dcaac98f50
commit
7505a70575
@ -150,8 +150,12 @@ const UComboActionGraphNode *UComboManagerComponent::FindActiveNodeData(const UC
|
||||
{
|
||||
if (ActionNode->GetComboInput() == Input && ActionNode->GetTriggerEvent() == EComboActionTriggerEvent::Activated)
|
||||
{
|
||||
ComboAction = ActionNode->GetComboAction();
|
||||
NextNode = ActionNode;
|
||||
// If we found the right node, only acknowledge it if it's enabled. Otherwise just skip it.
|
||||
if (ActionNode->bEnabled)
|
||||
{
|
||||
ComboAction = ActionNode->GetComboAction();
|
||||
NextNode = ActionNode;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ UComboActionGraphNode::UComboActionGraphNode()
|
||||
this->CompatibleGraphType = UComboActionGraph::StaticClass();
|
||||
|
||||
this->BackgroundColor = FLinearColor::Black;
|
||||
this->bEnabled = true;
|
||||
|
||||
this->bAllowInputNodes = true;
|
||||
this->bAllowOutputNodes = true;
|
||||
|
||||
@ -81,21 +81,29 @@ protected:
|
||||
#pragma region Editable
|
||||
public:
|
||||
/**
|
||||
* The array of allowed input classes for this Dialogue Node.
|
||||
*❗ Only nodes with classes from this array can be connected as inputs to this node.
|
||||
*❔ Can be used to restrict the types of inputs this node can accept.
|
||||
* Whether the node is enabled by default. Disabled nodes will be ignored by the
|
||||
* combo manager until they are enabled again programmatically. This allows actions
|
||||
* to be unlockable during gameplay.
|
||||
*/
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="Combo Input|Action")
|
||||
TArray<TSubclassOf<class UComboActionGraphNode>> AllowedInputClasses;
|
||||
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category="Combo Input|Action")
|
||||
uint8 bEnabled : 1;
|
||||
|
||||
/**
|
||||
* The maximum number of children nodes that this node can have.
|
||||
*❗ If this value is -1, then there is no limit on the number of children nodes.
|
||||
*❔ Can be used to enforce a maximum number of connections for certain types of nodes.
|
||||
* If this value is -1, then there is no limit on the number of children nodes.
|
||||
* Can be used to enforce a maximum number of connections for certain types of nodes.
|
||||
*/
|
||||
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category="Combo Input|Action")
|
||||
int32 MaxChildrenNodes = -1;
|
||||
|
||||
/**
|
||||
* The array of allowed input classes for this Dialogue Node.
|
||||
* Only nodes with classes from this array can be connected as inputs to this node.
|
||||
* Can be used to restrict the types of inputs this node can accept.
|
||||
*/
|
||||
UPROPERTY(BlueprintReadOnly, Category="Combo Input|Action")
|
||||
TArray<TSubclassOf<class UComboActionGraphNode>> AllowedInputClasses;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma endregion
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user