mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-08 01:43:59 +07:00
Other tweaks
This commit is contained in:
parent
758ace353e
commit
7dca6b2a30
@ -59,9 +59,21 @@ public class LaserTurret extends PowerTurret{
|
||||
if(bulletLife <= 0f){
|
||||
bullet = null;
|
||||
}
|
||||
}else if(reload > 0){
|
||||
Liquid liquid = liquids().current();
|
||||
float maxUsed = consumes.<ConsumeLiquidBase>get(ConsumeType.liquid).amount;
|
||||
|
||||
float used = (tile.isEnemyCheat() ? maxUsed * Time.delta() : Math.min(liquids.get(liquid), maxUsed * Time.delta())) * liquid.heatCapacity * coolantMultiplier;
|
||||
reload -= used;
|
||||
liquids.remove(liquid, used);
|
||||
|
||||
if(Mathf.chance(0.06 * used)){
|
||||
coolEffect.at(x + Mathf.range(size * tilesize / 2f), y + Mathf.range(size * tilesize / 2f));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateShooting(){
|
||||
if(bulletLife > 0 && bullet != null){
|
||||
@ -74,17 +86,6 @@ public class LaserTurret extends PowerTurret{
|
||||
shoot(type);
|
||||
|
||||
reload = reloadTime;
|
||||
}else{
|
||||
Liquid liquid = liquids().current();
|
||||
float maxUsed = consumes.<ConsumeLiquidBase>get(ConsumeType.liquid).amount;
|
||||
|
||||
float used = (tile.isEnemyCheat() ? maxUsed * Time.delta() : Math.min(liquids.get(liquid), maxUsed * Time.delta())) * liquid.heatCapacity * coolantMultiplier;
|
||||
reload -= used;
|
||||
liquids.remove(liquid, used);
|
||||
|
||||
if(Mathf.chance(0.06 * used)){
|
||||
coolEffect.at(x + Mathf.range(size * tilesize / 2f), y + Mathf.range(size * tilesize / 2f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user