Various bugfixes

This commit is contained in:
Anuken 2018-11-24 20:04:20 -05:00
parent ec80fc9f3f
commit c321402414
5 changed files with 4 additions and 4 deletions

View File

@ -72,7 +72,7 @@ text.nextmission = Next Mission
text.maps.none = [LIGHT_GRAY]No maps found! text.maps.none = [LIGHT_GRAY]No maps found!
text.about.button = About text.about.button = About
text.name = Name: text.name = Name:
text.noname = Pick in a[accent] player name[] first. text.noname = Pick a[accent] player name[] first.
text.filename = File Name: text.filename = File Name:
text.unlocked = New Block Unlocked! text.unlocked = New Block Unlocked!
text.unlocked.plural = New Blocks Unlocked! text.unlocked.plural = New Blocks Unlocked!

View File

@ -15,6 +15,7 @@ import io.anuke.mindustry.entities.Player;
import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest; import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest;
import io.anuke.mindustry.entities.traits.SyncTrait; import io.anuke.mindustry.entities.traits.SyncTrait;
import io.anuke.mindustry.entities.traits.TypeTrait; import io.anuke.mindustry.entities.traits.TypeTrait;
import io.anuke.mindustry.game.Version;
import io.anuke.mindustry.gen.Call; import io.anuke.mindustry.gen.Call;
import io.anuke.mindustry.gen.RemoteReadClient; import io.anuke.mindustry.gen.RemoteReadClient;
import io.anuke.mindustry.net.Net; import io.anuke.mindustry.net.Net;
@ -95,6 +96,7 @@ public class NetClient extends Module{
ConnectPacket c = new ConnectPacket(); ConnectPacket c = new ConnectPacket();
c.name = player.name; c.name = player.name;
c.mobile = mobile; c.mobile = mobile;
c.versionType = Version.type;
c.color = Color.rgba8888(player.color); c.color = Color.rgba8888(player.color);
c.usid = getUsid(packet.addressTCP); c.usid = getUsid(packet.addressTCP);
c.uuid = Platform.instance.getUUID(); c.uuid = Platform.instance.getUUID();

View File

@ -120,7 +120,7 @@ public class NetServer extends Module{
return; return;
} }
if((packet.version == -1 || !packet.versionType.equals("official")) && Version.build != -1 && !admins.allowsCustomClients()){ if(packet.versionType == null || ((packet.version == -1 || !packet.versionType.equals("official")) && Version.build != -1 && !admins.allowsCustomClients())){
kick(id, KickReason.customClient); kick(id, KickReason.customClient);
return; return;
} }

View File

@ -28,7 +28,6 @@ public class HostDialog extends FloatingDialog{
content().table(t -> { content().table(t -> {
t.add("$text.name").padRight(10); t.add("$text.name").padRight(10);
t.addField(Settings.getString("name"), text -> { t.addField(Settings.getString("name"), text -> {
if(text.isEmpty()) return;
player.name = text; player.name = text;
Settings.put("name", text); Settings.put("name", text);
Settings.save(); Settings.save();

View File

@ -205,7 +205,6 @@ public class JoinDialog extends FloatingDialog{
content().table(t -> { content().table(t -> {
t.add("$text.name").padRight(10); t.add("$text.name").padRight(10);
t.addField(Settings.getString("name"), text -> { t.addField(Settings.getString("name"), text -> {
if(text.isEmpty()) return;
player.name = text; player.name = text;
Settings.put("name", text); Settings.put("name", text);
Settings.save(); Settings.save();