mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-08 23:07:33 +07:00
Allow for SingleTypeGenerators
to use only liquid. (#5900)
This commit is contained in:
@ -3,6 +3,7 @@ package mindustry.world.blocks.power;
|
|||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
|
|
||||||
public class SingleTypeGenerator extends ItemLiquidGenerator{
|
public class SingleTypeGenerator extends ItemLiquidGenerator{
|
||||||
|
public boolean useItems = true;
|
||||||
|
|
||||||
public SingleTypeGenerator(String name){
|
public SingleTypeGenerator(String name){
|
||||||
super(name);
|
super(name);
|
||||||
@ -11,11 +12,11 @@ public class SingleTypeGenerator extends ItemLiquidGenerator{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected float getItemEfficiency(Item item){
|
protected float getItemEfficiency(Item item){
|
||||||
return 1f;
|
return useItems ? 1f : 0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected float getLiquidEfficiency(Liquid liquid){
|
protected float getLiquidEfficiency(Liquid liquid){
|
||||||
return 0f;
|
return useItems ? 0f : 1f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user