This commit is contained in:
Anuken
2019-03-12 16:37:32 -04:00
parent 47300b42b0
commit 4d4869842e
13 changed files with 743 additions and 713 deletions

View File

@@ -31,9 +31,7 @@ Server builds are bundled with each released build (in Releases). If you'd rathe
##### Troubleshooting ##### Troubleshooting
If the terminal returns `Permission denied` or `Command not found` on Mac/Linux, run `chmod +x ./gradlew` before running `./gradlew`. If the terminal returns `Permission denied` or `Command not found` on Mac/Linux, run `chmod +x ./gradlew` before running `./gradlew`. *This is a one-time procedure.*
NOTE: this is a one-time procedure.
--- ---

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 497 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 KiB

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 165 KiB

View File

@@ -35,7 +35,7 @@ public class Blocks implements ContentList{
//environment //environment
air, part, spawn, deepwater, water, tar, stone, craters, charr, sand, ice, snow, air, part, spawn, deepwater, water, tar, stone, craters, charr, sand, ice, snow,
holostone, rocks, icerocks, cliffs, pine, whiteTree, whiteTreeDead, sporeCluster, holostone, rocks, icerocks, cliffs, sporePine, pine, whiteTree, whiteTreeDead, sporeCluster,
iceSnow, sandWater, duneRocks, sandRocks, stainedRocks, moss, stainedRocksRed, stainedStoneRed, stainedRocksYellow, stainedStoneYellow, stainedBoulder, grass, salt, iceSnow, sandWater, duneRocks, sandRocks, stainedRocks, moss, stainedRocksRed, stainedStoneRed, stainedRocksYellow, stainedStoneYellow, stainedBoulder, grass, salt,
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor5, ignarock, magmarock, hotrock, snowrocks, metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor5, ignarock, magmarock, hotrock, snowrocks,
@@ -226,6 +226,10 @@ public class Blocks implements ContentList{
variants = 2; variants = 2;
}}; }};
sporePine = new StaticWall("spore-pine"){{
variants = 0;
}};
pine = new StaticWall("pine"){{ pine = new StaticWall("pine"){{
variants = 0; variants = 0;
}}; }};

View File

@@ -263,8 +263,7 @@ public class MobileInput extends InputHandler implements GestureListener{
//rotate button //rotate button
table.addImageButton("icon-arrow", "clear-partial", 16 * 2f, () -> rotation = Mathf.mod(rotation + 1, 4)) table.addImageButton("icon-arrow", "clear-partial", 16 * 2f, () -> rotation = Mathf.mod(rotation + 1, 4))
.update(i -> i.getImage().setRotationOrigin(rotation * 90, Align.center)) .update(i -> i.getImage().setRotationOrigin(rotation * 90, Align.center)).visible(() -> block != null && block.rotate);
.visible(() -> block != null && block.rotate);
//confirm button //confirm button
table.addImageButton("icon-check", "clear-partial", 16 * 2f, () -> { table.addImageButton("icon-check", "clear-partial", 16 * 2f, () -> {

View File

@@ -120,14 +120,15 @@ public abstract class SaveFileVersion{
byte floorid = stream.readByte(); byte floorid = stream.readByte();
byte oreid = stream.readByte(); byte oreid = stream.readByte();
int consecutives = stream.readUnsignedByte(); int consecutives = stream.readUnsignedByte();
Block ore = content.block(oreid);
tiles[x][y] = new Tile(x, y, floorid, (byte)0); tiles[x][y] = new Tile(x, y, floorid, (byte)0);
tiles[x][y].setOreByte(oreid); tiles[x][y].setOre(ore);
for(int j = i + 1; j < i + 1 + consecutives; j++){ for(int j = i + 1; j < i + 1 + consecutives; j++){
int newx = j % width, newy = j / width; int newx = j % width, newy = j / width;
Tile newTile = new Tile(newx, newy, floorid, (byte)0); Tile newTile = new Tile(newx, newy, floorid, (byte)0);
newTile.setOreByte(oreid); newTile.setOre(ore);
tiles[newx][newy] = newTile; tiles[newx][newy] = newTile;
} }

View File

@@ -337,8 +337,8 @@ public class Tile implements Position, TargetTrait{
this.ore = ore; this.ore = ore;
} }
public void setOre(Block floor){ public void setOre(Block block){
setOreByte(floor.id); setOreByte(block.id);
} }
public void clearOre(){ public void clearOre(){

View File

@@ -110,7 +110,7 @@ public class Floor extends Block{
Draw.rect(variantRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantRegions.length - 1))], tile.worldx(), tile.worldy()); Draw.rect(variantRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantRegions.length - 1))], tile.worldx(), tile.worldy());
Floor floor = tile.oreBlock(); Floor floor = tile.oreBlock();
if(floor != Blocks.air){ if(floor != Blocks.air && floor != this){ //ore should never have itself on top, but it's possible, so prevent a crash in that case
floor.draw(tile); floor.draw(tile);
} }