Improves configuration migration, and fixes some issues
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good

Fixes incorrect dropItems instead of dropItem key in config.yml
Adds some missing dropper messages to config.yml
Adds proper migration keys for all known configuration options
Adds a modified version of Stargate's StargateYamlConfiguration to allow retaining comments during configuration migration.
Fixes the annoying "[]" is not a valid repairable item
Removes the use of data keys for the global configuration
This commit is contained in:
2024-05-04 17:40:21 +02:00
parent 8b8890c408
commit 757fcdf139
9 changed files with 587 additions and 152 deletions

View File

@ -139,7 +139,7 @@ scrapper:
defaults:
# Whether the item will drop materials resulting from scrapping on the ground, instead of putting them into the user's inventory
dropItems: true
dropItem: true
# The chance to fail a salvage, thus destroying the item (0-100)
failSalvageChance: 0
@ -175,8 +175,8 @@ scrapper:
# The message to display when the scrapper is still on a cool-down from the previous salvaging
coolDownUnexpiredMessage: "&cYou've already had your chance! Give me a break! I'll be ready {time}!"
# The message to display if the player tries to salvage an item the scrapper cannot salvage
cannotSalvageMessage: "&cI'm unable to salvage that item"
# The message to display when holding an item the blacksmith is unable to reforge
invalidItemMessage: "&cI'm sorry, but I'm a/an {title}, I don't know how to salvage that!"
# The message to display if salvaging the player's item would result in no salvage
tooDamagedForSalvageMessage: "&cThat item is too damaged to be salvaged into anything useful"
@ -193,5 +193,8 @@ scrapper:
# The message to display once the scrapper starts salvaging
startSalvageMessage: "&eOk, let's see what I can do..."
# The message to display when holding an item the blacksmith is unable to reforge
invalidItemMessage: "&cI'm sorry, but I'm a/an {title}, I don't know how to salvage that!"
# The message to display if the player is unable to pay the scrapper's fee
insufficientFundsMessage: "&cYou don't have enough money to salvage an item!"
# The message to display when explaining the shown item's salvage cost
costMessage: "&eIt will cost &a{cost}&e to salvage that item! Click again to salvage!"