From c6a4bf69ee65064dae0e9f19f682a064616ff197 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 18 Sep 2019 08:49:48 -0400 Subject: [PATCH] Fixed turret cooling --- core/src/io/anuke/mindustry/Vars.java | 2 -- .../world/blocks/defense/turrets/CooledTurret.java | 2 +- .../mindustry/world/blocks/defense/turrets/Turret.java | 2 +- .../mindustry/world/blocks/production/GenericCrafter.java | 7 +++++++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core/src/io/anuke/mindustry/Vars.java b/core/src/io/anuke/mindustry/Vars.java index 445a634714..24807883d1 100644 --- a/core/src/io/anuke/mindustry/Vars.java +++ b/core/src/io/anuke/mindustry/Vars.java @@ -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 */ diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/CooledTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/CooledTurret.java index 7ed149ba2e..86f15dce93 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/CooledTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/CooledTurret.java @@ -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)){ diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java index ba3e8dda79..948161dfd1 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java @@ -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); diff --git a/core/src/io/anuke/mindustry/world/blocks/production/GenericCrafter.java b/core/src/io/anuke/mindustry/world/blocks/production/GenericCrafter.java index 428697d853..eb76325965 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/GenericCrafter.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/GenericCrafter.java @@ -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){