auto-git:

[change] src/foliage/foliage-scatter.ts
This commit is contained in:
2026-05-02 04:38:31 +02:00
parent b3aa2cfc65
commit aa19221b10

View File

@@ -224,12 +224,14 @@ function sourceToRegistry(
source: FoliageScatterPrototypeSource
): FoliagePrototypeRegistry {
if (Array.isArray(source)) {
const prototypes = source as readonly FoliagePrototype[];
return Object.fromEntries(
source.map((prototype) => [prototype.id, prototype])
prototypes.map((prototype) => [prototype.id, prototype])
);
}
return { ...source };
return { ...(source as FoliagePrototypeRegistry) };
}
export function createFoliageScatterPrototypeRegistry(options: {