sharing contexts

This commit is contained in:
2026-11-14 13:49:21 -03:00
parent 313098892e
commit a69db0cd2a
13 changed files with 192 additions and 208 deletions
+1 -1
View File
@@ -70,8 +70,8 @@ export class BlockRules {
readonly told?: (x: number, y: number, z: number, from: Position) => void,
) {}
// checked by the shared context, see common/shared_context.ts
register(mod: string, id: string, rules: Rules) {
if (this.#rules.has(id)) throw new Error(`[${mod}] the rules of ${id} are registered twice`);
this.#rules.set(id, { mod, rules });
}