From 397d5b5d1b6303e516c801c91374a91eb34e99f2 Mon Sep 17 00:00:00 2001 From: buthed010203 Date: Thu, 9 Nov 2023 15:45:43 -0500 Subject: [PATCH] Autovote on map load as well --- core/src/mindustry/client/ClientLogic.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/mindustry/client/ClientLogic.kt b/core/src/mindustry/client/ClientLogic.kt index 07d16ab1d5..3502609ad2 100644 --- a/core/src/mindustry/client/ClientLogic.kt +++ b/core/src/mindustry/client/ClientLogic.kt @@ -88,6 +88,11 @@ class ClientLogic { Server.ohnoTask?.cancel() Server.ohnoTask = if (Server.fish() && settings.getBool("autoohno", false)) Timer.schedule({ Call.sendChatMessage("/ohno") }, 3f, 0.3f) else null frozenPlans.clear() + + when (val vote = settings.getInt("automapvote")) { + 1, 2, 3 -> Server.current.mapVote(vote - 1) + 4 -> Server.current.mapVote(Random.nextInt(0..2)) + } } configs.clear() control.input.lastVirusWarning = null