This commit is contained in:
Anuken
2019-10-29 14:58:48 -04:00
parent c540f8e5f5
commit d1dcce31a5
8 changed files with 12 additions and 14 deletions

View File

@@ -27,7 +27,7 @@ public class BlockIndexer{
private final ObjectSet<Item> scanOres = new ObjectSet<>(); private final ObjectSet<Item> scanOres = new ObjectSet<>();
private final ObjectSet<Item> itemSet = new ObjectSet<>(); private final ObjectSet<Item> itemSet = new ObjectSet<>();
/** Stores all ore quadtrants on the map. */ /** Stores all ore quadtrants on the map. */
private ObjectMap<Item, ObjectSet<Tile>> ores; private ObjectMap<Item, ObjectSet<Tile>> ores = new ObjectMap<>();
/** Tags all quadrants. */ /** Tags all quadrants. */
private GridBits[] structQuadrants; private GridBits[] structQuadrants;
/** Stores all damaged tile entities by team. */ /** Stores all damaged tile entities by team. */

View File

@@ -430,7 +430,7 @@ public class Mods implements Loadable{
if(content != null){ if(content != null){
throw new ModLoadException(Strings.format("Error loading '{0}' from mod '{1}' ({2}):\n{3}", 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 ? "<unknown file>" : content.sourceFile.name(), realCause), content, t);
}else{ }else{
throw new ModLoadException("Error loading mod " + mod.meta.name, t); throw new ModLoadException("Error loading mod " + mod.meta.name, t);
} }

View File

@@ -297,11 +297,11 @@ public class SettingsMenuDialog extends SettingsDialog{
graphics.checkPref("position", false); graphics.checkPref("position", false);
graphics.checkPref("fps", false); graphics.checkPref("fps", false);
graphics.checkPref("indicators", true); graphics.checkPref("indicators", true);
graphics.checkPref("animatedwater", false); graphics.checkPref("animatedwater", !mobile);
if(Shaders.shield != null){ if(Shaders.shield != null){
graphics.checkPref("animatedshields", !mobile); 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 -> { graphics.checkPref("pixelate", false, val -> {
if(val){ if(val){
Events.fire(Trigger.enablePixelation); Events.fire(Trigger.enablePixelation);

View File

@@ -185,7 +185,7 @@ public class PlacementFragment extends Fragment{
req.table(line -> { req.table(line -> {
line.left(); line.left();
line.addImage(stack.item.icon(Cicon.small)).size(8 * 2); 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(() -> { line.labelWrap(() -> {
TileEntity core = player.getClosestCore(); TileEntity core = player.getClosestCore();
if(core == null || state.rules.infiniteResources) return "*/*"; if(core == null || state.rules.infiniteResources) return "*/*";

View File

@@ -17,8 +17,8 @@ public class ArmoredConveyor extends Conveyor{
@Override @Override
public boolean blends(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){ 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 && || ((!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))));
} }
} }

View File

@@ -29,9 +29,6 @@ public class Conveyor extends Block implements Autotiler{
private static ItemPos pos2 = new ItemPos(); private static ItemPos pos2 = new ItemPos();
private final Vector2 tr1 = new Vector2(); private final Vector2 tr1 = new Vector2();
private final Vector2 tr2 = 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]; private TextureRegion[][] regions = new TextureRegion[7][4];
protected float speed = 0f; protected float speed = 0f;
@@ -59,7 +56,7 @@ public class Conveyor extends Block implements Autotiler{
@Override @Override
public void setStats(){ public void setStats(){
super.setStats(); super.setStats();
stats.add(BlockStat.itemsMoved, speed * 60 * (1f / itemSpace), StatUnit.itemsSecond); stats.add(BlockStat.itemsMoved, speed * 60 / itemSpace, StatUnit.itemsSecond);
} }
@Override @Override

View File

@@ -23,6 +23,7 @@ public class Cultivator extends GenericCrafter{
protected TextureRegion middleRegion, topRegion; protected TextureRegion middleRegion, topRegion;
protected RandomXS128 random = new RandomXS128(0); protected RandomXS128 random = new RandomXS128(0);
protected float recurrence = 6f; protected float recurrence = 6f;
protected Attribute attribute = Attribute.spores;
public Cultivator(String name){ public Cultivator(String name){
super(name); super(name);
@@ -57,7 +58,7 @@ public class Cultivator extends GenericCrafter{
@Override @Override
public void drawPlace(int x, int y, int rotation, boolean valid){ 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 @Override
@@ -103,7 +104,7 @@ public class Cultivator extends GenericCrafter{
super.onProximityAdded(tile); super.onProximityAdded(tile);
CultivatorEntity entity = tile.entity(); CultivatorEntity entity = tile.entity();
entity.boost = sumAttribute(Attribute.spores, tile.x, tile.y); entity.boost = sumAttribute(attribute, tile.x, tile.y);
} }
@Override @Override

View File

@@ -1,3 +1,3 @@
org.gradle.daemon=true org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=6ca636f2f51352022b2c770deafc3b549eb0421c archash=fa703e299e675a90cf32006d304fdca9305258dc