Merging of map saves

This commit is contained in:
Anuken
2019-05-14 11:54:22 -04:00
168 changed files with 2942 additions and 2604 deletions
@@ -78,7 +78,7 @@ public class BlockRenderer implements Disposable{
for(int y = 0; y < world.height(); y++){
Tile tile = world.rawTile(x, y);
int edgeBlend = 2;
float rot = tile.getRotation();
float rot = tile.rotation();
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)))));
if(edgeDst <= edgeBlend){
@@ -62,7 +62,7 @@ public class FloorRenderer implements Disposable{
//loop through all layers, and add layer index if it exists
for(int i = 0; i < layers; i++){
if(chunk.caches[i] != -1){
if(chunk.caches[i] != -1 && i != CacheLayer.walls.ordinal()){
drawnLayerSet.add(i);
}
}
@@ -129,7 +129,7 @@ public class MinimapRenderer implements Disposable{
}
private int colorFor(Tile tile){
tile = tile.target();
tile = tile.link();
return MapIO.colorFor(tile.floor(), tile.block(), tile.overlay(), tile.getTeam());
}
@@ -97,11 +97,10 @@ public class OverlayRenderer{
//draw selected block bars and info
if(input.block == null && !Core.scene.hasMouse()){
Vector2 vec = Core.input.mouseWorld(input.getMouseX(), input.getMouseY());
Tile tile = world.tileWorld(vec.x, vec.y);
Tile tile = world.ltileWorld(vec.x, vec.y);
if(tile != null && tile.block() != Blocks.air && tile.target().getTeam() == player.getTeam()){
Tile target = tile.target();
target.block().drawSelect(target);
if(tile != null && tile.block() != Blocks.air && tile.getTeam() == player.getTeam()){
tile.block().drawSelect(tile);
}
}
@@ -113,8 +112,7 @@ public class OverlayRenderer{
Lines.circle(v.x, v.y, 6 + Mathf.absin(Time.time(), 5f, 1f));
Draw.reset();
Tile tile = world.tileWorld(v.x, v.y);
if(tile != null) tile = tile.target();
Tile tile = world.ltileWorld(v.x, v.y);
if(tile != null && tile.interactable(player.getTeam()) && tile.block().acceptStack(player.item().item, player.item().amount, tile, player) > 0){
Draw.color(Pal.place);
Lines.square(tile.drawx(), tile.drawy(), tile.block().size * tilesize / 2f + 1 + Mathf.absin(Time.time(), 5f, 1f));
@@ -5,7 +5,6 @@ import io.anuke.arc.graphics.g2d.*;
import io.anuke.arc.math.Mathf;
import io.anuke.arc.util.Tmp;
//TODO remove
public class Shapes{
public static void laser(String line, String edge, float x, float y, float x2, float y2, float scale){