mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Allow toggling between Open and AI
This commit is contained in:
@@ -11,7 +11,7 @@ import forge.match.LobbySlotType;
|
||||
//Temporary lobby instance to use for OnlineLobby before connecting to a server
|
||||
public final class OfflineLobby extends GameLobby {
|
||||
public OfflineLobby() {
|
||||
super(false);
|
||||
super(true);
|
||||
|
||||
final String humanName = localName();
|
||||
final int[] avatarIndices = localAvatarIndices();
|
||||
|
||||
@@ -42,24 +42,29 @@ public final class ServerGameLobby extends GameLobby {
|
||||
updateView(false);
|
||||
}
|
||||
|
||||
@Override public boolean hasControl() {
|
||||
@Override
|
||||
public boolean hasControl() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override public boolean mayEdit(final int index) {
|
||||
@Override
|
||||
public boolean mayEdit(final int index) {
|
||||
final LobbySlotType type = getSlot(index).getType();
|
||||
return type != LobbySlotType.REMOTE && type != LobbySlotType.OPEN;
|
||||
}
|
||||
|
||||
@Override public boolean mayControl(final int index) {
|
||||
@Override
|
||||
public boolean mayControl(final int index) {
|
||||
return getSlot(index).getType() != LobbySlotType.REMOTE;
|
||||
}
|
||||
|
||||
@Override public boolean mayRemove(final int index) {
|
||||
@Override
|
||||
public boolean mayRemove(final int index) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override protected IGuiGame getGui(final int index) {
|
||||
@Override
|
||||
protected IGuiGame getGui(final int index) {
|
||||
return FServerManager.getInstance().getGui(index);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user