diff --git a/core/src/io/anuke/mindustry/content/Mechs.java b/core/src/io/anuke/mindustry/content/Mechs.java index d19aaae610..74cab96a45 100644 --- a/core/src/io/anuke/mindustry/content/Mechs.java +++ b/core/src/io/anuke/mindustry/content/Mechs.java @@ -35,7 +35,7 @@ public class Mechs implements ContentList{ boostSpeed = 0.95f; buildPower = 1.2f; engineColor = Color.valueOf("ffd37f"); - health = 300f; + health = 250f; weapon = new Weapon("blaster"){{ length = 1.5f; @@ -75,7 +75,7 @@ public class Mechs implements ContentList{ weapon = new Weapon("shockgun"){{ shake = 2f; length = 1f; - reload = 40f; + reload = 45f; shotDelay = 3f; roundrobin = true; shots = 2; @@ -163,12 +163,12 @@ public class Mechs implements ContentList{ weaponOffsetX = 1; weaponOffsetY = 0; engineColor = Color.valueOf("feb380"); - health = 300f; + health = 310f; buildPower = 1.5f; weapon = new Weapon("swarmer"){{ length = 1.5f; recoil = 4f; - reload = 60f; + reload = 50f; shots = 4; spacing = 8f; inaccuracy = 8f; diff --git a/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java index e3fe41f828..cc2b97ca46 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java @@ -28,6 +28,7 @@ public class LiquidBulletType extends BulletType{ statusDuration = 90f; despawnEffect = Fx.none; hitEffect = Fx.hitLiquid; + smokeEffect = Fx.none; shootEffect = Fx.none; drag = 0.009f; knockback = 0.55f; diff --git a/core/src/io/anuke/mindustry/io/LegacyMapIO.java b/core/src/io/anuke/mindustry/io/LegacyMapIO.java index 0773534617..753a5db125 100644 --- a/core/src/io/anuke/mindustry/io/LegacyMapIO.java +++ b/core/src/io/anuke/mindustry/io/LegacyMapIO.java @@ -40,6 +40,8 @@ public class LegacyMapIO{ for(int x = 0; x < map.width; x++){ for(int y = 0; y < map.height; y++){ tiles[x][y] = new CachedTile(); + tiles[x][y].x = (short)x; + tiles[x][y].y = (short)y; } } state.rules.spawns = groups; diff --git a/core/src/io/anuke/mindustry/world/CachedTile.java b/core/src/io/anuke/mindustry/world/CachedTile.java index 05f3b16144..dde20ba3be 100644 --- a/core/src/io/anuke/mindustry/world/CachedTile.java +++ b/core/src/io/anuke/mindustry/world/CachedTile.java @@ -1,6 +1,5 @@ package io.anuke.mindustry.world; -import io.anuke.arc.collection.IntMap; import io.anuke.mindustry.entities.type.TileEntity; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.world.modules.*; @@ -10,7 +9,6 @@ import io.anuke.mindustry.world.modules.*; * Prevents garbage when loading previews. */ public class CachedTile extends Tile{ - private static IntMap entities = new IntMap<>(); public CachedTile(){ super(0, 0); @@ -23,7 +21,8 @@ public class CachedTile extends Tile{ @Override protected void preChanged(){ - super.setTeam(Team.none); + //this basically overrides the old tile code and doesn't remove from proximity + team = 0; } @Override @@ -33,19 +32,14 @@ public class CachedTile extends Tile{ Block block = block(); if(block.hasEntity()){ - //cache all entity types so only one is ever created per block type. do not add it. - if(!entities.containsKey(block.id)){ - TileEntity n = block.newEntity(); - n.cons = new ConsumeModule(entity); - n.tile = this; - if(block.hasItems) n.items = new ItemModule(); - if(block.hasLiquids) n.liquids = new LiquidModule(); - if(block.hasPower) n.power = new PowerModule(); - entities.put(block.id, n); - } - - entity = entities.get(block.id); - + TileEntity n = block.newEntity(); + n.cons = new ConsumeModule(entity); + n.tile = this; + n.block = block; + if(block.hasItems) n.items = new ItemModule(); + if(block.hasLiquids) n.liquids = new LiquidModule(); + if(block.hasPower) n.power = new PowerModule(); + entity = n; } } } diff --git a/core/src/io/anuke/mindustry/world/Tile.java b/core/src/io/anuke/mindustry/world/Tile.java index 1e458fc34e..cac7d27a7f 100644 --- a/core/src/io/anuke/mindustry/world/Tile.java +++ b/core/src/io/anuke/mindustry/world/Tile.java @@ -439,6 +439,6 @@ public class Tile implements Position, TargetTrait{ @Override public String toString(){ - return floor.name + ":" + block.name + ":" + content.block(overlay) + "[" + x + "," + y + "] " + "entity=" + (entity == null ? "null" : (entity.getClass())); + return floor.name + ":" + block.name + ":" + content.block(overlay) + "[" + x + "," + y + "] " + "entity=" + (entity == null ? "null" : (entity.getClass())) + ":" + getTeam(); } } \ No newline at end of file diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java b/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java index ee83e508ae..2d1147f4af 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java @@ -214,7 +214,8 @@ public class MassDriver extends Block{ @Override public boolean acceptItem(Item item, Tile tile, Tile source){ - return tile.entity.items.total() < itemCapacity; + //mass drivers that ouput only cannot accept items + return tile.entity.items.total() < itemCapacity && linkValid(tile); } @Override