forked from SteamWar/SteamWar
Quiet no-op particle setting clicks and show entry particle counts
Clicking a step past the minimum or maximum, or setting an unchanged value, now does nothing instead of showing the budget message, and changes that lower a slot's particles are allowed even over budget. Entries show their particles per tick in the slot editor list, and the entry editor's paper shows the edited entry's share.
This commit is contained in:
@@ -91,6 +91,8 @@ class ValueEditors {
|
||||
double next = Math.max(min, Math.min(max, unclamped));
|
||||
String limit = next == max && unclamped >= max ? "PARTICLE_NUMBER_AT_MAX" : next == min && unclamped <= min ? "PARTICLE_NUMBER_AT_MIN" : "PARTICLE_NUMBER_RESULT";
|
||||
return new SWItem(material, label, List.of(msg(limit, player, number(next))), false, clickType -> {
|
||||
// Stepping past the minimum or maximum changes nothing, so it does nothing
|
||||
if (next == value) return;
|
||||
apply.test(next);
|
||||
reopen.run();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user