Change imports
This commit is contained in:
+7
-7
@@ -3,7 +3,7 @@
|
||||
|
||||
// loot tables: rolling them, checking them, and the game using them for blocks, mobs and scripts
|
||||
import { assert, assertEquals, assertThrows } from "@std/assert";
|
||||
import { EverythingRegistry, type ItemRegistry } from "$/common/everything_registry.ts";
|
||||
import { EverythingRegistry, type ItemRegistry } from "@/common/everything_registry.ts";
|
||||
import {
|
||||
type BaseLootContext,
|
||||
type LootEnvironment,
|
||||
@@ -11,11 +11,11 @@ import {
|
||||
number,
|
||||
roll_loot,
|
||||
validate_loot_table,
|
||||
} from "$/common/loot.ts";
|
||||
import { Tags } from "$/common/tags.ts";
|
||||
import { load_and_check } from "$/tools/check_mods.ts";
|
||||
import { create_entity } from "$/server/game/entity/entity_types.ts";
|
||||
import type { LivingEntity } from "$/server/game/entity/living_entity.ts";
|
||||
} from "@/common/loot.ts";
|
||||
import { Tags } from "@/common/tags.ts";
|
||||
import { load_and_check } from "@/tools/check_mods.ts";
|
||||
import { create_entity } from "@/server/game/entity/entity_types.ts";
|
||||
import type { LivingEntity } from "@/server/game/entity/living_entity.ts";
|
||||
import { copy_dir, test_game } from "./helpers.ts";
|
||||
|
||||
// the tables, registered fresh, with a tool and a tag to match
|
||||
@@ -232,7 +232,7 @@ function loot_mod(dir: string) {
|
||||
Deno.mkdirSync(`${mod}/scripts`);
|
||||
Deno.writeTextFileSync(
|
||||
`${mod}/scripts/server.ts`,
|
||||
`import type { ServerContext } from "bworld/server";
|
||||
`import type { ServerContext } from "cubi/server";
|
||||
export function setup(ctx: ServerContext) {
|
||||
ctx.loot.register_condition("testloot:high", (_params, context) => (context.position?.y ?? 0) > 120);
|
||||
ctx.loot.register_function("testloot:double", (item) => ({ ...item, count: item.count * 2 }));
|
||||
|
||||
Reference in New Issue
Block a user