Skip to content

Commit

Permalink
Block solid sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Jun 16, 2024
1 parent 7f9eb87 commit 5c9e9e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/src/mindustry/entities/comp/BuildingComp.java
Original file line number Diff line number Diff line change
Expand Up @@ -1915,6 +1915,7 @@ public double sense(LAccess sensor){
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;
Expand Down
1 change: 1 addition & 0 deletions core/src/mindustry/logic/LAccess.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public enum LAccess{
cameraWidth,
cameraHeight,
size,
solid,
dead,
range,
shooting,
Expand Down
1 change: 1 addition & 0 deletions core/src/mindustry/world/Block.java
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,7 @@ public double sense(LAccess sensor){
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;
Expand Down

0 comments on commit 5c9e9e3

Please sign in to comment.