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

@@ -1992,9 +1992,9 @@ block.plasma-bore.name = Plasma Bore
block.large-plasma-bore.name = Large Plasma Bore block.large-plasma-bore.name = Large Plasma Bore
block.impact-drill.name = Impact Drill block.impact-drill.name = Impact Drill
block.eruption-drill.name = Eruption Drill block.eruption-drill.name = Eruption Drill
block.core-bastion.name = Core Bastion block.core-bastion.name = Core: Bastion
block.core-citadel.name = Core Citadel block.core-citadel.name = Core: Citadel
block.core-acropolis.name = Core Acropolis block.core-acropolis.name = Core: Acropolis
block.reinforced-container.name = Reinforced Container block.reinforced-container.name = Reinforced Container
block.reinforced-vault.name = Reinforced Vault block.reinforced-vault.name = Reinforced Vault
block.breach.name = Breach block.breach.name = Breach

View File

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