Fixed markup crash / setsector command fixed / Drone crash fixed
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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(() -> {
|
||||
|
||||
Reference in New Issue
Block a user