diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/skilltree/display/PathStatus.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/skilltree/display/PathStatus.java index 2ef266c5..989a4b4b 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/skilltree/display/PathStatus.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/skilltree/display/PathStatus.java @@ -3,5 +3,6 @@ package net.Indyuce.mmocore.gui.skilltree.display; public enum PathStatus { LOCKED, FULLY_LOCKED, + UNLOCKABLE, UNLOCKED; } diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/skilltree/SkillTreePath.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/skilltree/SkillTreePath.java index 7bef7757..ef5438fa 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/skilltree/SkillTreePath.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/skilltree/SkillTreePath.java @@ -7,9 +7,14 @@ import net.Indyuce.mmocore.skilltree.tree.SkillTree; public record SkillTreePath(SkillTree tree, IntegerCoordinates coordinates, SkillTreeNode from, SkillTreeNode to) { public PathStatus getStatus(PlayerData playerData) { - if (playerData.getNodeStatus(from) == NodeStatus.UNLOCKED && playerData.getNodeStatus(to) == NodeStatus.UNLOCKED) { + NodeStatus fromStatus = playerData.getNodeStatus(from); + NodeStatus toStatus = playerData.getNodeStatus(to); + if (fromStatus == NodeStatus.UNLOCKED && toStatus == NodeStatus.UNLOCKED) return PathStatus.UNLOCKED; - } + if ((fromStatus == NodeStatus.UNLOCKABLE && toStatus == NodeStatus.LOCKED) || (fromStatus == NodeStatus.LOCKED && toStatus == NodeStatus.UNLOCKABLE)) + return PathStatus.UNLOCKABLE; + if (fromStatus == NodeStatus.FULLY_LOCKED || toStatus == NodeStatus.FULLY_LOCKED) + return PathStatus.FULLY_LOCKED; return PathStatus.LOCKED; } diff --git a/MMOCore-Dist/src/main/resources/default/gui/skill-tree.yml b/MMOCore-Dist/src/main/resources/default/gui/skill-tree.yml index 421d205c..ba5ef85e 100644 --- a/MMOCore-Dist/src/main/resources/default/gui/skill-tree.yml +++ b/MMOCore-Dist/src/main/resources/default/gui/skill-tree.yml @@ -123,6 +123,28 @@ display: default: item: "WHITE_DYE" custom-model-data: 0 + unlockable: + up: + item: "BLUE_DYE" + custom-model-data: 0 + up-right: + item: "BLUE_DYE" + custom-model-data: 0 + up-left: + item: "BLUE_DYE" + custom-model-data: 0 + down-right: + item: "BLUE_DYE" + custom-model-data: 0 + down-left: + item: "BLUE_DYE" + custom-model-data: 0 + right: + item: "BLUE_DYE" + custom-model-data: 0 + default: + item: "BLUE_DYE" + custom-model-data: 0 locked: up: item: "GRAY_DYE" diff --git a/MMOCore-Dist/src/main/resources/default/skill-trees/combat.yml b/MMOCore-Dist/src/main/resources/default/skill-trees/combat.yml index 2906b99f..712db49e 100644 --- a/MMOCore-Dist/src/main/resources/default/skill-trees/combat.yml +++ b/MMOCore-Dist/src/main/resources/default/skill-trees/combat.yml @@ -551,6 +551,28 @@ paths: # default: # item: "WHITE_DYE" # custom-model-data: 0 +# unlockable: +# up: +# item: "BLUE_DYE" +# custom-model-data: 0 +# up-right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# up-left: +# item: "BLUE_DYE" +# custom-model-data: 0 +# down-right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# down-left: +# item: "BLUE_DYE" +# custom-model-data: 0 +# right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# default: +# item: "BLUE_DYE" +# custom-model-data: 0 # locked: # up: # item: "GRAY_DYE" diff --git a/MMOCore-Dist/src/main/resources/default/skill-trees/general.yml b/MMOCore-Dist/src/main/resources/default/skill-trees/general.yml index 06dd5058..9ecb0199 100644 --- a/MMOCore-Dist/src/main/resources/default/skill-trees/general.yml +++ b/MMOCore-Dist/src/main/resources/default/skill-trees/general.yml @@ -522,6 +522,28 @@ nodes: # default: # item: "WHITE_DYE" # custom-model-data: 0 +# unlockable: +# up: +# item: "BLUE_DYE" +# custom-model-data: 0 +# up-right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# up-left: +# item: "BLUE_DYE" +# custom-model-data: 0 +# down-right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# down-left: +# item: "BLUE_DYE" +# custom-model-data: 0 +# right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# default: +# item: "BLUE_DYE" +# custom-model-data: 0 # locked: # up: # item: "GRAY_DYE" diff --git a/MMOCore-Dist/src/main/resources/default/skill-trees/mage-arcane-mage.yml b/MMOCore-Dist/src/main/resources/default/skill-trees/mage-arcane-mage.yml index cd12d314..42a5634b 100644 --- a/MMOCore-Dist/src/main/resources/default/skill-trees/mage-arcane-mage.yml +++ b/MMOCore-Dist/src/main/resources/default/skill-trees/mage-arcane-mage.yml @@ -493,6 +493,7 @@ nodes: + # This section is to have a specific display for the skill tree in the GUI. # It is optional as if you don't fill it the config in gui/skill-tree.yml will be used. # For each node it will first look if the node has a specific display, if not it will look if @@ -522,6 +523,28 @@ nodes: # default: # item: "WHITE_DYE" # custom-model-data: 0 +# unlockable: +# up: +# item: "BLUE_DYE" +# custom-model-data: 0 +# up-right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# up-left: +# item: "BLUE_DYE" +# custom-model-data: 0 +# down-right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# down-left: +# item: "BLUE_DYE" +# custom-model-data: 0 +# right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# default: +# item: "BLUE_DYE" +# custom-model-data: 0 # locked: # up: # item: "GRAY_DYE" diff --git a/MMOCore-Dist/src/main/resources/default/skill-trees/rogue-marksman.yml b/MMOCore-Dist/src/main/resources/default/skill-trees/rogue-marksman.yml index b83f6a50..3a2966d8 100644 --- a/MMOCore-Dist/src/main/resources/default/skill-trees/rogue-marksman.yml +++ b/MMOCore-Dist/src/main/resources/default/skill-trees/rogue-marksman.yml @@ -489,6 +489,7 @@ nodes: + # This section is to have a specific display for the skill tree in the GUI. # It is optional as if you don't fill it the config in gui/skill-tree.yml will be used. # For each node it will first look if the node has a specific display, if not it will look if @@ -518,6 +519,28 @@ nodes: # default: # item: "WHITE_DYE" # custom-model-data: 0 +# unlockable: +# up: +# item: "BLUE_DYE" +# custom-model-data: 0 +# up-right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# up-left: +# item: "BLUE_DYE" +# custom-model-data: 0 +# down-right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# down-left: +# item: "BLUE_DYE" +# custom-model-data: 0 +# right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# default: +# item: "BLUE_DYE" +# custom-model-data: 0 # locked: # up: # item: "GRAY_DYE" diff --git a/MMOCore-Dist/src/main/resources/default/skill-trees/warrior-paladin.yml b/MMOCore-Dist/src/main/resources/default/skill-trees/warrior-paladin.yml index 98bcc788..a95ebd31 100644 --- a/MMOCore-Dist/src/main/resources/default/skill-trees/warrior-paladin.yml +++ b/MMOCore-Dist/src/main/resources/default/skill-trees/warrior-paladin.yml @@ -517,6 +517,28 @@ nodes: # default: # item: "WHITE_DYE" # custom-model-data: 0 +# unlockable: +# up: +# item: "BLUE_DYE" +# custom-model-data: 0 +# up-right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# up-left: +# item: "BLUE_DYE" +# custom-model-data: 0 +# down-right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# down-left: +# item: "BLUE_DYE" +# custom-model-data: 0 +# right: +# item: "BLUE_DYE" +# custom-model-data: 0 +# default: +# item: "BLUE_DYE" +# custom-model-data: 0 # locked: # up: # item: "GRAY_DYE"