New blocks / Floor edge fixes

This commit is contained in:
Anuken 2019-01-30 18:39:10 -05:00
parent 209e3f03c1
commit c046a1b474
15 changed files with 1109 additions and 1038 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 1.3 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1009 KiB

After

Width:  |  Height:  |  Size: 1015 KiB

View File

@ -36,7 +36,7 @@ public class Blocks implements ContentList{
//environment
air, part, spawn, deepwater, water, tar, stone, craters, charr, sand, ice, snow,
grass, holostone, rocks, icerocks, cliffs, pine, whiteTree, whiteTreeDead, sporeCluster,
iceSnow, sandWater, dunerocks,
iceSnow, sandWater, duneRocks, stainedRocks,
//crafting
siliconSmelter, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer,
@ -153,10 +153,12 @@ public class Blocks implements ContentList{
craters = new Floor("craters"){{
minimapColor = Color.valueOf("323232");
variants = 6;
hasEdges = false;
}};
charr = new Floor("char"){{
minimapColor = Color.valueOf("323232");
hasEdges = false;
}};
sandWater = new Floor("sand-water"){{
@ -215,7 +217,7 @@ public class Blocks implements ContentList{
variants = 2;
}};
dunerocks = new StaticWall("dunerocks"){{
duneRocks = new StaticWall("dunerocks"){{
variants = 2;
}};
@ -234,6 +236,10 @@ public class Blocks implements ContentList{
variants = 3;
}};
stainedRocks = new StaticWall("stained-rocks"){{
variants = 2;
}};
//endregion
//region crafting

View File

@ -168,7 +168,7 @@ public class Zones implements ContentList{
}};
}};
ruinousShores = new Zone("ruinousShores", new MapGenerator("ruinousShores", 1)){{ //TODO implement
ruinousShores = new Zone("ruinousShores", new MapGenerator("ruinousShores", 1)){{
deployCost = ItemStack.with(Items.copper, 600, Items.graphite, 50);
startingItems = ItemStack.with(Items.copper, 400);
conditionWave = 20;
@ -239,7 +239,7 @@ public class Zones implements ContentList{
}};
}};
stainedMountains = new Zone("stainedMountains", new MapGenerator("groundZero", 1)){{ //TODO implement
stainedMountains = new Zone("stainedMountains", new MapGenerator("groundZero", 2)){{ //TODO implement
deployCost = ItemStack.with(Items.copper, 300);
startingItems = ItemStack.with(Items.copper, 200);
conditionWave = 15;

View File

@ -93,7 +93,7 @@ public class MapGenerator extends Generator{
if((tile.block() instanceof StaticWall
&& tiles[newX][newY].block() instanceof StaticWall)
|| tile.block() == Blocks.air
|| tiles[newX][newY].block() == Blocks.air){
|| (tiles[newX][newY].block() == Blocks.air && tile.block() instanceof StaticWall)){
tile.setBlock(tiles[newX][newY].block());
}

View File

@ -55,6 +55,8 @@ public class Floor extends Block{
public boolean playerUnmineable = false;
/**Style of the edge stencil. Loaded by looking up "edge-stencil-{name}".*/
public String edgeStyle = "smooth";
/**Whether edges are used at all.*/
public boolean hasEdges = true;
protected TextureRegion[][] edges;
protected byte eq = 0;
@ -81,7 +83,7 @@ public class Floor extends Block{
}
int size = (int)(tilesize / Draw.scl);
if(Core.atlas.has(name + "-edge")){
if(hasEdges && Core.atlas.has(name + "-edge")){
edges = Core.atlas.find(name + "-edge").split(size, size);
}
region = variantRegions[0];