mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-24 00:26:16 +02:00
base xp cost + work penalty
This commit is contained in:
parent
d2fdaace80
commit
2f30e19573
13 changed files with 222 additions and 154 deletions
|
|
@ -289,11 +289,10 @@ object ConfigOptions {
|
|||
*/
|
||||
fun workPenaltyPart(type: AnvilUseType): WorkPenaltyPart {
|
||||
val config = ConfigHolder.DEFAULT_CONFIG.config
|
||||
val path = WORK_PENALTY_ROOT + "." + type.typeName
|
||||
|
||||
// Find values
|
||||
val defaultPenalty = type.defaultPenalty
|
||||
val section = config.getConfigurationSection(path) ?: return defaultPenalty
|
||||
val section = config.getConfigurationSection(type.path) ?: return defaultPenalty
|
||||
|
||||
val penaltyIncrease = section.getBoolean(WORK_PENALTY_INCREASE, defaultPenalty.penaltyIncrease)
|
||||
val penaltyAdditive = section.getBoolean(WORK_PENALTY_ADDITIVE, defaultPenalty.penaltyAdditive)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue