Added rotation to plots.. Only does stuff for functional plants.

This commit is contained in:
sarah committed 2026-09-05 16:32:41 +02:00
1 parent 75e4f31ccd
commit 132aba0b9a
14 files changed
+1244 -197

No files matched your search

+59 -2
View File
@@ -95,10 +95,23 @@ function GetAdminOverviewMissingSprites(
)
);
const DirectionalStages =
Array.isArray(
Plant.DirectionalImageStages
)
? Plant.DirectionalImageStages
: [];
const HighestApiStage =
Math.max(
0,
...ApiStages
...ApiStages,
...DirectionalStages.map(
Stage =>
Number(
Stage?.Stage ?? 0
)
)
);
const HighestStage =
@@ -110,6 +123,51 @@ function GetAdminOverviewMissingSprites(
const Missing = [];
if (Plant.DirectionalSprites === true) {
const Directions = [
["N", "North"],
["E", "East"],
["S", "South"],
["W", "West"]
];
for (const [Code, Name] of Directions) {
const Stages = new Set(
DirectionalStages
.filter(
Stage =>
String(
Stage?.Direction ?? ""
).toUpperCase() === Code
)
.map(
Stage =>
Number(Stage.Stage)
)
.filter(
Stage =>
Number.isInteger(Stage) &&
Stage > 0
)
);
for (
let Stage = 1;
Stage <= HighestStage;
Stage++
) {
if (!Stages.has(Stage)) {
Missing.push(
Name + "/" +
Stage + ".png"
);
}
}
}
return Missing;
}
for (
let Stage = 1;
Stage <= HighestStage;
@@ -132,7 +190,6 @@ function GetAdminOverviewMissingSprites(
return Missing;
}
function CollectAdminOverviewCreatedPlants() {
const Created = new Set();