Add lobby particle slot menus

Replace the particle inventory with a main menu showing the 7 slots and
unlocked presets, a slot editor with a read-only view for locked slots,
and an entry editor with pickers for designs, choices, colours and icons.
Slots are limited to 10 entries and a particles-per-tick budget.
This commit is contained in:
2026-10-26 09:48:00 +01:00
parent 211e2693cf
commit c95901bc42
12 changed files with 1041 additions and 77 deletions
@@ -22,7 +22,9 @@ package de.steamwar.lobby.particle.slot;
import com.google.gson.JsonParser;
import de.steamwar.lobby.LobbySystem;
import de.steamwar.lobby.particle.ParticleRequirement;
import de.steamwar.sql.SteamwarUser;
import de.steamwar.sql.UserConfig;
import de.steamwar.sql.UserPerm;
import lombok.experimental.UtilityClass;
import java.util.logging.Level;
@@ -31,8 +33,14 @@ import java.util.logging.Level;
public class ParticleSlots {
public final int COUNT = 7;
public final int MAX_ENTRIES = 10;
private final String KEY_PREFIX = "lobby-particle-slot-";
// Particle positions per tick a slot may spawn
public double maxCost(SteamwarUser user) {
return user.hasPerm(UserPerm.TEAM) ? 80 : 40;
}
// Slots 1-3 for everyone, 4-5 for team members, 6-7 for the server team
public ParticleRequirement requirement(int index) {
if (index < 3) return ParticleRequirement.NO_REQUIRMENT;