Improves messages when trying to salvage an item
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
Implements unimplemented too damaged for salvage message Adds two new messages explaining whether an item will produce full or partial salvage
This commit is contained in:
@ -75,8 +75,8 @@ public enum BlacksmithSetting implements Setting {
|
||||
*/
|
||||
REFORGE_ABLE_ITEMS("reforgeAbleItems", SettingValueType.REFORGE_ABLE_ITEMS, "",
|
||||
"The items a blacksmith is able to reforge. Setting this only " +
|
||||
"allows NPCs to repair the listed items. This should be set for each individual NPC, and should not be set" +
|
||||
" here, unless you want to restrict NPCs which have not been set up yet.", true, false),
|
||||
"allows NPCs to repair the listed items. This should be set for each individual NPC.",
|
||||
true, false),
|
||||
|
||||
/**
|
||||
* The setting for the title used to display which kind of blacksmith the NPC is
|
||||
|
@ -136,6 +136,7 @@ public class ScrapperNPCSettings implements TraitSettings<ScrapperSetting> {
|
||||
*
|
||||
* @return <p>The message to use for displaying salvage cost</p>
|
||||
*/
|
||||
@NotNull
|
||||
public String getCostMessage() {
|
||||
return asString(ScrapperSetting.COST_MESSAGE);
|
||||
}
|
||||
@ -310,4 +311,34 @@ public class ScrapperNPCSettings implements TraitSettings<ScrapperSetting> {
|
||||
return asString(ScrapperSetting.INSUFFICIENT_FUNDS_MESSAGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the message to display if an item is too damaged to produce any salvage
|
||||
*
|
||||
* @return <p>The no salvage message</p>
|
||||
*/
|
||||
@NotNull
|
||||
public String getTooDamagedMessage() {
|
||||
return asString(ScrapperSetting.TOO_DAMAGED_FOR_SALVAGE_MESSAGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the message to display when explaining that full salvage will be given for an item
|
||||
*
|
||||
* @return <p>The full salvage message</p>
|
||||
*/
|
||||
@NotNull
|
||||
public String getFullSalvageMessage() {
|
||||
return asString(ScrapperSetting.FULL_SALVAGE_MESSAGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the message to display when explaining that only partial salvage will be given for an item
|
||||
*
|
||||
* @return <p>The partial salvage message</p>
|
||||
*/
|
||||
@NotNull
|
||||
public String getPartialSalvageMessage() {
|
||||
return asString(ScrapperSetting.PARTIAL_SALVAGE_MESSAGE);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -34,8 +34,8 @@ public enum ScrapperSetting implements Setting {
|
||||
*/
|
||||
SALVAGE_ABLE_ITEMS("salvageAbleItems", SettingValueType.REFORGE_ABLE_ITEMS, "",
|
||||
"The items a blacksmith is able to salvage. Setting this only " +
|
||||
"allows NPCs to repair the listed items. This should be set for each individual NPC, and should not be " +
|
||||
"set here, unless you want to restrict NPCs which have not been set up yet", true, false),
|
||||
"allows NPCs to repair the listed items. This should be set for each individual NPC",
|
||||
true, false),
|
||||
|
||||
/**
|
||||
* The maximum amount of seconds a player may need to wait for the reforging to finish
|
||||
@ -151,9 +151,23 @@ public enum ScrapperSetting implements Setting {
|
||||
* The message displayed when displaying the cost of reforging the held item to the player
|
||||
*/
|
||||
COST_MESSAGE("costMessage", SettingValueType.STRING,
|
||||
"&eIt will cost &a{cost}&e to salvage that item! Click again to salvage!",
|
||||
"&eIt will cost &a{cost}&e to salvage that item! {yield} Click again to salvage!",
|
||||
"The message to display when informing a player about the salvaging cost", true, true),
|
||||
|
||||
/**
|
||||
* The message displayed when explaining that all items will be returned as salvage
|
||||
*/
|
||||
FULL_SALVAGE_MESSAGE("fullSalvageMessage", SettingValueType.STRING,
|
||||
"&aI should be able to extract all components from that pristine item.&r",
|
||||
"The message to display when explaining expected full yield as part of the cost message", true, true),
|
||||
|
||||
/**
|
||||
* The message displayed when explaining that only some items will be returned as salvage
|
||||
*/
|
||||
PARTIAL_SALVAGE_MESSAGE("partialSalvageMessage", SettingValueType.STRING,
|
||||
"&cI cannot extract all components from that damaged item.&r",
|
||||
"The message to display when explaining expected partial yield as part of the cost message", true, true),
|
||||
|
||||
/*------------------
|
||||
| Global settings |
|
||||
------------------*/
|
||||
|
Reference in New Issue
Block a user