Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -28,10 +28,11 @@ public class ReloadTurret extends BaseTurret{
|
|||||||
protected void updateCooling(){
|
protected void updateCooling(){
|
||||||
if(reloadCounter < reload && coolant != null && coolant.efficiency(this) > 0 && efficiency > 0){
|
if(reloadCounter < reload && coolant != null && coolant.efficiency(this) > 0 && efficiency > 0){
|
||||||
float capacity = coolant instanceof ConsumeLiquidFilter filter ? filter.getConsumed(this).heatCapacity : 1f;
|
float capacity = coolant instanceof ConsumeLiquidFilter filter ? filter.getConsumed(this).heatCapacity : 1f;
|
||||||
|
float amount = coolant.amount * coolant.efficiency(this);
|
||||||
coolant.update(this);
|
coolant.update(this);
|
||||||
reloadCounter += coolant.amount * edelta() * capacity * coolantMultiplier;
|
reloadCounter += amount * edelta() * capacity * coolantMultiplier;
|
||||||
|
|
||||||
if(Mathf.chance(0.06 * coolant.amount)){
|
if(Mathf.chance(0.06 * amount)){
|
||||||
coolEffect.at(x + Mathf.range(size * tilesize / 2f), y + Mathf.range(size * tilesize / 2f));
|
coolEffect.at(x + Mathf.range(size * tilesize / 2f), y + Mathf.range(size * tilesize / 2f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user