feat: rename /info -> /instanceinfo
This commit is contained in:
+12
-12
@@ -3,11 +3,11 @@ import { Command } from '../classes/Commands/Command';
|
||||
import { structureCollection } from '../classes/Structure/StructureCollection';
|
||||
import { Vector } from '../lib/Vector';
|
||||
|
||||
export class InfoCommand extends Command {
|
||||
export class InstanceInfoCommand extends Command {
|
||||
constructor() {
|
||||
super({
|
||||
name: 'info',
|
||||
description: 'construct.commands.info',
|
||||
name: 'instanceinfo',
|
||||
description: 'construct.commands.instanceinfo',
|
||||
mandatoryParameters: [
|
||||
{ name: 'instanceName', type: CustomCommandParamType.String }
|
||||
],
|
||||
@@ -38,37 +38,37 @@ export class InfoCommand extends Command {
|
||||
}
|
||||
|
||||
getHeaderText(instance) {
|
||||
return { translate: 'construct.commands.info.header', with: [instance.getName()] };
|
||||
return { translate: 'construct.commands.instanceinfo.header', with: [instance.getName()] };
|
||||
}
|
||||
|
||||
getStructureIdText(instance) {
|
||||
return { translate: 'construct.commands.info.structure', with: [instance.getStructureId()] };
|
||||
return { translate: 'construct.commands.instanceinfo.structure', with: [instance.getStructureId()] };
|
||||
}
|
||||
|
||||
getLocationText(instance) {
|
||||
if (!instance.hasLocation())
|
||||
return { translate: 'construct.commands.info.noLocation' };
|
||||
return { translate: 'construct.commands.instanceinfo.noLocation' };
|
||||
const { dimensionId, location } = instance.getLocation();
|
||||
return { translate: 'construct.commands.info.location', with: [location.toString(), dimensionId.replace('minecraft:', '')] };
|
||||
return { translate: 'construct.commands.instanceinfo.location', with: [location.toString(), dimensionId.replace('minecraft:', '')] };
|
||||
}
|
||||
|
||||
getEnabledText(instance) {
|
||||
return { translate: 'construct.commands.info.enabled', with: [String(instance.isEnabled())] };
|
||||
return { translate: 'construct.commands.instanceinfo.enabled', with: [String(instance.isEnabled())] };
|
||||
}
|
||||
|
||||
getLayerText(instance) {
|
||||
return { translate: 'construct.commands.info.layer', with: [String(instance.getLayer()), String(instance.getMaxLayer())] };
|
||||
return { translate: 'construct.commands.instanceinfo.layer', with: [String(instance.getLayer()), String(instance.getMaxLayer())] };
|
||||
}
|
||||
|
||||
getVerifierText(instance) {
|
||||
const verifier = instance.options.verifier;
|
||||
return { translate: 'construct.commands.info.verifier', with: [String(verifier.isEnabled)] };
|
||||
return { translate: 'construct.commands.instanceinfo.verifier', with: [String(verifier.isEnabled)] };
|
||||
}
|
||||
|
||||
getSizeText(instance) {
|
||||
const bounds = instance.getBounds();
|
||||
return { translate: 'construct.commands.info.size', with: [bounds.max.toString(), Vector.volume(bounds.min, bounds.max).toString()] };
|
||||
return { translate: 'construct.commands.instanceinfo.size', with: [bounds.max.toString(), Vector.volume(bounds.min, bounds.max).toString()] };
|
||||
}
|
||||
}
|
||||
|
||||
export const infoCommand = new InfoCommand();
|
||||
export const instanceInfoCommand = new InstanceInfoCommand();
|
||||
@@ -23,7 +23,7 @@ import './commands/NextLayerCommand';
|
||||
import './commands/PrevLayerCommand';
|
||||
import './commands/VerifierCommand';
|
||||
import './commands/OptionCommand';
|
||||
import './commands/InfoCommand';
|
||||
import './commands/InstanceInfoCommand';
|
||||
import './commands/StatsCommand';
|
||||
import './commands/MaterialsCommand';
|
||||
import './commands/TagCommand';
|
||||
|
||||
+10
-10
@@ -165,16 +165,16 @@ construct.commands.option=Toggle your Construct builder options.
|
||||
construct.commands.option.success=§aSet option "%1" to %2.
|
||||
construct.commands.option.unknownOption=§cUnknown option "%1".
|
||||
|
||||
## construct:info
|
||||
construct.commands.info=Print Construct instance details to chat.
|
||||
construct.commands.info.header=§a=== Instance Info for "%1" ===§r
|
||||
construct.commands.info.structure=§7Structure:§r %1
|
||||
construct.commands.info.location=§7Location:§r %1 in %2
|
||||
construct.commands.info.noLocation=§7Location:§r (none)
|
||||
construct.commands.info.enabled=§7Enabled:§r %1
|
||||
construct.commands.info.layer=§7Layer:§r %1 / %2
|
||||
construct.commands.info.verifier=§7Verifier running:§r %1
|
||||
construct.commands.info.size=§7Size:§r %1 (%2 blocks)
|
||||
## construct:instanceinfo
|
||||
construct.commands.instanceinfo=Print Construct instance details to chat.
|
||||
construct.commands.instanceinfo.header=§a=== Instance Info for "%1" ===§r
|
||||
construct.commands.instanceinfo.structure=§7Structure:§r %1
|
||||
construct.commands.instanceinfo.location=§7Location:§r %1 in %2
|
||||
construct.commands.instanceinfo.noLocation=§7Location:§r (none)
|
||||
construct.commands.instanceinfo.enabled=§7Enabled:§r %1
|
||||
construct.commands.instanceinfo.layer=§7Layer:§r %1 / %2
|
||||
construct.commands.instanceinfo.verifier=§7Verifier running:§r %1
|
||||
construct.commands.instanceinfo.size=§7Size:§r %1 (%2 blocks)
|
||||
|
||||
## construct:stats
|
||||
construct.commands.stats=Run the Construct structure verifier and print statistics.
|
||||
|
||||
Reference in New Issue
Block a user