mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 11:17:11 +07:00
(Optionally) Scale efficiency of attribute crafters (#8433)
* Scale efficiency of attribute crafters * Make it optional :D * Call super
This commit is contained in:
parent
fcb44e4952
commit
0de2c95f6e
@ -16,6 +16,7 @@ public class AttributeCrafter extends GenericCrafter{
|
||||
public float minEfficiency = -1f;
|
||||
public float displayEfficiencyScale = 1f;
|
||||
public boolean displayEfficiency = true;
|
||||
public boolean scaleLiquidConsumption = false;
|
||||
|
||||
public AttributeCrafter(String name){
|
||||
super(name);
|
||||
@ -69,6 +70,11 @@ public class AttributeCrafter extends GenericCrafter{
|
||||
return baseEfficiency + Math.min(maxBoost, boostScale * attrsum) + attribute.env();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float efficiencyScale(){
|
||||
return scaleLiquidConsumption ? efficiencyMultiplier() : super.efficiencyScale();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pickedUp(){
|
||||
attrsum = 0f;
|
||||
|
Loading…
Reference in New Issue
Block a user