Block solid sensor

This commit is contained in:
Anuken
2024-06-16 01:24:52 -04:00
parent 7f9eb87313
commit 5c9e9e3ff4
3 changed files with 3 additions and 0 deletions

View File

@@ -1915,6 +1915,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
case y -> World.conv(y); case y -> World.conv(y);
case color -> Color.toDoubleBits(team.color.r, team.color.g, team.color.b, 1f); case color -> Color.toDoubleBits(team.color.r, team.color.g, team.color.b, 1f);
case dead -> !isValid() ? 1 : 0; case dead -> !isValid() ? 1 : 0;
case solid -> block.solid || checkSolid() ? 1 : 0;
case team -> team.id; case team -> team.id;
case health -> health; case health -> health;
case maxHealth -> maxHealth; case maxHealth -> maxHealth;

View File

@@ -35,6 +35,7 @@ public enum LAccess{
cameraWidth, cameraWidth,
cameraHeight, cameraHeight,
size, size,
solid,
dead, dead,
range, range,
shooting, shooting,

View File

@@ -1407,6 +1407,7 @@ public class Block extends UnlockableContent implements Senseable{
return switch(sensor){ return switch(sensor){
case color -> mapColor.toDoubleBits(); case color -> mapColor.toDoubleBits();
case health, maxHealth -> health; case health, maxHealth -> health;
case solid -> solid ? 1 : 0;
case size -> size; case size -> size;
case itemCapacity -> itemCapacity; case itemCapacity -> itemCapacity;
case liquidCapacity -> liquidCapacity; case liquidCapacity -> liquidCapacity;