mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-27 23:11:12 -08:00
Made AttributeCrafters consume a constant amount of liquid
+ cultivator water requirement decrease
This commit is contained in:
parent
6cb6a76ef3
commit
ec30232c4e
2 changed files with 11 additions and 8 deletions
|
|
@ -1046,7 +1046,7 @@ public class Blocks implements ContentList{
|
|||
|
||||
mechanicalPump = new Pump("mechanical-pump"){{
|
||||
requirements(Category.liquid, with(Items.copper, 15, Items.metaglass, 10));
|
||||
pumpAmount = 0.11f;
|
||||
pumpAmount = 7f / 60f;
|
||||
}};
|
||||
|
||||
rotaryPump = new Pump("rotary-pump"){{
|
||||
|
|
@ -1337,14 +1337,13 @@ public class Blocks implements ContentList{
|
|||
maxBoost = 2f;
|
||||
|
||||
consumes.power(80f / 60f);
|
||||
consumes.liquid(Liquids.water, 20f / 60f);
|
||||
consumes.liquid(Liquids.water, 18f / 60f);
|
||||
}};
|
||||
|
||||
oilExtractor = new Fracker("oil-extractor"){{
|
||||
requirements(Category.production, with(Items.copper, 150, Items.graphite, 175, Items.lead, 115, Items.thorium, 115, Items.silicon, 75));
|
||||
result = Liquids.oil;
|
||||
updateEffect = Fx.pulverize;
|
||||
liquidCapacity = 50f;
|
||||
updateEffectChance = 0.05f;
|
||||
pumpAmount = 0.25f;
|
||||
size = 3;
|
||||
|
|
|
|||
|
|
@ -26,11 +26,11 @@ public class AttributeCrafter extends GenericCrafter{
|
|||
public void setBars(){
|
||||
super.setBars();
|
||||
|
||||
bars.add("efficiency", entity ->
|
||||
bars.add("efficiency", (AttributeCrafterBuild entity) ->
|
||||
new Bar(() ->
|
||||
Core.bundle.format("bar.efficiency", (int)(entity.efficiency() * 100)),
|
||||
Core.bundle.format("bar.efficiency", (int)(entity.efficiencyScale() * 100)),
|
||||
() -> Pal.lightOrange,
|
||||
entity::efficiency));
|
||||
entity::efficiencyScale));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -44,8 +44,12 @@ public class AttributeCrafter extends GenericCrafter{
|
|||
public float attrsum;
|
||||
|
||||
@Override
|
||||
public float efficiency(){
|
||||
return (baseEfficiency + Math.min(maxBoost, boostScale * attrsum) + attribute.env()) * super.efficiency();
|
||||
public float getProgressIncrease(float base){
|
||||
return super.getProgressIncrease(base) * efficiencyScale();
|
||||
}
|
||||
|
||||
public float efficiencyScale(){
|
||||
return baseEfficiency + Math.min(maxBoost, boostScale * attrsum) + attribute.env();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue