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 color -> Color.toDoubleBits(team.color.r, team.color.g, team.color.b, 1f);
case dead -> !isValid() ? 1 : 0;
case solid -> block.solid || checkSolid() ? 1 : 0;
case team -> team.id;
case health -> health;
case maxHealth -> maxHealth;

View File

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

View File

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