Dacite decoration block / Environmental renaming

This commit is contained in:
Anuken
2020-09-10 15:17:10 -04:00
parent 88e3022db0
commit 74cefb3ec9
95 changed files with 10486 additions and 10175 deletions
@@ -192,7 +192,9 @@ public class BlockRenderer implements Disposable{
Tile tile = world.rawTile(x, y);
Block block = tile.block();
//link to center
if(tile.build != null) tile = tile.build.tile();
if(tile.build != null){
tile = tile.build.tile;
}
if(block != Blocks.air && block.cacheLayer == CacheLayer.normal && (tile.build == null || !processedEntities.contains(tile.build.id()))){
if(block.expanded || !expanded){
@@ -207,8 +209,8 @@ public class BlockRenderer implements Disposable{
if(tile.build != null && tile.build.power != null && tile.build.power.links.size > 0){
for(Building other : tile.build.getPowerConnections(outArray2)){
if(other.block() instanceof PowerNode){ //TODO need a generic way to render connections!
tileview.add(other.tile());
if(other.block instanceof PowerNode){ //TODO need a generic way to render connections!
tileview.add(other.tile);
}
}
}
+1 -1
View File
@@ -187,7 +187,7 @@ public class Drawf{
Draw.color(Pal.accent);
Draw.alpha(speed);
Lines.lineAngleCenter(t.x + Mathf.sin(time, 20f, Vars.tilesize / 2f * t.block().size - 2f), t.y, 90, t.block().size * Vars.tilesize - 4f);
Lines.lineAngleCenter(t.x + Mathf.sin(time, 20f, Vars.tilesize / 2f * t.block.size - 2f), t.y, 90, t.block.size * Vars.tilesize - 4f);
Draw.reset();
}
@@ -59,8 +59,8 @@ public class MenuRenderer implements Disposable{
new Block[]{Blocks.moss, Blocks.sporePine}
);
Block[] selected2 = Structs.select(
new Block[]{Blocks.ignarock, Blocks.duneWall},
new Block[]{Blocks.ignarock, Blocks.duneWall},
new Block[]{Blocks.basalt, Blocks.duneWall},
new Block[]{Blocks.basalt, Blocks.duneWall},
new Block[]{Blocks.stone, Blocks.stoneWall},
new Block[]{Blocks.stone, Blocks.stoneWall},
new Block[]{Blocks.moss, Blocks.sporeWall},
@@ -113,7 +113,7 @@ public class MenuRenderer implements Disposable{
if(heat > base){
ore = Blocks.air;
wall = Blocks.air;
floor = Blocks.ignarock;
floor = Blocks.basalt;
if(heat > base + 0.1){
floor = Blocks.hotrock;
@@ -82,7 +82,7 @@ public class OverlayRenderer{
if(select instanceof BlockUnitc){
//special selection for block "units"
Fill.square(select.x, select.y, ((BlockUnitc)select).tile().block().size * tilesize/2f);
Fill.square(select.x, select.y, ((BlockUnitc)select).tile().block.size * tilesize/2f);
}else{
Draw.rect(select.type().icon(Cicon.full), select.x(), select.y(), select.rotation() - 90);
}
@@ -140,10 +140,10 @@ public class OverlayRenderer{
build.drawDisabled();
}
if(Core.input.keyDown(Binding.rotateplaced) && build.block().rotate && build.interactable(player.team())){
control.input.drawArrow(build.block(), build.tileX(), build.tileY(), build.rotation, true);
if(Core.input.keyDown(Binding.rotateplaced) && build.block.rotate && build.interactable(player.team())){
control.input.drawArrow(build.block, build.tileX(), build.tileY(), build.rotation, true);
Draw.color(Pal.accent, 0.3f + Mathf.absin(4f, 0.2f));
Fill.square(build.x, build.y, build.block().size * tilesize/2f);
Fill.square(build.x, build.y, build.block.size * tilesize/2f);
Draw.color();
}
}
@@ -163,9 +163,9 @@ public class OverlayRenderer{
Building tile = world.buildWorld(v.x, v.y);
if(tile != null && tile.interactable(player.team()) && tile.acceptStack(player.unit().item(), player.unit().stack.amount, player.unit()) > 0 && player.within(tile, itemTransferRange)){
Lines.stroke(3f, Pal.gray);
Lines.square(tile.x, tile.y, tile.block().size * tilesize / 2f + 3 + Mathf.absin(Time.time(), 5f, 1f));
Lines.square(tile.x, tile.y, tile.block.size * tilesize / 2f + 3 + Mathf.absin(Time.time(), 5f, 1f));
Lines.stroke(1f, Pal.place);
Lines.square(tile.x, tile.y, tile.block().size * tilesize / 2f + 2 + Mathf.absin(Time.time(), 5f, 1f));
Lines.square(tile.x, tile.y, tile.block.size * tilesize / 2f + 2 + Mathf.absin(Time.time(), 5f, 1f));
Draw.reset();
}