Change imports

This commit is contained in:
2026-11-04 21:51:26 -03:00
parent 98fa45ebd1
commit ba4b2a8798
270 changed files with 994 additions and 994 deletions
+12 -12
View File
@@ -22,20 +22,20 @@ import {
validate_recipe,
validate_spawn,
validate_tag,
} from "$/common/mod_data.ts";
import { json_object } from "$/common/schema.ts";
import { check_references, load_order, type LoadedMod, type ModReport } from "$/common/mod_check.ts";
import { png_size, texture_size_problem } from "$/common/bmod.ts";
import { type TextureJson, validate_texture_json } from "$/common/texture_animation.ts";
import { type LootTableJson, validate_loot_table } from "$/common/loot.ts";
import { validate_biome } from "$/common/worldgen/biomes.ts";
} from "@/common/mod_data.ts";
import { json_object } from "@/common/schema.ts";
import { check_references, load_order, type LoadedMod, type ModReport } from "@/common/mod_check.ts";
import { png_size, texture_size_problem } from "@/common/bmod.ts";
import { type TextureJson, validate_texture_json } from "@/common/texture_animation.ts";
import { type LootTableJson, validate_loot_table } from "@/common/loot.ts";
import { validate_biome } from "@/common/worldgen/biomes.ts";
import {
validate_biome_source,
validate_density_function,
validate_noise,
validate_noise_settings,
} from "$/common/worldgen/data.ts";
import { validate_feature } from "$/common/worldgen/features.ts";
} from "@/common/worldgen/data.ts";
import { validate_feature } from "@/common/worldgen/features.ts";
import { dirname } from "@std/path";
export { load_order, type LoadedMod, type ModReport };
@@ -125,14 +125,14 @@ function load_mod(mods_dir: string, id: string): LoadedMod {
error(`manifest.json: scripts.${side} ${path} doesn't exist`);
}
}
// bworld/engine needs engine_access, it's checked again on the bundled code when a .bmod loads
// cubi/engine needs engine_access, it's checked again on the bundled code when a .bmod loads
if (mod.manifest?.engine_access !== true) {
const folders = new Set(Object.values(scripts).filter((p) => typeof p === "string").map((p) => dirname(p)));
for (const folder of folders) {
for (const file of [...walk(`${dir}/${folder}`, ".ts"), ...walk(`${dir}/${folder}`, ".js")]) {
if (/["']bworld\/engine["']/.test(Deno.readTextFileSync(`${dir}/${folder}/${file}`))) {
if (/["']cubi\/engine["']/.test(Deno.readTextFileSync(`${dir}/${folder}/${file}`))) {
error(
`${folder}/${file} imports bworld/engine, which needs "engine_access": true in manifest.json`,
`${folder}/${file} imports cubi/engine, which needs "engine_access": true in manifest.json`,
);
}
}