Simplify lobby particle menus

Every menu item now acts on a plain click: slots open their editor with a
use button, entries open their editor, and duplicating is gone. The entry
editor groups settings into labelled rows, numbers and colours get their
own screens instead of relying on right click or Q, and slot names show
the particles per tick used out of the maximum.
This commit is contained in:
2026-10-26 09:48:20 +01:00
parent 98f04451a4
commit b60cdfc88d
8 changed files with 347 additions and 221 deletions
@@ -25,6 +25,8 @@ import de.steamwar.lobby.particle.UnlockContext;
import de.steamwar.lobby.particle.design.*;
import de.steamwar.lobby.particle.slot.ParticleEntry;
import de.steamwar.lobby.particle.slot.ParticleSlot;
import de.steamwar.lobby.particle.slot.ParticleSlots;
import de.steamwar.sql.SteamwarUser;
import lombok.experimental.UtilityClass;
import org.bukkit.entity.Player;
@@ -136,6 +138,15 @@ class ParticleGuiText {
}
}
// The slot's name followed by how many of its allowed particles per tick it uses
String slotName(ParticleSlot slot, SteamwarUser user, Player player) {
return msg("PARTICLE_SLOT_NAME", player, slot.getName(), number(slot.cost()), number(ParticleSlots.maxCost(user)));
}
String slotTitle(ParticleSlot slot, SteamwarUser user, Player player) {
return msg("PARTICLE_SLOT_TITLE", player, slot.getName(), number(slot.cost()), number(ParticleSlots.maxCost(user)));
}
List<String> slotSummary(ParticleSlot slot, Player player) {
List<String> lore = new ArrayList<>();
lore.add(msg("PARTICLE_SLOT_ENTRIES", player, slot.getEntries().size()));