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;
}
}
}

View File

@@ -22,6 +22,8 @@ typedef enum ItemType {
TYPE_TURRET,
TYPE_SPLITTER,
TYPE_CORE,
TYPE_AMMOCRAFTER,
TYPE_WIRECRAFTER,
IRON_ORE = ITEMREGISTRY_SIZE / 2,
SILVER_ORE,
GOLD_ORE,
@@ -30,11 +32,19 @@ typedef enum ItemType {
SILVER_INGOT,
GOLD_INGOT,
PLATINUM_INGOT,
LOG,
IRON_BULLET,
SILVER_BULLET,
GOLD_BULLET,
PLATINUM_BULLET,
LOG,
SILVER_PLATE,
GOLD_PLATE,
PLATINUM_PLATE,
IRON_PLATE,
SILVER_ROD,
GOLD_ROD,
PLATINUM_ROD,
IRON_ROD,
} ItemType;