Move effects into the modding api

This commit is contained in:
2026-10-02 11:53:44 -03:00
parent 4309c700d2
commit e5dcb97643
33 changed files with 458 additions and 109 deletions
+3
View File
@@ -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,