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
@@ -8,7 +8,7 @@
// see docs/modding/resources/loot_tables.md
import { EverythingRegistry, type ItemRegistry } from "./everything_registry.ts";
import { list_matches, Tags } from "./tags.ts";
import { TAG_ID_PATTERN } from "./mod_data.ts";
import { is_object, TAG_ID_PATTERN } from "./mod_data.ts";
// a whole number, a random one from min to max, or the number of n tries at chance p that succeed, like minecraft's
// constant, uniform and binomial number providers
@@ -450,7 +450,3 @@ export function loot_references(table: LootTableJson) {
}
return refs;
}
function is_object(value: unknown): value is Record<string, unknown> {
return typeof value === "object" && value !== null && !Array.isArray(value);
}