From c9beb3d158bee8d17fe4e057418710294f7eef65 Mon Sep 17 00:00:00 2001 From: WayZer Date: Wed, 6 Sep 2023 00:43:17 +0800 Subject: [PATCH 1/2] add `@server` to logic (#9018) * add @master to logic * remove `Vars.` * Update GlobalVars.java * Update GlobalVars.java --- core/src/mindustry/logic/GlobalVars.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/logic/GlobalVars.java b/core/src/mindustry/logic/GlobalVars.java index 3354277b13..57b30bcd7b 100644 --- a/core/src/mindustry/logic/GlobalVars.java +++ b/core/src/mindustry/logic/GlobalVars.java @@ -27,7 +27,7 @@ public class GlobalVars{ public static final Rand rand = new Rand(); //non-constants that depend on state - private static int varTime, varTick, varSecond, varMinute, varWave, varWaveTime; + private static int varTime, varTick, varSecond, varMinute, varWave, varWaveTime, varServer; private ObjectIntMap namesToIds = new ObjectIntMap<>(); private Seq vars = new Seq<>(Var.class); @@ -56,6 +56,8 @@ public class GlobalVars{ varWave = put("@waveNumber", 0); varWaveTime = put("@waveTime", 0); + varServer = put("@server", 0); + //special enums put("@ctrlProcessor", ctrlProcessor); put("@ctrlPlayer", ctrlPlayer); @@ -147,6 +149,9 @@ public class GlobalVars{ //wave state vars.items[varWave].numval = state.wave; vars.items[varWaveTime].numval = state.wavetime / 60f; + + //network + vars.items[varServer].numval = (net.server() || !net.active()) ? 1 : 0; } /** @return a piece of content based on its logic ID. This is not equivalent to content ID. */ From d0e3a691d1005655738a192211927baff8d2d656 Mon Sep 17 00:00:00 2001 From: DVD <91623750+Redik2@users.noreply.github.com> Date: Wed, 6 Sep 2023 17:55:20 +0300 Subject: [PATCH 2/2] Update servers_v7.json (#9028) * Update servers_v7.json Idk if i need to write description, but i will. My server is about pvp in open world, that generates every round again. Also there are serpulo and erekir content, that balanced not bad. * Update servers_v7.json Fixed ad(d)ress --- servers_v7.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servers_v7.json b/servers_v7.json index be3a6edafe..8c0286df69 100644 --- a/servers_v7.json +++ b/servers_v7.json @@ -223,5 +223,9 @@ { "name": "Alex Multiverse", "address": ["alexmindustryv7.servegame.com:25588", "alexmindustryv7.servegame.com:41962", "alexmindustrypvp.ddns.net:6767", "alexmindustrypvp.ddns.net:6768"] + }, + { + "name": "Open PVP", + "address": ["185.104.114.140:6567"] } ]