Remove duplicate code

This commit is contained in:
2026-10-13 11:57:43 -03:00
parent dfc6a6d77b
commit 5165698fe3
50 changed files with 307 additions and 812 deletions
+1 -5
View File
@@ -4,7 +4,7 @@
// biomes as data: worldgen/biomes/<name>.json in a mod, see docs/modding/worldgen/biomes.md. which biome a column
// gets is the generator's biome rules (worldgen/biome_source), these say what a biome looks like once it's picked
import { EverythingRegistry } from "../everything_registry.ts";
import { ID_PATTERN } from "../mod_data.ts";
import { ID_PATTERN, is_object } from "../mod_data.ts";
import { farming_day } from "../time.ts";
export const SEASONS = ["spring", "summer", "autumn", "winter"] as const;
@@ -164,7 +164,3 @@ export function validate_biome(json: unknown): string[] {
}
return problems;
}
function is_object(value: unknown): value is Record<string, unknown> {
return typeof value === "object" && value !== null && !Array.isArray(value);
}