Skip to content

Commit

Permalink
fix: insulated wires powering above/below
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTJP committed May 11, 2024
1 parent fd66ced commit 16ec44a
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ public int strongPowerLevel(int side) {

@Override
public int weakPowerLevel(int side) {
// Can't power above or below
if (side == getSide() || side == (getSide() ^ 1))
return 0;

// Can't power unconnected sides (unlike uninsulated)
int r = absoluteRot(side);
if (!maskConnects(r))
return 0;

// If side is towards a rotation
if ((side & 6) != (getSide() & 6)) {
int r = absoluteRot(side);
if (!maskConnects(r))
return 0;
}
return super.weakPowerLevel(side);
}
//endregion
Expand Down

0 comments on commit 16ec44a

Please sign in to comment.