diff --git a/core/src/mindustry/game/Schematics.java b/core/src/mindustry/game/Schematics.java index fd6e10022d..7a96ed672b 100644 --- a/core/src/mindustry/game/Schematics.java +++ b/core/src/mindustry/game/Schematics.java @@ -142,6 +142,7 @@ public class Schematics implements Loadable{ ui.showException(e); } } + all.sort(); } public void savePreview(Schematic schematic, Fi file){ @@ -280,6 +281,7 @@ public class Schematics implements Loadable{ ui.showException(e); Log.err(e); } + all.sort(); } public void remove(Schematic s){ @@ -292,6 +294,7 @@ public class Schematics implements Loadable{ previews.get(s).dispose(); previews.remove(s); } + all.sort(); } /** Creates a schematic from a world selection. */ diff --git a/core/src/mindustry/world/blocks/distribution/MassDriver.java b/core/src/mindustry/world/blocks/distribution/MassDriver.java index 1156857289..2974fe457f 100644 --- a/core/src/mindustry/world/blocks/distribution/MassDriver.java +++ b/core/src/mindustry/world/blocks/distribution/MassDriver.java @@ -262,6 +262,7 @@ public class MassDriver extends Block{ } protected boolean shooterValid(Tile tile, Tile other){ + if(other == null) return true; if(!(other.block() instanceof MassDriver)) return false; MassDriverEntity entity = other.ent(); @@ -274,7 +275,7 @@ public class MassDriver extends Block{ if(entity == null || entity.link == -1) return false; Tile link = world.tile(entity.link); - return link != null && link.block() instanceof MassDriver && tile.dst(link) <= range; + return link != null && link.block() instanceof MassDriver && link.getTeam() == tile.getTeam() && tile.dst(link) <= range; } public static class DriverBulletData implements Poolable{