1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-20 21:08:42 +03:00
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> itemSet = new ObjectSet<>();
/** Stores all ore quadtrants on the map. */
private ObjectMap<Item, ObjectSet<Tile>> ores;
private ObjectMap<Item, ObjectSet<Tile>> ores = new ObjectMap<>();
/** Tags all quadrants. */
private GridBits[] structQuadrants;
/** Stores all damaged tile entities by team. */

View File

@ -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 ? "<unknown file>" : content.sourceFile.name(), realCause), content, t);
}else{
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("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);

View File

@ -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 "*/*";

View File

@ -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))));
}
}

View File

@ -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

View File

@ -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

View File

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