Fixed markup crash / setsector command fixed / Drone crash fixed

This commit is contained in:
Anuken 2018-08-15 21:00:40 -04:00
parent c569232e74
commit 4f72011cf7
4 changed files with 19 additions and 6 deletions

View File

@ -26,7 +26,7 @@ allprojects {
appName = 'Mindustry'
gdxVersion = '1.9.8'
roboVMVersion = '2.3.0'
uCoreVersion = '76dc741b49'
uCoreVersion = '2f18f69ffb'
getVersionString = {
String buildVersion = getBuildVersion()

View File

@ -190,7 +190,7 @@ public class Drone extends FlyingUnit implements BuilderTrait{
public void update(){
ItemDrop item = (ItemDrop) target;
if(inventory.isFull() || !inventory.canAcceptItem(item.getItem(), 1)){
if(item == null || inventory.isFull() || !inventory.canAcceptItem(item.getItem(), 1)){
setState(drop);
return;
}
@ -329,7 +329,7 @@ public class Drone extends FlyingUnit implements BuilderTrait{
public void update(){
super.update();
if(target != null && target.getTeam() != team){
if(state.is(repair) && target != null && target.getTeam() != team){
target = null;
}

View File

@ -61,10 +61,15 @@ public class ChatFragment extends Table{
visible(() -> !state.is(State.menu) && Net.active());
update(() -> {
if(!Net.active() && chatOpen){
hide();
if(!Net.active()){
clearMessages();
if(chatOpen){
hide();
}
}
if(Net.active() && Inputs.keyTap("chat")){
toggle();
}
@ -109,9 +114,17 @@ public class ChatFragment extends Table{
super.draw(batch, parentAlpha);
getStyle().font.getData().markupEnabled = true;
}
@Override
protected void updateDisplayText(){
getStyle().font.getData().markupEnabled = false;
super.updateDisplayText();
getStyle().font.getData().markupEnabled = true;
}
};
chatfield.setTextFieldFilter((field, c) -> field.getText().length() < Vars.maxTextLength);
chatfield.getStyle().background = null;
chatfield.getStyle().messageFont = null;
chatfield.getStyle().fontColor = Color.WHITE;
chatfield.setStyle(chatfield.getStyle());
chatfield.update(() -> {

View File

@ -269,7 +269,7 @@ public class ServerControl extends Module{
}
});
handler.register("setsector <x> <y>", "Sets the next sector to be played. Does not affect current game.", arg -> {
handler.register("setsector", "<x> <y>", "Sets the next sector to be played. Does not affect current game.", arg -> {
try{
Settings.putInt("sector_x", Integer.parseInt(arg[0]));
Settings.putInt("sector_y", Integer.parseInt(arg[1]));