Skip to content

Commit

Permalink
add solidity
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Feb 21, 2025
1 parent d3e34d6 commit e116d60
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/omaloon/entities/comp/ChainedComp.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ public boolean isTail() {
return tail == self();
}

/**
* It moves whenever the head moves.
*/
@Override
@Replace
public boolean moving() {
Expand Down Expand Up @@ -274,6 +277,19 @@ public void setupWeapons(UnitType def) {
}
}

/**
* Add proper solidity for everything because i can't do it better than this.
*/
@Override
@Replace(1)
public EntityCollisions.SolidPred solidity() {
if (!isHead()) return null;
if (self() instanceof Mechc) return EntityCollisions::solid;
if (self() instanceof Legsc) return type.allowLegStep ? EntityCollisions::legsSolid : EntityCollisions::solid;
if (self() instanceof WaterMovec) return EntityCollisions::waterSolid;
return null;
}

/**
* Connect the units together after read.
*/
Expand Down

0 comments on commit e116d60

Please sign in to comment.