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