From b2e2cfb48d0eb82dd72cb7ca327a8b8942fababf Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 11 Mar 2021 10:52:53 -0500 Subject: [PATCH] Log client commands before handling --- .../sprites/statuses/status-blasted.png | Bin 298 -> 298 bytes .../sprites/statuses/status-shocked.png | Bin 261 -> 232 bytes core/src/mindustry/core/NetClient.java | 8 ++++++-- tools/src/mindustry/tools/Generators.java | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/assets-raw/sprites/statuses/status-blasted.png b/core/assets-raw/sprites/statuses/status-blasted.png index 96331365fc8e2bef782806631d1a33beaffdc83c..79f635ffb76121dd4bac786520a5db5402d438b2 100644 GIT binary patch delta 248 zcmZ3*w2EnhRsBJ}qY508r~m!0|68v+kbUa`G5v2_Tr;d)BQ)7(EB^IfD|&RBtDvB1 zf=WR0yFcIlL|e`|D!ZUaf?2T8sytOe*{?9>;*p(kJ)2(ayuy&pK4C{glB?bom9q>Y z?AeOKn;X~cxXrSvk^SMLIk$h+x)^n5Cahcd{Pf+Ol10L`6ZOgqdsUN8C{^ZY|KmB% zU~*tyC7ZMSimLvzyDBbx`!9U^xZ!Qi?1Ro4DsiWZ+3#G|5wOn4aGzlMP%0yg*Tr|o za?MqY#j_%>8-H57X%}n03Db#at?-xuOGe@(!%LA*yb*Kw4>P!O<4!?rD$a3ST@L`GaX|t*hmGJIK{wz{7mO?a%-CK5uggt+jFto&Q&1aY*IJZG)k@N&N3kJ;=ZUyBz44U=| ztP%cZa>tAr7!DqsnZvxJ>oh}nq2z-eUWTXfZu^6rSfN$Ha@VQp44N&oy!f{$t@6Fmw&Szt4XMx3kqnppG))d~RWW5?U|{fc L^>bP0l+XkK_d8P^ delta 233 zcmaFC*vd3PrT&bki(^Ox=i4ieT&)H?ECHhL>z|(5k-4zba~5aQjnI?-U+!@$$zPkB zzwYtbf|PWIDHl^2b~s2)WL+Z2|dwgG^{om_M3m$%KczGnwVgAk6j1N3MFPJBNyOJ@r qgJS`UAnOG|Z3e9*Q3jUO*m_$&&+R|esu&m;7(8A5T-G@yGywqVGhx#J diff --git a/core/src/mindustry/core/NetClient.java b/core/src/mindustry/core/NetClient.java index 7cd14828f5..fbc3ba9ee8 100644 --- a/core/src/mindustry/core/NetClient.java +++ b/core/src/mindustry/core/NetClient.java @@ -198,6 +198,12 @@ public class NetClient implements ApplicationListener{ Events.fire(new PlayerChatEvent(player, message)); + //log commands before they are handled + if(message.startsWith(netServer.clientCommands.getPrefix())){ + //log with brackets + Log.info("<&fi@: @&fr>", "&lk" + player.name, "&lw" + message); + } + //check if it's a command CommandResponse response = netServer.clientCommands.handleMessage(message, player); if(response.type == ResponseType.noCommand){ //no command to handle @@ -219,8 +225,6 @@ public class NetClient implements ApplicationListener{ //this is required so other clients get the correct name even if they don't know who's sending it yet Call.sendMessage(message, colorizeName(player.id(), player.name), player); }else{ - //log command to console but with brackets - Log.info("<&fi@: @&fr>", "&lk" + player.name, "&lw" + message); //a command was sent, now get the output if(response.type != ResponseType.valid){ diff --git a/tools/src/mindustry/tools/Generators.java b/tools/src/mindustry/tools/Generators.java index baf23762bf..72c0d4b9e3 100644 --- a/tools/src/mindustry/tools/Generators.java +++ b/tools/src/mindustry/tools/Generators.java @@ -398,7 +398,7 @@ public class Generators{ //if(icon.size == base.width) continue; Image image = new Image(icon.size, icon.size); image.drawScaled(base); - image.save(item.getContentType().name() + "-" + item.name + "-" + icon.name(), false); + image.save(item.getContentType().name() + "-" + item.name + "-" + icon.name(), !(item instanceof StatusEffect)); if(icon == Cicon.medium){ image.save("../ui/" + item.getContentType() + "-" + item.name + "-icon");