Remove duplicate code
This commit is contained in:
+1
-5
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user