From 577e184903ee53026559b58a9f111df0576b7861 Mon Sep 17 00:00:00 2001 From: Lett Date: Thu, 5 Mar 2026 23:56:28 -0500 Subject: [PATCH] Hide slider in multiplayer Removing IPs from DOS ban list gets a little annoying fast ngl --- mod.json | 2 +- scripts/main.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mod.json b/mod.json index 0d5f426..e3dff7c 100644 --- a/mod.json +++ b/mod.json @@ -3,7 +3,7 @@ "displayName": "Time Control", "author": "[royal]sk7725[]", "description": "Speeds up or slows down Mindustry.\n[accent]Press on 'x#' to fold the slider.[]\nPress and hold to unfold.\n\n[scarlet]Disclaimer: not intended for multiplayer use![]", - "version": "0.2", + "version": "0.3", "hidden": true, "minGameVersion": 136 } diff --git a/scripts/main.js b/scripts/main.js index b9dd55a..66ab883 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -82,6 +82,14 @@ function speedText(speed){ } function visibility(){ + if (Vars.net.active()) { + let speed = 1; + Time.setDeltaProvider(() => Math.min(Core.graphics.getDeltaTime() * 60 * speed, 3 * speed)); + foldedButton.setText(speedText(0)); + timeSlider.setValue(0); + + return false; + }; if(!Vars.ui.hudfrag.shown || Vars.ui.minimapfrag.shown()) return false; if(!Vars.mobile) return true;