diff --git a/README.md b/README.md index 6c65927..11d40ef 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Construct's latest release can be downloaded from its [Releases Page](https://gi ### 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!* diff --git a/packs/BP/scripts/classes/MenuForm.js b/packs/BP/scripts/classes/MenuForm.js index 320ea2d..15b9198 100644 --- a/packs/BP/scripts/classes/MenuForm.js +++ b/packs/BP/scripts/classes/MenuForm.js @@ -34,6 +34,9 @@ export class MenuForm { if (selection === 0) { new BuilderForm(this.player); return void 0; + } else if (selection == structureCollection.getInstanceNames().length + 2) { + MenuFormBuilder.buildHowTo().show(this.player); + return void 0; } else { selection--; const selectedInstanceName = structureCollection.getInstanceNames()[selection]; @@ -80,10 +83,6 @@ export class MenuForm { return MenuFormBuilder.buildAllStructures().show(this.player).then((response) => { if (response.canceled) return; - if (response.selection === structureCollection.getWorldStructureIds().length + 1) { - MenuFormBuilder.buildHowTo().show(this.player); - return; - } const selectedStructureId = structureCollection.getWorldStructureIds()[response.selection]; return selectedStructureId || this.getOtherStructureId(); }); diff --git a/packs/BP/scripts/classes/MenuFormBuilder.js b/packs/BP/scripts/classes/MenuFormBuilder.js index a9a96ff..fdaa4cd 100644 --- a/packs/BP/scripts/classes/MenuFormBuilder.js +++ b/packs/BP/scripts/classes/MenuFormBuilder.js @@ -13,6 +13,7 @@ export class MenuFormBuilder { allInstanceNameForm.button(`${structureCollection.get(instanceName).isEnabled() ? '§2' : '§c'}${instanceName}`); }); allInstanceNameForm.button({ translate: 'construct.mainmenu.newinstance' }); + allInstanceNameForm.button({ translate: 'construct.mainmenu.howto' }); return allInstanceNameForm; } @@ -45,12 +46,12 @@ export class MenuFormBuilder { static buildHowTo() { const message = { rawtext: [ - { translate: 'construct.mainmenu.selectstructure.howto.add.header' }, { text: '\n' }, - { translate: 'construct.mainmenu.selectstructure.howto.add.structureblock' }, { text: '\n' }, - { translate: 'construct.mainmenu.selectstructure.howto.add.or' }, { text: '\n' }, - { translate: 'construct.mainmenu.selectstructure.howto.add.mcstructure' }, { text: '\n' }, - { text: '\n' }, { translate: 'construct.mainmenu.selectstructure.howto.remove.header' }, { text: '\n' }, - { translate: 'construct.mainmenu.selectstructure.howto.remove.body' }, { text: '\n' }, + { translate: 'construct.mainmenu.howto.add.header' }, { text: '\n' }, + { translate: 'construct.mainmenu.howto.add.structureblock' }, { text: '\n' }, + { translate: 'construct.mainmenu.howto.add.or' }, { text: '\n' }, + { translate: 'construct.mainmenu.howto.add.mcstructure' }, { text: '\n' }, + { text: '\n' }, { translate: 'construct.mainmenu.howto.remove.header' }, { text: '\n' }, + { translate: 'construct.mainmenu.howto.remove.body' }, { text: '\n' }, ] }; return new ActionFormData() .title(this.menuTitle) diff --git a/packs/RP/texts/en_US.lang b/packs/RP/texts/en_US.lang index 3856b6e..eaea005 100644 --- a/packs/RP/texts/en_US.lang +++ b/packs/RP/texts/en_US.lang @@ -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.title=§l§2Construct ## This is the name of the pack. construct.mainmenu.selectinstance=Select an instance: +construct.mainmenu.howto=How to Add/Remove Structures construct.mainmenu.settings=Builder Settings construct.mainmenu.newinstance=Create 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.selectstructure.header=Select a structure: 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.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.selectstructure.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.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.selectstructure.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.add.header=§aHow to Add Structures: +construct.mainmenu.howto.add.structureblock=§7- Save a structure using a §fstructure block§7 or the §f/structure§7 command. +construct.mainmenu.howto.add.or=§7§lOR§r +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.howto.remove.header=§cHow to Remove Structures: +construct.mainmenu.howto.remove.body=§7- Use the §f/structure delete§7 command to remove a structure from the world. ## Commands construct.commands.construct=Opens the Construct menu.