mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Small fix for upgrades on TileEntityElectrolyser.
This commit is contained in:
parent
34e818b83a
commit
6bc70ae105
@ -393,13 +393,13 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
|
|||||||
public int getDurationMetal() {
|
public int getDurationMetal() {
|
||||||
ElectrolysisMetalRecipe result = ElectrolyserMetalRecipes.getRecipe(slots[14]);
|
ElectrolysisMetalRecipe result = ElectrolyserMetalRecipes.getRecipe(slots[14]);
|
||||||
int base = result != null ? result.duration : 600;
|
int base = result != null ? result.duration : 600;
|
||||||
int speed = upgradeManager.getLevel(UpgradeType.SPEED) - upgradeManager.getLevel(UpgradeType.POWER);
|
int speed = upgradeManager.getLevel(UpgradeType.SPEED) - Math.min(upgradeManager.getLevel(UpgradeType.POWER), 1);
|
||||||
return (int) Math.ceil((base * Math.max(1F - 0.25F * speed, 0.2)));
|
return (int) Math.ceil((base * Math.max(1F - 0.25F * speed, 0.2)));
|
||||||
}
|
}
|
||||||
public int getDurationFluid() {
|
public int getDurationFluid() {
|
||||||
ElectrolysisRecipe result = ElectrolyserFluidRecipes.getRecipe(tanks[0].getTankType());
|
ElectrolysisRecipe result = ElectrolyserFluidRecipes.getRecipe(tanks[0].getTankType());
|
||||||
int base = result != null ? result.duration : 100;
|
int base = result != null ? result.duration : 100;
|
||||||
int speed = upgradeManager.getLevel(UpgradeType.SPEED) - upgradeManager.getLevel(UpgradeType.POWER);
|
int speed = upgradeManager.getLevel(UpgradeType.SPEED) - Math.min(upgradeManager.getLevel(UpgradeType.POWER), 1);
|
||||||
return (int) Math.ceil((base * Math.max(1F - 0.25F * speed, 0.2)));
|
return (int) Math.ceil((base * Math.max(1F - 0.25F * speed, 0.2)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user