From fb6479bb05ec8655d9ab8565c1a5c7fdaaed28c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20Ro=C3=9Fbacher?= Date: Fri, 3 Nov 2023 16:18:31 +0100 Subject: [PATCH] Update README.md --- README.md | 14 +++++++++++--- .../render/RenderGameOverlayHandler.java | 2 +- .../zombiesutils/timer/recorder/Category.java | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3e81498..267aba7 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,14 @@ Disclaimers ## For Users The Timer automatically splits every round. The Personal-Best-recorder automatically distinguishes between maps and difficulties. ### Commands -- /runCategory - Switches to the category called name. All recorded times are bound to its category. Tabcomplete suggests already existing categories, but you can insert a new (clean) one as well. - - Examples: /runCategory pistol_only, /runCategory casual - - selected on launch: default +- /runCategory \ - Switches to the category called name. All recorded times are bound to its category. Tabcomplete suggests already existing categories, but you can insert a new (clean) one as well. + - Examples: + - /runCategory pistol_only + - /runCategory casual + - default name: general +- /sla \ + - /sla toggle - Enables / disables the overlay + - default state: disabled + - /sla set \ - forcefully set the map + - /sla offset \ \ \ - set an offset, allowing you to use sla on map-recreations, such as housings + diff --git a/src/main/java/com/github/stachelbeere1248/zombiesutils/render/RenderGameOverlayHandler.java b/src/main/java/com/github/stachelbeere1248/zombiesutils/render/RenderGameOverlayHandler.java index 12a9451..1f11e8c 100644 --- a/src/main/java/com/github/stachelbeere1248/zombiesutils/render/RenderGameOverlayHandler.java +++ b/src/main/java/com/github/stachelbeere1248/zombiesutils/render/RenderGameOverlayHandler.java @@ -22,7 +22,6 @@ public class RenderGameOverlayHandler { @SubscribeEvent public void onRenderGameOverlay(RenderGameOverlayEvent.Post event) { - if (!Scoreboard.isZombies()) return; if (event.type != RenderGameOverlayEvent.ElementType.TEXT) return; Timer.getInstance().ifPresent(timer -> renderTime(timer.roundTime())); if (Sla.isEnabled()) Sla.getInstance().ifPresent(sla -> { @@ -33,6 +32,7 @@ public class RenderGameOverlayHandler { } private void renderTime(long timerTicks) { + if (!Scoreboard.isZombies()) return; long minutesPart = (timerTicks*50) / 60000; long secondsPart = ((timerTicks*50) % 60000) / 1000; long tenthSecondsPart = ((timerTicks*50) % 1000) / 100; diff --git a/src/main/java/com/github/stachelbeere1248/zombiesutils/timer/recorder/Category.java b/src/main/java/com/github/stachelbeere1248/zombiesutils/timer/recorder/Category.java index 74308c2..f0c4e71 100644 --- a/src/main/java/com/github/stachelbeere1248/zombiesutils/timer/recorder/Category.java +++ b/src/main/java/com/github/stachelbeere1248/zombiesutils/timer/recorder/Category.java @@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull; import java.io.File; public class Category { - private static String selectedCategory = "default"; // read from config ? + private static String selectedCategory = "general"; // read from config ? public final TimesFile[] timesFiles = new TimesFile[7]; private final String name; public Category() {