diff --git a/core/src/io/anuke/mindustry/ai/BlockIndexer.java b/core/src/io/anuke/mindustry/ai/BlockIndexer.java index 0fdbbb7c5e..77e2b05707 100644 --- a/core/src/io/anuke/mindustry/ai/BlockIndexer.java +++ b/core/src/io/anuke/mindustry/ai/BlockIndexer.java @@ -27,7 +27,7 @@ public class BlockIndexer{ private final ObjectSet scanOres = new ObjectSet<>(); private final ObjectSet itemSet = new ObjectSet<>(); /** Stores all ore quadtrants on the map. */ - private ObjectMap> ores; + private ObjectMap> ores = new ObjectMap<>(); /** Tags all quadrants. */ private GridBits[] structQuadrants; /** Stores all damaged tile entities by team. */ diff --git a/core/src/io/anuke/mindustry/mod/Mods.java b/core/src/io/anuke/mindustry/mod/Mods.java index e035edeb9d..ba3634e447 100644 --- a/core/src/io/anuke/mindustry/mod/Mods.java +++ b/core/src/io/anuke/mindustry/mod/Mods.java @@ -430,7 +430,7 @@ public class Mods implements Loadable{ if(content != null){ throw new ModLoadException(Strings.format("Error loading '{0}' from mod '{1}' ({2}):\n{3}", - content, mod.meta.name, content.sourceFile.name(), realCause), content, t); + content, mod.meta.name, content.sourceFile == null ? "" : content.sourceFile.name(), realCause), content, t); }else{ throw new ModLoadException("Error loading mod " + mod.meta.name, t); } diff --git a/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java index fdbf61df9e..d9ab6b4f7e 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java @@ -297,11 +297,11 @@ public class SettingsMenuDialog extends SettingsDialog{ graphics.checkPref("position", false); graphics.checkPref("fps", false); graphics.checkPref("indicators", true); - graphics.checkPref("animatedwater", false); + graphics.checkPref("animatedwater", !mobile); if(Shaders.shield != null){ graphics.checkPref("animatedshields", !mobile); } - graphics.checkPref("bloom", false, val -> renderer.toggleBloom(val)); + graphics.checkPref("bloom", !mobile, val -> renderer.toggleBloom(val)); graphics.checkPref("pixelate", false, val -> { if(val){ Events.fire(Trigger.enablePixelation); diff --git a/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java b/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java index 816051df2b..f288943515 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java @@ -185,7 +185,7 @@ public class PlacementFragment extends Fragment{ req.table(line -> { line.left(); line.addImage(stack.item.icon(Cicon.small)).size(8 * 2); - line.add(stack.item.localizedName).maxWidth(150f).fillX().color(Color.lightGray).padLeft(2).left().get().setEllipsis(true); + line.add(stack.item.localizedName).maxWidth(140f).fillX().color(Color.lightGray).padLeft(2).left().get().setEllipsis(true); line.labelWrap(() -> { TileEntity core = player.getClosestCore(); if(core == null || state.rules.infiniteResources) return "*/*"; diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/ArmoredConveyor.java b/core/src/io/anuke/mindustry/world/blocks/distribution/ArmoredConveyor.java index 17de588eea..fad38034e5 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/ArmoredConveyor.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/ArmoredConveyor.java @@ -17,8 +17,8 @@ public class ArmoredConveyor extends Conveyor{ @Override public boolean blends(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){ - return otherblock.outputsItems() && otherblock instanceof Conveyor && (Point2.equals(tile.x + Geometry.d4(rotation).x, tile.y + Geometry.d4(rotation).y, otherx, othery) + return otherblock.outputsItems() && (Point2.equals(tile.x + Geometry.d4(rotation).x, tile.y + Geometry.d4(rotation).y, otherx, othery) || ((!otherblock.rotate && Edges.getFacingEdge(otherblock, otherx, othery, tile) != null && - Edges.getFacingEdge(otherblock, otherx, othery, tile).relativeTo(tile) == tile.rotation()) || Point2.equals(otherx + Geometry.d4(otherrot).x, othery + Geometry.d4(otherrot).y, tile.x, tile.y))); + Edges.getFacingEdge(otherblock, otherx, othery, tile).relativeTo(tile) == rotation) || (otherblock.rotate && Point2.equals(otherx + Geometry.d4(otherrot).x, othery + Geometry.d4(otherrot).y, tile.x, tile.y)))); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java index 5465aa3e93..eb54ff025d 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java @@ -29,9 +29,6 @@ public class Conveyor extends Block implements Autotiler{ private static ItemPos pos2 = new ItemPos(); private final Vector2 tr1 = new Vector2(); private final Vector2 tr2 = new Vector2(); - private final int[] blendresult = new int[3]; - private final BuildRequest[] directionals = new BuildRequest[4]; - private TextureRegion[][] regions = new TextureRegion[7][4]; protected float speed = 0f; @@ -59,7 +56,7 @@ public class Conveyor extends Block implements Autotiler{ @Override public void setStats(){ super.setStats(); - stats.add(BlockStat.itemsMoved, speed * 60 * (1f / itemSpace), StatUnit.itemsSecond); + stats.add(BlockStat.itemsMoved, speed * 60 / itemSpace, StatUnit.itemsSecond); } @Override diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java b/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java index 07a7242bb2..62bdef1e2d 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java @@ -23,6 +23,7 @@ public class Cultivator extends GenericCrafter{ protected TextureRegion middleRegion, topRegion; protected RandomXS128 random = new RandomXS128(0); protected float recurrence = 6f; + protected Attribute attribute = Attribute.spores; public Cultivator(String name){ super(name); @@ -57,7 +58,7 @@ public class Cultivator extends GenericCrafter{ @Override public void drawPlace(int x, int y, int rotation, boolean valid){ - drawPlaceText(Core.bundle.formatFloat("bar.efficiency", (1 + sumAttribute(Attribute.spores, x, y)) * 100, 1), x, y, valid); + drawPlaceText(Core.bundle.formatFloat("bar.efficiency", (1 + sumAttribute(attribute, x, y)) * 100, 1), x, y, valid); } @Override @@ -103,7 +104,7 @@ public class Cultivator extends GenericCrafter{ super.onProximityAdded(tile); CultivatorEntity entity = tile.entity(); - entity.boost = sumAttribute(Attribute.spores, tile.x, tile.y); + entity.boost = sumAttribute(attribute, tile.x, tile.y); } @Override diff --git a/gradle.properties b/gradle.properties index cbc49eb9de..1a1e449fc9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=6ca636f2f51352022b2c770deafc3b549eb0421c +archash=fa703e299e675a90cf32006d304fdca9305258dc