Add NPC inline edit support and adjust ability launch mechanics

This commit is contained in:
Kam committed 2026-02-13 15:01:28 -05:00
1 parent ac223cbb53
commit 910f3b3744
7 files changed
+76 -3

No files matched your search

@@ -254,6 +254,7 @@ public class GuiNPCAbilities extends GuiNPCInterface2 implements IScrollData, IC
} else {
Ability ability = slot.getAbility();
if (ability != null) {
ability.setNpcInlineEdit(true);
setSubGui(ability.createConfigGui(this));
}
}
@@ -303,6 +304,7 @@ public class GuiNPCAbilities extends GuiNPCInterface2 implements IScrollData, IC
Ability abilityToSave = npcSlots.get(selectedAbilityIndex).getAbility();
if (abilityToSave != null) {
if (abilityToSave.getName() == null || abilityToSave.getName().isEmpty()) {
abilityToSave.setNpcInlineEdit(true);
setSubGui(abilityToSave.createConfigGui(this));
} else {
setSubGui(new SubGuiAbilitySaveConfirm(abilityToSave, null, existingPresetNames));
@@ -632,6 +634,7 @@ public class GuiNPCAbilities extends GuiNPCInterface2 implements IScrollData, IC
setSubGui(new SubGuiAbilityEditMode());
} else {
if (ability != null) {
ability.setNpcInlineEdit(true);
setSubGui(ability.createConfigGui(this));
}
}
@@ -690,6 +693,7 @@ public class GuiNPCAbilities extends GuiNPCInterface2 implements IScrollData, IC
Ability ability = slot.getAbility();
if (ability != null) {
ability.setId(UUID.randomUUID().toString());
ability.setNpcInlineEdit(true);
setSubGui(ability.createConfigGui(this));
}
updateNpcAbilitiesList();