refactor: rename source -> origin in all commands

This commit is contained in:
ForestOfLight
2026-05-29 23:26:49 +02:00
Unverified
parent e0e12f5dd0
commit f750710732
17 changed files with 76 additions and 76 deletions
+5 -5
View File
@@ -12,22 +12,22 @@ export class VerifierCommand extends Command {
{ name: 'state', type: CustomCommandParamType.Boolean }
],
permissionLevel: CommandPermissionLevel.Any,
callback: (source, instanceName, state) => this.run(source, instanceName, state)
callback: (origin, instanceName, state) => this.run(origin, instanceName, state)
});
}
run(source, instanceName, state) {
run(origin, instanceName, state) {
const instance = structureCollection.get(instanceName);
if (state)
instance.setVerifierEnabled(true);
else
instance.setVerifierEnabled(false);
this.sendFeedback(source, instanceName, state);
this.sendFeedback(origin, instanceName, state);
return { status: CustomCommandStatus.Success };
}
sendFeedback(source, instanceName, state) {
source.sendMessage({ translate: state ? 'construct.commands.verifier.enabled' : 'construct.commands.verifier.disabled', with: [instanceName] });
sendFeedback(origin, instanceName, state) {
origin.sendMessage({ translate: state ? 'construct.commands.verifier.enabled' : 'construct.commands.verifier.disabled', with: [instanceName] });
}
}