More vent variants

This commit is contained in:
Anuken
2022-02-05 18:59:56 -05:00
parent 6675730571
commit 6c44f506fc
32 changed files with 290 additions and 73 deletions
@@ -359,7 +359,7 @@ public class BlockRenderer{
for(int i = 0; i < tileview.size; i++){
Tile tile = tileview.items[i];
Block block = tile.block();
Building entity = tile.build;
Building build = tile.build;
Draw.z(Layer.block);
@@ -374,20 +374,21 @@ public class BlockRenderer{
Draw.z(Layer.block);
}
if(entity != null){
if(build != null){
if(entity.damaged()){
entity.drawCracks();
if(build.damaged()){
Draw.z(Layer.blockCracks);
build.drawCracks();
Draw.z(Layer.block);
}
if(entity.team != player.team()){
entity.drawTeam();
if(build.team != player.team()){
build.drawTeam();
Draw.z(Layer.block);
}
if(entity.team == player.team() && renderer.drawStatus && block.consumes.any()){
entity.drawStatus();
if(build.team == player.team() && renderer.drawStatus && block.consumes.any()){
build.drawStatus();
}
}
Draw.reset();
+6
View File
@@ -26,6 +26,12 @@ public class Layer{
//base block layer - most blocks go here
block = 30,
//layer for cracks over blocks, batched to prevent excessive texture swaps
blockCracks = 30f + 0.1f,
//some blocks need to draw stuff after cracks
blockAfterCracks = 30f + 0.2f,
//informal layer used for additive blending overlay, grouped together to reduce draw calls
blockAdditive = 31,