mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-13 00:05:23 +07:00
Fixed turret cooling
This commit is contained in:
parent
5d0cfc3599
commit
c6a4bf69ee
@ -122,8 +122,6 @@ public class Vars implements Loadable{
|
||||
public static FileHandle saveDirectory;
|
||||
/** data subdirectory used for plugins */
|
||||
public static FileHandle pluginDirectory;
|
||||
/** old map file extension, for conversion */
|
||||
public static final String oldMapExtension = "mmap";
|
||||
/** map file extension */
|
||||
public static final String mapExtension = "msav";
|
||||
/** save file extension */
|
||||
|
@ -55,7 +55,7 @@ public class CooledTurret extends Turret{
|
||||
Liquid liquid = entity.liquids.current();
|
||||
|
||||
float used = Math.min(Math.min(entity.liquids.get(liquid), maxUsed * Time.delta()), Math.max(0, ((reload - entity.reload) / coolantMultiplier) / liquid.heatCapacity)) * baseReloadSpeed(tile);
|
||||
entity.reload += (used * liquid.heatCapacity) / liquid.heatCapacity;
|
||||
entity.reload += used * liquid.heatCapacity * coolantMultiplier;
|
||||
entity.liquids.remove(liquid, used);
|
||||
|
||||
if(Mathf.chance(0.06 * used)){
|
||||
|
@ -100,7 +100,7 @@ public abstract class Turret extends Block{
|
||||
|
||||
stats.add(BlockStat.shootRange, range / tilesize, StatUnit.blocks);
|
||||
stats.add(BlockStat.inaccuracy, (int)inaccuracy, StatUnit.degrees);
|
||||
stats.add(BlockStat.reload, 60f / reload * shots, StatUnit.none);
|
||||
stats.add(BlockStat.reload, 60f / reload, StatUnit.none);
|
||||
stats.add(BlockStat.shots, shots, StatUnit.none);
|
||||
stats.add(BlockStat.targetsAir, targetAir);
|
||||
stats.add(BlockStat.targetsGround, targetGround);
|
||||
|
@ -127,6 +127,13 @@ public class GenericCrafter extends Block{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsItems(){
|
||||
return outputItem != null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canProduce(Tile tile){
|
||||
if(outputItem != null && tile.entity.items.get(outputItem.item) >= itemCapacity){
|
||||
|
Loading…
Reference in New Issue
Block a user