Various bugfixes / Added new blocks to tech tree

This commit is contained in:
Anuken
2019-09-24 17:02:34 -04:00
parent b6e97c4261
commit ecd73dcc2c
21 changed files with 11 additions and 7 deletions

View File

@@ -45,6 +45,10 @@ public class TechTree implements ContentList{
});
});
node(armoredConveyor, () -> {
});
});
});
});

View File

@@ -258,7 +258,7 @@ public class NetServer implements ApplicationListener{
boolean checkPass(){
if(votes >= votesRequired() && target.isAdded() && target.con.isConnected()){
Call.sendMessage(Strings.format("[orange]Vote passed.[scarlet] {0}[orange] will be banned from the server for {1} minutes.", target.name, (int)(kickDuration/60)));
Call.sendMessage(Strings.format("[orange]Vote passed.[scarlet] {0}[orange] will be banned from the server for {1} minutes.", target.name, (kickDuration/60)));
target.getInfo().lastKicked = Time.millis() + kickDuration*1000;
playerGroup.all().each(p -> p.uuid != null && p.uuid.equals(target.uuid), p -> p.con.kick(KickReason.vote));
map[0] = null;
@@ -330,7 +330,8 @@ public class NetServer implements ApplicationListener{
if(currentlyKicking[0] == null){
player.sendMessage("[scarlet]Nobody is being voted on.");
}else{
if(currentlyKicking[0].voted.contains(player.uuid) || currentlyKicking[0].voted.contains(admins.getInfo(player.uuid).lastIP)){
//hosts can vote all they want
if(player.uuid != null && (currentlyKicking[0].voted.contains(player.uuid) || currentlyKicking[0].voted.contains(admins.getInfo(player.uuid).lastIP))){
player.sendMessage("[scarlet]You've already voted. Sit down.");
return;
}

View File

@@ -72,7 +72,7 @@ public class PausedDialog extends FloatingDialog{
cont.row();
cont.addButton("$quit", this::showQuitConfirm).colspan(2).width(dw + 10f);
cont.addButton("$quit", this::showQuitConfirm).colspan(2).width(dw + 10f).update(s -> s.setText(control.saves.getCurrent() != null ? "$save.quit" : "$quit"));
}else{
cont.defaults().size(120f).pad(5);
@@ -91,7 +91,7 @@ public class PausedDialog extends FloatingDialog{
cont.addRowImageTextButton("$hostserver.mobile", Icon.host, ui.host::show).disabled(b -> net.active());
cont.addRowImageTextButton("$quit", Icon.quit, this::showQuitConfirm);
cont.addRowImageTextButton("$quit", Icon.quit, this::showQuitConfirm).update(s -> s.setText(control.saves.getCurrent() != null ? "$save.quit" : "$quit"));
}
}

View File

@@ -149,7 +149,7 @@ public class BlockInventoryFragment extends Fragment{
image.addListener(new InputListener(){
@Override
public boolean touchDown(InputEvent event, float x, float y, int pointer, KeyCode button){
if(!canPick.get() || !tile.entity.items.has(item)) return false;
if(!canPick.get() || tile == null || tile.entity == null || tile.entity.items == null || !tile.entity.items.has(item)) return false;
int amount = Math.min(1, player.maxAccepted(item));
if(amount > 0){
Call.requestItem(player, tile, item, amount);