Hopefully last commit

This commit is contained in:
2025-06-11 23:01:05 +02:00
parent 78bccd6c6f
commit 8bbe17491b
74 changed files with 1306 additions and 516 deletions

View File

@@ -67,7 +67,7 @@ OrientDirection rotateMainDirection(OrientDirection dir, int steps) {
int newIndex = (index + steps) % count;
if (newIndex < 0) newIndex += count;
return (OrientDirection)mainDirs[newIndex];
return (OrientDirection) mainDirs[newIndex];
}
// Map 8 directions to main 4 for code output
@@ -225,9 +225,17 @@ void updateItems() {
if (!putOntoNext(itm, nx, ny, next, &ntt, newLane) && (next->type != TYPE_BELT || newLane >= 2)) {
bool alreadyPresent = false;
for (uint8_t nLane = 0; nLane < ItemSlotCount; nLane++) {
if (putOntoNext(itm, nx, ny, next, &ntt, nLane)) {
break;
if (next->items[nLane].type == itm->type) {
alreadyPresent = true;
}
}
if (!alreadyPresent) {
for (uint8_t nLane = 0; nLane < ItemSlotCount; nLane++) {
if (putOntoNext(itm, nx, ny, next, &ntt, nLane)) {
break;
}
}
}