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 zcmVS&{Y$MC#kNHe z5j9{WP-E`=_WWBpoW&iWau@>%pAbQIb?CKy>kEuznGd+1|3q z%skvs6Absf@#XpBIc&uPfMO5>8F4t)Gq55KaXg7YChGI$y;nBkgp8c9P9P*c+JkbA z3{1sAz$RJ)JH$gKW;xIi8NWZZ>*|WEoG9@Ag3OnPICcnh&~ZuXo*GJokY(b~Qv5Sq z15*R&ov)y(1Jc*nEe={!P{RxCRSyH^x7+t{*6L3?ra$vB~HfgQxLK3JWL_;eFQx@+x#OhxgCh`FQY{(+=)6Wa3L zCVU-0-&7MIg&;Y)%9j8sgqlhZv?8ia*oL_C71$c{TUh|pPAN3QwInqF0000A8R^)We>D1bwWr0n-hK zbn!Pf0C`f7RJ&~!Ky4guCT+*QaX!gJ2%rQJ j1<(;I04ib?00d=Se?1OKxA`V|00000NkvXXu0mjf=`&%| 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");