feat: Add configurable condenser amount multiplier
- Add condenserAmountMultiplier setting with default value 1.0
This commit is contained in:
@@ -370,6 +370,9 @@ public final class Settings {
|
||||
public Integer apprenticeUpgradeLimit = 5;
|
||||
public Integer advancedUpgradeLimit = 7;
|
||||
public Integer masterUpgradeLimit = 9;
|
||||
|
||||
/** <b>[Synchronised]</b> Multiplier for condenser upgrade mana regeneration amount */
|
||||
public double condenserAmountMultiplier = 1.0;
|
||||
|
||||
/**
|
||||
* <b>[Synchronised]</b> The maximum number of blocks a bookshelf can be from an arcane workbench or lectern to be
|
||||
@@ -964,6 +967,13 @@ public final class Settings {
|
||||
masterUpgradeLimit = property.getInt();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(DIFFICULTY_CATEGORY, "condenserAmountMultiplier", 1.0,
|
||||
"Multiplier for condenser upgrade mana regeneration amount. Higher values make condensers more effective.");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".condenser_amount_multiplier");
|
||||
property.setRequiresWorldRestart(true);
|
||||
condenserAmountMultiplier = property.getDouble();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
|
||||
|
||||
// These two aren't sliders because using a slider makes it difficult to fine-tune the numbers; the nature of a
|
||||
|
||||
@@ -241,7 +241,9 @@ public class ItemWand extends Item implements IWorkbenchItem, ISpellCastingItem,
|
||||
// Decrements wand damage (increases mana) every 1.5 seconds if it has a condenser upgrade
|
||||
if(!world.isRemote && !this.isManaFull(stack) && world.getTotalWorldTime() % Constants.CONDENSER_TICK_INTERVAL == 0){
|
||||
// If the upgrade level is 0, this does nothing anyway.
|
||||
this.rechargeMana(stack, WandHelper.getUpgradeLevel(stack, WizardryItems.condenser_upgrade));
|
||||
int baseAmount = WandHelper.getUpgradeLevel(stack, WizardryItems.condenser_upgrade);
|
||||
int amount = (int)(baseAmount * Wizardry.settings.condenserAmountMultiplier);
|
||||
this.rechargeMana(stack, amount);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,9 @@ public class TileEntityArcaneWorkbench extends TileEntity implements IInventory,
|
||||
if(stack.getItem() instanceof IManaStoringItem && !this.world.isRemote && !((IManaStoringItem)stack.getItem()).isManaFull(stack)
|
||||
&& this.world.getTotalWorldTime() % electroblob.wizardry.constants.Constants.CONDENSER_TICK_INTERVAL == 0){
|
||||
// If the upgrade level is 0, this does nothing anyway.
|
||||
((IManaStoringItem)stack.getItem()).rechargeMana(stack, WandHelper.getUpgradeLevel(stack, WizardryItems.condenser_upgrade));
|
||||
int baseAmount = WandHelper.getUpgradeLevel(stack, WizardryItems.condenser_upgrade);
|
||||
int amount = (int)(baseAmount * Wizardry.settings.condenserAmountMultiplier);
|
||||
((IManaStoringItem)stack.getItem()).rechargeMana(stack, amount);
|
||||
}
|
||||
|
||||
// The server doesn't care what these are, and there's no need for them to be synced or saved.
|
||||
|
||||
Reference in New Issue
Block a user