SteamWar/BauSystem2.0
Archiviert
12
0

Add ShowModeParameterType.TICKS_SINCE_START
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-04-19 18:08:36 +02:00
Ursprung 7be2934e89
Commit 37b76eff30
3 geänderte Dateien mit 11 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -202,6 +202,8 @@ public class EntityShowMode implements ShowMode<TNTPosition> {
entity.setDisplayName(fuseTicks + ""); entity.setDisplayName(fuseTicks + "");
} else if (showModeParameter.isCount()) { } else if (showModeParameter.isCount()) {
entity.setDisplayName(new HashSet<>(records).size() + ""); entity.setDisplayName(new HashSet<>(records).size() + "");
} else if (showModeParameter.isTicksSinceStart()) {
entity.setDisplayName((80 - fuseTicks) + tntPosition.getRecord().getOffset() + "");
} }
} }

Datei anzeigen

@ -31,6 +31,7 @@ public class ShowModeParameter {
private boolean ticks = false; private boolean ticks = false;
private boolean count = false; private boolean count = false;
private boolean buildDestroyOnly = false; private boolean buildDestroyOnly = false;
private boolean ticksSinceStart = false;
public void enableWater() { public void enableWater() {
this.water = true; this.water = true;
@ -63,4 +64,8 @@ public class ShowModeParameter {
public void enableBuildDestroyOnly() { public void enableBuildDestroyOnly() {
this.buildDestroyOnly = true; this.buildDestroyOnly = true;
} }
public void enableTicksSinceStart() {
this.ticksSinceStart = true;
}
} }

Datei anzeigen

@ -38,9 +38,10 @@ public enum ShowModeParameterType {
}, Arrays.asList("-advanced", "-a"), "INTERPOLATE_Y", "INTERPOLATE_XZ"), }, Arrays.asList("-advanced", "-a"), "INTERPOLATE_Y", "INTERPOLATE_XZ"),
SOURCE(ShowModeParameter::enableSourceOnly, Arrays.asList("-source", "-sourceonly", "-ignite"), "TICKS", "ADVANCED", "INTERPOLATE_Y", "INTERPOLATE_XZ", "WATER"), SOURCE(ShowModeParameter::enableSourceOnly, Arrays.asList("-source", "-sourceonly", "-ignite"), "TICKS", "ADVANCED", "INTERPOLATE_Y", "INTERPOLATE_XZ", "WATER"),
EXPLODE(ShowModeParameter::enableExplodeOnly, Arrays.asList("-explode", "-explodeonly"), "TICKS", "ADVANCED", "INTERPOLATE_Y", "INTERPOLATE_XZ", "WATER"), EXPLODE(ShowModeParameter::enableExplodeOnly, Arrays.asList("-explode", "-explodeonly"), "TICKS", "ADVANCED", "INTERPOLATE_Y", "INTERPOLATE_XZ", "WATER"),
TICKS(ShowModeParameter::enableTicks, Arrays.asList("-ticks", "-t"), "EXPLODE", "SOURCE", "COUNT"), TICKS(ShowModeParameter::enableTicks, Arrays.asList("-ticks", "-t"), "EXPLODE", "SOURCE", "COUNT", "TICKS_SINCE_START"),
COUNT(ShowModeParameter::enableCount, Arrays.asList("-count", "-c"), "COUNT"), COUNT(ShowModeParameter::enableCount, Arrays.asList("-count", "-c"), "TICKS", "TICKS_SINCE_START"),
BUILD_DESTROY_ONLY(ShowModeParameter::enableBuildDestroyOnly, Arrays.asList("-builddestroy", "-builddestoryonly"), "WATER"); BUILD_DESTROY_ONLY(ShowModeParameter::enableBuildDestroyOnly, Arrays.asList("-builddestroy", "-builddestoryonly"), "WATER"),
TICKS_SINCE_START(ShowModeParameter::enableTicksSinceStart, Arrays.asList("-tickssincestart", "-tss"), "TICKS", "COUNT");
@Getter @Getter
private final Consumer<ShowModeParameter> showModeParameterConsumer; private final Consumer<ShowModeParameter> showModeParameterConsumer;