Ask players if they want to make games public
This commit is contained in:
@@ -67,6 +67,15 @@ public class HostDialog extends FloatingDialog{
|
||||
try{
|
||||
net.host(Vars.port);
|
||||
player.isAdmin = true;
|
||||
|
||||
if(steam){
|
||||
Core.app.post(() -> Core.settings.getBoolOnce("steampublic", () -> {
|
||||
ui.showConfirm("$setting.publichost.name", "$public.confirm", () -> {
|
||||
Core.settings.putSave("publichost", true);
|
||||
platform.updateLobby();
|
||||
});
|
||||
}));
|
||||
}
|
||||
}catch(IOException e){
|
||||
ui.showException("$server.error", e);
|
||||
}
|
||||
|
||||
@@ -190,6 +190,11 @@ public class UnitFactory extends Block{
|
||||
return entity.spawned < maxSpawn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldConsume(Tile tile){
|
||||
return canProduce(tile);
|
||||
}
|
||||
|
||||
public static class UnitFactoryEntity extends TileEntity{
|
||||
float buildTime;
|
||||
float time;
|
||||
|
||||
Reference in New Issue
Block a user