Move effects into the modding api
This commit is contained in:
@@ -8,6 +8,7 @@ import type { WorldSave } from "./saves.ts";
|
||||
import { ModRuntime } from "./mod_runtime.ts";
|
||||
import { register_entity_type } from "./entity/entity_types.ts";
|
||||
import { mod_entity_factory } from "./entity/mod_entity.ts";
|
||||
import { set_effect_types } from "./entity/effects.ts";
|
||||
|
||||
export interface ServerModSource {
|
||||
listing: ModListing;
|
||||
@@ -34,6 +35,8 @@ export async function start_game(
|
||||
const worldgen = await load_worldgen(worldgen_scripts, recipes.ores);
|
||||
|
||||
const runtime = new ModRuntime();
|
||||
// before the world loads, its mobs can have effects
|
||||
set_effect_types(runtime.effect_types());
|
||||
const game = new GameServer(host, save, default_seed, {
|
||||
listings: mods.map((mod) => mod.listing),
|
||||
recipes,
|
||||
|
||||
Reference in New Issue
Block a user