Tags can now be added through a new sub gui in the NPC advanced tab.

This commit is contained in:
Luis C.M committed 2023-03-20 22:29:58 -05:00
1 parent 9a6cf94c73
commit aba24fc93c
7 files changed
+182 -20

No files matched your search

@@ -27,21 +27,24 @@ public class GuiNpcAdvanced extends GuiNPCInterface2 implements IGuiData
@Override
public void initGui(){
super.initGui();
this.addButton(new GuiNpcButton(3, guiLeft + 85 + 160, guiTop + 20, 52, 20, "selectServer.edit"));
this.addButton(new GuiNpcButton(8, guiLeft + 85, guiTop + 20,155,20, new String[]{"role.none","role.trader","role.follower","role.bank","role.transporter", "role.mailman", NoppesStringUtils.translate("role.companion", "(WIP)")},npc.advanced.role.ordinal()));
int y = guiTop + 10;
int gap = 21;
this.addButton(new GuiNpcButton(3, guiLeft + 85 + 160, y, 52, 20, "selectServer.edit"));
this.addButton(new GuiNpcButton(8, guiLeft + 85, y,155,20, new String[]{"role.none","role.trader","role.follower","role.bank","role.transporter", "role.mailman", NoppesStringUtils.translate("role.companion", "(WIP)")},npc.advanced.role.ordinal()));
getButton(3).setEnabled(npc.advanced.role != EnumRoleType.None && npc.advanced.role != EnumRoleType.Postman);
this.addButton(new GuiNpcButton(4, guiLeft + 85 + 160, guiTop + 43, 52, 20, "selectServer.edit"));
this.addButton(new GuiNpcButton(5, guiLeft + 85, guiTop + 43,155,20, new String[]{"job.none","job.bard","job.healer","job.guard","job.itemgiver","role.follower", "job.spawner", "job.conversation", "job.chunkloader"},npc.advanced.job.ordinal()));
this.addButton(new GuiNpcButton(4, guiLeft + 85 + 160, y += gap, 52, 20, "selectServer.edit"));
this.addButton(new GuiNpcButton(5, guiLeft + 85, y,155,20, new String[]{"job.none","job.bard","job.healer","job.guard","job.itemgiver","role.follower", "job.spawner", "job.conversation", "job.chunkloader"},npc.advanced.job.ordinal()));
getButton(4).setEnabled(npc.advanced.job != EnumJobType.None && npc.advanced.job != EnumJobType.ChunkLoader);
this.addButton(new GuiNpcButton(7, guiLeft + 85, guiTop + 66, 214, 20, "advanced.lines"));
this.addButton(new GuiNpcButton(9, guiLeft + 85, guiTop + 89, 214, 20, "menu.factions"));
this.addButton(new GuiNpcButton(10, guiLeft + 85, guiTop + 112, 214, 20, "dialog.dialogs"));
this.addButton(new GuiNpcButton(11, guiLeft + 85, guiTop + 135, 214, 20, "advanced.sounds"));
this.addButton(new GuiNpcButton(12, guiLeft + 85, guiTop + 158, 214, 20, "advanced.night"));
this.addButton(new GuiNpcButton(13, guiLeft + 85, guiTop + 181, 214, 20, "global.linked"));
this.addButton(new GuiNpcButton(7, guiLeft + 85, y += gap, 214, 20, "advanced.lines"));
this.addButton(new GuiNpcButton(9, guiLeft + 85, y += gap, 214, 20, "menu.factions"));
this.addButton(new GuiNpcButton(10, guiLeft + 85, y += gap, 214, 20, "dialog.dialogs"));
this.addButton(new GuiNpcButton(11, guiLeft + 85, y += gap, 214, 20, "advanced.sounds"));
this.addButton(new GuiNpcButton(12, guiLeft + 85, y += gap, 214, 20, "advanced.night"));
this.addButton(new GuiNpcButton(13, guiLeft + 85, y += gap, 214, 20, "global.linked"));
this.addButton(new GuiNpcButton(14, guiLeft + 85, y += gap, 214, 20, "menu.tags"));
}
@@ -92,6 +95,10 @@ public class GuiNpcAdvanced extends GuiNPCInterface2 implements IGuiData
save();
NoppesUtil.openGUI(player, new GuiNPCAdvancedLinkedNpc(npc));
}
if(button.id == 14){
save();
NoppesUtil.openGUI(player, new GuiNPCTagSetup(npc));
}
}
@Override