This commit is contained in:
Anuken
2019-05-01 10:01:16 -04:00
parent 404b593ab8
commit 2d3fd513d8
16 changed files with 2839 additions and 2888 deletions

View File

@@ -677,7 +677,6 @@ block.metal-floor-2.name = Metal Floor 2
block.metal-floor-3.name = Metal Floor 3 block.metal-floor-3.name = Metal Floor 3
block.metal-floor-5.name = Metal Floor 4 block.metal-floor-5.name = Metal Floor 4
block.metal-floor-damaged.name = Metal Floor Damaged block.metal-floor-damaged.name = Metal Floor Damaged
block.creeptree.name = Creeptree
block.dark-panel-1.name = Dark Panel 1 block.dark-panel-1.name = Dark Panel 1
block.dark-panel-2.name = Dark Panel 2 block.dark-panel-2.name = Dark Panel 2
block.dark-panel-3.name = Dark Panel 3 block.dark-panel-3.name = Dark Panel 3
@@ -736,7 +735,7 @@ block.pneumatic-drill.name = Pneumatic Drill
block.laser-drill.name = Laser Drill block.laser-drill.name = Laser Drill
block.water-extractor.name = Water Extractor block.water-extractor.name = Water Extractor
block.cultivator.name = Cultivator block.cultivator.name = Cultivator
block.dart-mech-pad.name = Dart Mech Pad block.dart-mech-pad.name = Dart Ship Pad
block.delta-mech-pad.name = Delta Mech Pad block.delta-mech-pad.name = Delta Mech Pad
block.javelin-ship-pad.name = Javelin Ship Pad block.javelin-ship-pad.name = Javelin Ship Pad
block.trident-ship-pad.name = Trident Ship Pad block.trident-ship-pad.name = Trident Ship Pad

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 B

After

Width:  |  Height:  |  Size: 502 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 274 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 KiB

After

Width:  |  Height:  |  Size: 240 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 KiB

After

Width:  |  Height:  |  Size: 404 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 KiB

After

Width:  |  Height:  |  Size: 306 KiB

View File

@@ -265,7 +265,7 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
@Override @Override
public float drawSize(){ public float drawSize(){
return isLocal ? Float.MAX_VALUE : 40; return isLocal ? Float.MAX_VALUE : 40 + placeDistance;
} }
@Override @Override

View File

@@ -79,11 +79,12 @@ public class BlockRenderer implements Disposable{
Tile tile = world.rawTile(x, y); Tile tile = world.rawTile(x, y);
int edgeBlend = 2; int edgeBlend = 2;
float rot = tile.getRotation(); float rot = tile.getRotation();
boolean fillable = (tile.block().solid && tile.block().fillsTile && !tile.block().synthetic());
int edgeDst = Math.min(x, Math.min(y, Math.min(Math.abs(x - (world.width() - 1)), Math.abs(y - (world.height() - 1))))); int edgeDst = Math.min(x, Math.min(y, Math.min(Math.abs(x - (world.width() - 1)), Math.abs(y - (world.height() - 1)))));
if(edgeDst <= edgeBlend){ if(edgeDst <= edgeBlend){
rot = Math.max((edgeBlend - edgeDst) * (4f / edgeBlend), rot); rot = Math.max((edgeBlend - edgeDst) * (4f / edgeBlend), fillable ? rot : 0);
} }
if(rot > 0 && ((tile.block().solid && tile.block().fillsTile && !tile.block().synthetic()) || edgeDst <= edgeBlend)){ if(rot > 0 && (fillable || edgeDst <= edgeBlend)){
Draw.color(0f, 0f, 0f, Math.min((rot + 0.5f) / 4f, 1f)); Draw.color(0f, 0f, 0f, Math.min((rot + 0.5f) / 4f, 1f));
Fill.rect(tile.x + 0.5f, tile.y + 0.5f, 1, 1); Fill.rect(tile.x + 0.5f, tile.y + 0.5f, 1, 1);
} }

View File

@@ -37,6 +37,7 @@ public class MapIO{
private static void initBlocks(){ private static void initBlocks(){
if(missingBlocks != null) return; if(missingBlocks != null) return;
//only for legacy maps
missingBlocks = ObjectMap.of( missingBlocks = ObjectMap.of(
"stained-stone", Blocks.shale, "stained-stone", Blocks.shale,
"stained-stone-red", Blocks.shale, "stained-stone-red", Blocks.shale,

View File

@@ -1,6 +1,7 @@
package io.anuke.mindustry.io; package io.anuke.mindustry.io;
import io.anuke.arc.collection.Array; import io.anuke.arc.collection.Array;
import io.anuke.arc.collection.ObjectMap;
import io.anuke.arc.util.Pack; import io.anuke.arc.util.Pack;
import io.anuke.mindustry.content.Blocks; import io.anuke.mindustry.content.Blocks;
import io.anuke.mindustry.entities.Entities; import io.anuke.mindustry.entities.Entities;
@@ -19,6 +20,9 @@ import static io.anuke.mindustry.Vars.world;
public abstract class SaveFileVersion{ public abstract class SaveFileVersion{
public final int version; public final int version;
private final ObjectMap<String, String> fallback = ObjectMap.of(
"alpha-dart-mech-pad", "dart-mech-pad"
);
public SaveFileVersion(int version){ public SaveFileVersion(int version){
this.version = version; this.version = version;
@@ -219,7 +223,7 @@ public abstract class SaveFileVersion{
for(int j = 0; j < total; j++){ for(int j = 0; j < total; j++){
String name = stream.readUTF(); String name = stream.readUTF();
map[type.ordinal()][j] = content.getByName(type, name); map[type.ordinal()][j] = content.getByName(type, fallback.get(name, name));
} }
} }

View File

@@ -183,7 +183,7 @@ public abstract class BasicGenerator extends RandomGenerator{
Tile end = tiles[endX][endY]; Tile end = tiles[endX][endY];
GridBits closed = new GridBits(width, height); GridBits closed = new GridBits(width, height);
IntFloatMap costs = new IntFloatMap(); IntFloatMap costs = new IntFloatMap();
PriorityQueue<Tile> queue = new PriorityQueue<>((a, b) -> Float.compare(costs.get(a.pos(), 0f) + dh.cost(a.x, a.y, end.x, end.y), costs.get(b.pos(), 0f) + dh.cost(b.x, b.y, end.x, end.y))); PriorityQueue<Tile> queue = new PriorityQueue<>(tiles.length * tiles[0].length / 2, (a, b) -> Float.compare(costs.get(a.pos(), 0f) + dh.cost(a.x, a.y, end.x, end.y), costs.get(b.pos(), 0f) + dh.cost(b.x, b.y, end.x, end.y)));
queue.add(start); queue.add(start);
boolean found = false; boolean found = false;
while(!queue.isEmpty()){ while(!queue.isEmpty()){

View File

@@ -45,7 +45,9 @@ public class TechTreeDialog extends FloatingDialog{
checkNodes(root); checkNodes(root);
treeLayout(); treeLayout();
}); });
hidden(ui.deploy::setup); hidden(ui.deploy::setup);
addCloseButton(); addCloseButton();
buttons.addImageTextButton("$database", "icon-database", 14 * 2, () -> { buttons.addImageTextButton("$database", "icon-database", 14 * 2, () -> {
@@ -200,7 +202,7 @@ public class TechTreeDialog extends FloatingDialog{
if(mobile){ if(mobile){
tapped(() -> { tapped(() -> {
Element e = hit(Core.input.mouseX(), Core.input.mouseY(), true); Element e = Core.scene.hit(Core.input.mouseX(), Core.input.mouseY(), true);
if(e == this){ if(e == this){
hoverNode = null; hoverNode = null;
rebuild(); rebuild();