move howto to top-level menu
This commit is contained in:
@@ -37,7 +37,7 @@ Construct's latest release can be downloaded from its [Releases Page](https://gi
|
|||||||
|
|
||||||
### Construct Menu
|
### Construct Menu
|
||||||
|
|
||||||
Use `/construct:item` to get the Construct item, which opens the Construct menu. This item is also available in the Creative inventory under the "Items" tab. Using the Construct item will open a menu where you can manage your structures instances. You can create new instances of structures, edit existing ones, and delete them when you no longer need them. There are plenty options available to customize your building style!
|
Use `/construct:construct` to get the Construct item, which opens the Construct menu. This item is also available in the Creative inventory under the "Items" tab. Using the Construct item will open a menu where you can manage your structures instances. You can create new instances of structures, edit existing ones, and delete them when you no longer need them. There are plenty options available to customize your building style!
|
||||||
|
|
||||||
*Pro tip: You can name the Construct item after a structure instance to automagically select it when you open the menu!*
|
*Pro tip: You can name the Construct item after a structure instance to automagically select it when you open the menu!*
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ export class MenuForm {
|
|||||||
if (selection === 0) {
|
if (selection === 0) {
|
||||||
new BuilderForm(this.player);
|
new BuilderForm(this.player);
|
||||||
return void 0;
|
return void 0;
|
||||||
|
} else if (selection == structureCollection.getInstanceNames().length + 2) {
|
||||||
|
MenuFormBuilder.buildHowTo().show(this.player);
|
||||||
|
return void 0;
|
||||||
} else {
|
} else {
|
||||||
selection--;
|
selection--;
|
||||||
const selectedInstanceName = structureCollection.getInstanceNames()[selection];
|
const selectedInstanceName = structureCollection.getInstanceNames()[selection];
|
||||||
@@ -80,10 +83,6 @@ export class MenuForm {
|
|||||||
return MenuFormBuilder.buildAllStructures().show(this.player).then((response) => {
|
return MenuFormBuilder.buildAllStructures().show(this.player).then((response) => {
|
||||||
if (response.canceled)
|
if (response.canceled)
|
||||||
return;
|
return;
|
||||||
if (response.selection === structureCollection.getWorldStructureIds().length + 1) {
|
|
||||||
MenuFormBuilder.buildHowTo().show(this.player);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const selectedStructureId = structureCollection.getWorldStructureIds()[response.selection];
|
const selectedStructureId = structureCollection.getWorldStructureIds()[response.selection];
|
||||||
return selectedStructureId || this.getOtherStructureId();
|
return selectedStructureId || this.getOtherStructureId();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export class MenuFormBuilder {
|
|||||||
allInstanceNameForm.button(`${structureCollection.get(instanceName).isEnabled() ? '§2' : '§c'}${instanceName}`);
|
allInstanceNameForm.button(`${structureCollection.get(instanceName).isEnabled() ? '§2' : '§c'}${instanceName}`);
|
||||||
});
|
});
|
||||||
allInstanceNameForm.button({ translate: 'construct.mainmenu.newinstance' });
|
allInstanceNameForm.button({ translate: 'construct.mainmenu.newinstance' });
|
||||||
|
allInstanceNameForm.button({ translate: 'construct.mainmenu.howto' });
|
||||||
return allInstanceNameForm;
|
return allInstanceNameForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,12 +46,12 @@ export class MenuFormBuilder {
|
|||||||
|
|
||||||
static buildHowTo() {
|
static buildHowTo() {
|
||||||
const message = { rawtext: [
|
const message = { rawtext: [
|
||||||
{ translate: 'construct.mainmenu.selectstructure.howto.add.header' }, { text: '\n' },
|
{ translate: 'construct.mainmenu.howto.add.header' }, { text: '\n' },
|
||||||
{ translate: 'construct.mainmenu.selectstructure.howto.add.structureblock' }, { text: '\n' },
|
{ translate: 'construct.mainmenu.howto.add.structureblock' }, { text: '\n' },
|
||||||
{ translate: 'construct.mainmenu.selectstructure.howto.add.or' }, { text: '\n' },
|
{ translate: 'construct.mainmenu.howto.add.or' }, { text: '\n' },
|
||||||
{ translate: 'construct.mainmenu.selectstructure.howto.add.mcstructure' }, { text: '\n' },
|
{ translate: 'construct.mainmenu.howto.add.mcstructure' }, { text: '\n' },
|
||||||
{ text: '\n' }, { translate: 'construct.mainmenu.selectstructure.howto.remove.header' }, { text: '\n' },
|
{ text: '\n' }, { translate: 'construct.mainmenu.howto.remove.header' }, { text: '\n' },
|
||||||
{ translate: 'construct.mainmenu.selectstructure.howto.remove.body' }, { text: '\n' },
|
{ translate: 'construct.mainmenu.howto.remove.body' }, { text: '\n' },
|
||||||
] };
|
] };
|
||||||
return new ActionFormData()
|
return new ActionFormData()
|
||||||
.title(this.menuTitle)
|
.title(this.menuTitle)
|
||||||
|
|||||||
@@ -68,21 +68,21 @@ construct.mainmenu.instance.exists=§cInstance '%s' already exists. Try again wi
|
|||||||
construct.mainmenu.instance.notfound=§cStructure ID '%s' not found. If you're looking for a structure that you put in the structures folder, please restart your world and try again. ## Insert string: structure name
|
construct.mainmenu.instance.notfound=§cStructure ID '%s' not found. If you're looking for a structure that you put in the structures folder, please restart your world and try again. ## Insert string: structure name
|
||||||
construct.mainmenu.title=§l§2Construct ## This is the name of the pack.
|
construct.mainmenu.title=§l§2Construct ## This is the name of the pack.
|
||||||
construct.mainmenu.selectinstance=Select an instance:
|
construct.mainmenu.selectinstance=Select an instance:
|
||||||
|
construct.mainmenu.howto=How to Add/Remove Structures
|
||||||
construct.mainmenu.settings=Builder Settings
|
construct.mainmenu.settings=Builder Settings
|
||||||
construct.mainmenu.newinstance=Create New Instance
|
construct.mainmenu.newinstance=Create New Instance
|
||||||
construct.mainmenu.newinstance.prompt=Enter a name for the new instance:
|
construct.mainmenu.newinstance.prompt=Enter a name for the new instance:
|
||||||
construct.mainmenu.newinstance.placeholder=example_instance ## The placeholder text in the textbox where the user enters the instance name.
|
construct.mainmenu.newinstance.placeholder=example_instance ## The placeholder text in the textbox where the user enters the instance name.
|
||||||
construct.mainmenu.selectstructure.header=Select a structure:
|
construct.mainmenu.selectstructure.header=Select a structure:
|
||||||
construct.mainmenu.selectstructure.other=Other
|
construct.mainmenu.selectstructure.other=Other
|
||||||
construct.mainmenu.selectstructure.howto=How to Add/Remove Structures
|
|
||||||
construct.mainmenu.selectstructure.other.prompt=Enter the Structure ID:
|
construct.mainmenu.selectstructure.other.prompt=Enter the Structure ID:
|
||||||
construct.mainmenu.selectstructure.other.placeholder=example_structure ## The placeholder text in the textbox where the user enters the structure name.
|
construct.mainmenu.selectstructure.other.placeholder=example_structure ## The placeholder text in the textbox where the user enters the structure name.
|
||||||
construct.mainmenu.selectstructure.howto.add.header=§aHow to Add Structures:
|
construct.mainmenu.howto.add.header=§aHow to Add Structures:
|
||||||
construct.mainmenu.selectstructure.howto.add.structureblock=§7- Save a structure using a §fstructure block§7 or the §f/structure§7 command.
|
construct.mainmenu.howto.add.structureblock=§7- Save a structure using a §fstructure block§7 or the §f/structure§7 command.
|
||||||
construct.mainmenu.selectstructure.howto.add.or=§7§lOR§r
|
construct.mainmenu.howto.add.or=§7§lOR§r
|
||||||
construct.mainmenu.selectstructure.howto.add.mcstructure=§7- Add a §f.mcstructure§7 file to this pack's §fstructures folder§7. When selecting your structure, select the §fOther§7 option and then use the filename (without '.mcstructure') as the §fStructure ID§7. After its first use, it will be added to the list of structures.
|
construct.mainmenu.howto.add.mcstructure=§7- Add a §f.mcstructure§7 file to this pack's §fstructures folder§7. When selecting your structure, select the §fOther§7 option and then use the filename (without '.mcstructure') as the §fStructure ID§7. After its first use, it will be added to the list of structures.
|
||||||
construct.mainmenu.selectstructure.howto.remove.header=§cHow to Remove Structures:
|
construct.mainmenu.howto.remove.header=§cHow to Remove Structures:
|
||||||
construct.mainmenu.selectstructure.howto.remove.body=§7- Use the §f/structure delete§7 command to remove a structure from the world.
|
construct.mainmenu.howto.remove.body=§7- Use the §f/structure delete§7 command to remove a structure from the world.
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
construct.commands.construct=Opens the Construct menu.
|
construct.commands.construct=Opens the Construct menu.
|
||||||
|
|||||||
Reference in New Issue
Block a user