From 0ff56e3a68dabeafadec1ea16f9f1731fe4c9f2c Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 5 May 2019 12:36:30 -0400 Subject: [PATCH] Fixed meltdown not firing when cheating --- .../mindustry/world/blocks/defense/turrets/LaserTurret.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LaserTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LaserTurret.java index fabfa0349d..f619d1727f 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LaserTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/LaserTurret.java @@ -60,7 +60,7 @@ public class LaserTurret extends PowerTurret{ return; } - if(entity.reload >= reload && entity.cons.valid()){ + if(entity.reload >= reload && (entity.cons.valid() || tile.isEnemyCheat())){ BulletType type = peekAmmo(tile); shoot(tile, type); @@ -70,7 +70,7 @@ public class LaserTurret extends PowerTurret{ Liquid liquid = entity.liquids.current(); float maxUsed = consumes.get(ConsumeType.liquid).amount; - float used = Math.min(entity.liquids.get(liquid), maxUsed * Time.delta()); + float used = tile.isEnemyCheat() ? maxUsed : Math.min(entity.liquids.get(liquid), maxUsed * Time.delta()); entity.reload += used; entity.liquids.remove(liquid, used);