forked from Upstream/mmocore
Added the status unlockable for path in skill-tree.yml (Check wiki), make sure to reload gui/skill-tree.yml to benefit from this modification.
This commit is contained in:
parent
4065737f35
commit
178bb35d59
@ -3,5 +3,6 @@ package net.Indyuce.mmocore.gui.skilltree.display;
|
||||
public enum PathStatus {
|
||||
LOCKED,
|
||||
FULLY_LOCKED,
|
||||
UNLOCKABLE,
|
||||
UNLOCKED;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user