Rename engine to cubi
This commit is contained in:
@@ -176,7 +176,7 @@ export class ModRuntime {
|
||||
effect_components = new Map<string, { mod: string; component: EffectComponent }>();
|
||||
// every command, the engine's and mods', see common/commands.ts
|
||||
commands = new CommandDispatcher<ServerCommandSource>();
|
||||
// who registered each command name: "engine" or a mod's id
|
||||
// who registered each command name: "cubi" or a mod's id
|
||||
command_owners = new Map<string, string>();
|
||||
|
||||
before: Before = {
|
||||
@@ -478,14 +478,14 @@ export class ModRuntime {
|
||||
const existing = this.command_owners.get(node.name);
|
||||
if (existing) {
|
||||
throw new Error(
|
||||
existing === "engine"
|
||||
existing === "cubi"
|
||||
? `/${node.name} belongs to the engine`
|
||||
: `/${node.name} is also registered by ${existing}`,
|
||||
);
|
||||
}
|
||||
this.commands.register(node);
|
||||
this.command_owners.set(node.name, owner);
|
||||
if (owner !== "engine") {
|
||||
if (owner !== "cubi") {
|
||||
const alias = new CommandNode<ServerCommandSource>(`${owner}:${node.name}`);
|
||||
alias.children.push(...node.children);
|
||||
alias.command = node.command;
|
||||
|
||||
Reference in New Issue
Block a user