Implements some necessary code for the scrapper
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good

Implements ignored salvage
Implements salvage-able items
Adds some TODOs
Implements salvage fail chance
Moves several methods to ItemHelper
Adds option for allowing extended salvage
This commit is contained in:
2023-12-30 13:56:33 +01:00
parent 6872dadca8
commit dfae68050e
13 changed files with 482 additions and 165 deletions

View File

@ -122,6 +122,13 @@ scrapper:
# Whether enchanted salvaged items should return some amount of exp upon salvage
giveExperience: true
# Items ignored during salvage calculation. This follows the format: "MATERIAL[,MATERIAL2][,MATERIAL3]:IGNORED", so
# the material or materials listed will ignore the material specified after the ":" when calculating salvage
# (* matches any character). This causes the player to lose some items during salvaging, but can prevent cases
# where a diamond pickaxe is salvaged and only sticks are returned.
ignoredSalvage:
- "*_SHOVEL,*_PICKAXE,*_AXE,*_HOE,*_SWORD:STICK"
# The settings which are set to any new scrapper NPC. To change any of these settings for an existing NPC, you must
# change the Citizens NPC file, or use the /scrapper command
@ -150,6 +157,9 @@ scrapper:
# The title describing the scrapper's usage/speciality (e.x armor-scrapper, tool-scrapper, weapon-scrapper)
scrapperTitle: "scrapper"
# Whether to enable salvaging of non-repairable items, such as planks
extendedSalvageEnabled: false
# Default values for messages used by NPCs
messages:
# The message to display when another player is using the scrapper
@ -177,4 +187,7 @@ scrapper:
itemChangedMessage: "&cThat's not the item you wanted to salvage before!"
# The message to display once the scrapper starts salvaging
startSalvageMessage: "&eOk, let's see what I can do..."
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!"