SteamWar/BauSystem2.0
Archiviert
12
0

Trace Refactor #233

Zusammengeführt
YoyoNow hat 121 Commits von TracerGUI nach master 2024-04-21 16:03:26 +02:00 zusammengeführt
2 geänderte Dateien mit 3 neuen und 4 gelöschten Zeilen
Nur Änderungen aus Commit 4422c249dc werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -79,8 +79,7 @@ public class TraceCommand extends SWCommand {
} }
@Register(value = {"show", "from"}, description = "TRACE_COMMAND_HELP_SHOW_FROM_WITH") @Register(value = {"show", "from"}, description = "TRACE_COMMAND_HELP_SHOW_FROM_WITH")
public void showFromTo(@Validator Player player, @Min(intValue = 0) int from, @StaticValue("with") String with, public void showFromTo(@Validator Player player, @Min(intValue = 0) int from, @StaticValue("with") String with, @OptionalValue("STRICT") BundleFilter bundleFilter, @ArrayLength(min = 1) ViewFlag... flags) {
@OptionalValue("STRICT") BundleFilter bundleFilter, @ArrayLength(min = 1) ViewFlag... flags) {
showInternal(player, from, Integer.MAX_VALUE, bundleFilter, flags); showInternal(player, from, Integer.MAX_VALUE, bundleFilter, flags);
BauSystem.MESSAGE.send("TRACE_MESSAGE_SHOW_FROM", player, from); BauSystem.MESSAGE.send("TRACE_MESSAGE_SHOW_FROM", player, from);
} }

Datei anzeigen

@ -29,8 +29,8 @@ public enum BundleFilter {
LOOSE((TNTPoint a, TNTPoint b) -> { LOOSE((TNTPoint a, TNTPoint b) -> {
if (a.isExplosion() != b.isExplosion()) return false; if (a.isExplosion() != b.isExplosion()) return false;
if (a.getLocation().distanceSquared(b.getLocation()) <= BundleFilter.pixelSizeSquared) return false; if (a.getLocation().distanceSquared(b.getLocation()) <= BundleFilter.pixelSizeSquared * 8) return false;
if (a.getVelocity().distanceSquared(b.getVelocity()) <= BundleFilter.pixelSizeSquared) return false; if (a.getVelocity().distanceSquared(b.getVelocity()) <= BundleFilter.pixelSizeSquared * 8) return false;
return true; return true;
}), }),