diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoquests/gui/components/PositionedComponent.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoquests/gui/components/PositionedComponent.kt index 590e163..4fe9231 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoquests/gui/components/PositionedComponent.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoquests/gui/components/PositionedComponent.kt @@ -22,17 +22,7 @@ interface PositionedComponent : GUIComponent { fun MenuBuilder.addComponent( component: PositionedComponent -) = if (component.isEnabled) addComponent( - component.row, - component.column, - component -) else this - -fun MenuBuilder.addComponent( - layer: MenuLayer, - component: PositionedComponent -) = if (component.isEnabled) addComponent( - layer, +): MenuBuilder = if (component.isEnabled) addComponent( component.row, component.column, component diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoquests/quests/Quest.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoquests/quests/Quest.kt index 3550332..d297b12 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoquests/quests/Quest.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoquests/quests/Quest.kt @@ -75,19 +75,19 @@ class Quest( private val rewardMessages = config.getStrings("reward-messages") - val rewards = Effects.compileChain( + private val rewards = Effects.compileChain( config.getSubsections("rewards"), NormalExecutorFactory.create(), ViolationContext(plugin, "quest $id rewards") ) - val startEffects = Effects.compileChain( + private val startEffects = Effects.compileChain( config.getSubsections("start-effects"), NormalExecutorFactory.create(), ViolationContext(plugin, "quest $id start-effects") ) - val startConditions = Conditions.compile( + private val startConditions = Conditions.compile( config.getSubsections("start-conditions"), ViolationContext(plugin, "quest $id start-conditions") ) diff --git a/eco-core/core-plugin/src/main/resources/quests/_example.yml b/eco-core/core-plugin/src/main/resources/quests/_example.yml index d5d82dc..1e96c59 100644 --- a/eco-core/core-plugin/src/main/resources/quests/_example.yml +++ b/eco-core/core-plugin/src/main/resources/quests/_example.yml @@ -1,6 +1,12 @@ -name: "Example Quest" +# The ID of the quest is the name of the .yml file, +# for example master_miner.yml has the ID of master_miner +# You can place quests anywhere in this folder, +# including in subfolders if you want to organize your quest configs +# _example.yml is not loaded. -description: "Example Description" +name: "Example Quest" # The name of the quest in-game + +description: "Example Description" # The quest description gui: enabled: true # If the quest should be shown in the GUI @@ -35,4 +41,5 @@ start-effects: [ ] # A list of conditions required to start the quest. # The quest will be automatically started when these conditions are met. # Read https://plugins.auxilor.io/conditions/configuring-a-condition +# not-met-lines will show up on the GUI item if gui.always is true. start-conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/tasks/_example.yml b/eco-core/core-plugin/src/main/resources/tasks/_example.yml index 84b03a4..cf20319 100644 --- a/eco-core/core-plugin/src/main/resources/tasks/_example.yml +++ b/eco-core/core-plugin/src/main/resources/tasks/_example.yml @@ -1,3 +1,12 @@ +# The ID of the task is the name of the .yml file, +# for example break_100_stone.yml has the ID of break_100_stone +# You can place tasks anywhere in this folder, +# including in subfolders if you want to organize your quest task +# _example.yml is not loaded. + +# If multiple quests have the same task, gaining task XP for one quest +# will gain task XP for all quests with the same task. + # The description of the task. # %xp% - The amount of XP the player has in this task # %required-xp% - The amount of XP required to complete this task