Ask players if they want to make games public
This commit is contained in:
@@ -573,6 +573,7 @@ setting.savecreate.name = Auto-Create Saves
|
||||
setting.publichost.name = Public Game Visibility
|
||||
setting.chatopacity.name = Chat Opacity
|
||||
setting.playerchat.name = Display Player Bubble Chat
|
||||
public.confirm = Do you want to make your game public?\n[lightgray]This can be changed later in Settings->Game->Public Game Visibility.
|
||||
uiscale.reset = UI scale has been changed.\nPress "OK" to confirm this scale.\n[scarlet]Reverting and exiting in[accent] {0}[] seconds...
|
||||
uiscale.cancel = Cancel & Exit
|
||||
setting.bloom.name = Bloom
|
||||
|
||||
@@ -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