From f73c49b246105bdaa54b6ab764949a2a888a87af Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 7 Jun 2021 14:55:14 -0400 Subject: [PATCH] Moved effect calls back to correct class --- core/src/mindustry/core/NetClient.java | 14 ++++++++++++++ core/src/mindustry/ui/Menus.java | 16 +--------------- gradle.properties | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/core/src/mindustry/core/NetClient.java b/core/src/mindustry/core/NetClient.java index 11653e2d0c..22472cbcea 100644 --- a/core/src/mindustry/core/NetClient.java +++ b/core/src/mindustry/core/NetClient.java @@ -2,6 +2,7 @@ package mindustry.core; import arc.*; import arc.func.*; +import arc.graphics.*; import arc.math.*; import arc.struct.*; import arc.util.*; @@ -11,6 +12,7 @@ import arc.util.serialization.*; import mindustry.*; import mindustry.annotations.Annotations.*; import mindustry.core.GameState.*; +import mindustry.entities.*; import mindustry.entities.units.*; import mindustry.game.EventType.*; import mindustry.game.*; @@ -157,6 +159,18 @@ public class NetClient implements ApplicationListener{ clientPacketReliable(type, contents); } + @Remote(variants = Variant.both, unreliable = true) + public static void effect(Effect effect, float x, float y, float rotation, Color color){ + if(effect == null) return; + + effect.at(x, y, rotation, color); + } + + @Remote(variants = Variant.both) + public static void effectReliable(Effect effect, float x, float y, float rotation, Color color){ + effect(effect, x, y, rotation, color); + } + //called on all clients @Remote(targets = Loc.server, variants = Variant.both) public static void sendMessage(String message, String sender, Player playersender){ diff --git a/core/src/mindustry/ui/Menus.java b/core/src/mindustry/ui/Menus.java index 90fe7a5b57..1d79b59831 100644 --- a/core/src/mindustry/ui/Menus.java +++ b/core/src/mindustry/ui/Menus.java @@ -1,11 +1,9 @@ package mindustry.ui; import arc.*; -import arc.graphics.*; import arc.struct.*; import arc.util.*; import mindustry.annotations.Annotations.*; -import mindustry.entities.*; import mindustry.game.EventType.*; import mindustry.gen.*; @@ -20,7 +18,7 @@ public class Menus{ menuListeners.put(id, listener); } - //do not invoke any of the below methods directly, use Call + //do not invoke any of the methods below directly, use Call @Remote(variants = Variant.both) public static void menu(int menuId, String title, String message, String[][] options){ @@ -84,18 +82,6 @@ public class Menus{ ui.showLabel(message, duration, worldx, worldy); } - @Remote(variants = Variant.both, unreliable = true) - public static void effect(Effect effect, float x, float y, float rotation, Color color){ - if(effect == null) return; - - effect.at(x, y, rotation, color); - } - - @Remote(variants = Variant.both) - public static void effectReliable(Effect effect, float x, float y, float rotation, Color color){ - effect(effect, x, y, rotation, color); - } - @Remote(variants = Variant.both) public static void infoToast(String message, float duration){ if(message == null) return; diff --git a/gradle.properties b/gradle.properties index 315e45532f..df65b413a2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,4 +9,4 @@ kapt.use.worker.api=true kapt.include.compile.classpath=false # I don't need to use the kotlin stdlib yet, so remove it to prevent extra bloat & method count issues kotlin.stdlib.default.dependency=false -archash=ab7ff4172126f1b2db05b4620b3b7097aefd01b4 +archash=4b691279dd7bf5765e75744034754bcb6f2c2030