Automatic consumeCoolant

This commit is contained in:
Anuken
2022-05-11 14:36:34 -04:00
parent 4d12ac8ed6
commit be9b7da892
3 changed files with 8 additions and 5 deletions

View File

@@ -2832,7 +2832,7 @@ public class Blocks{
health = 250;
inaccuracy = 2f;
rotateSpeed = 10f;
coolant = consume(new ConsumeCoolant(0.1f));
coolant = consumeCoolant(0.1f);
limitRange();
}};

View File

@@ -24,7 +24,6 @@ public class BaseTurret extends Block{
/** How much reload is lowered by for each unit of liquid of heat capacity. */
public float coolantMultiplier = 5f;
/** If not null, this consumer will be used for coolant. */
//TODO make automatic for mods?
public @Nullable ConsumeLiquidBase coolant;
public BaseTurret(String name){
@@ -41,6 +40,10 @@ public class BaseTurret extends Block{
@Override
public void init(){
if(coolant == null){
coolant = findConsumer(c -> c instanceof ConsumeCoolant);
}
//just makes things a little more convenient
if(coolant != null){
//TODO coolant fix