mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
Add a 'spectators allowed' option for regular tables (aka non tournaments).
This commit is contained in:
parent
be70ecd7f3
commit
4c7b0d50d2
6 changed files with 49 additions and 9 deletions
|
|
@ -65,6 +65,7 @@ public class TableView implements Serializable {
|
|||
private final boolean limited;
|
||||
private final boolean rated;
|
||||
private final boolean passworded;
|
||||
private final boolean spectatorsAllowed;
|
||||
|
||||
public TableView(Table table) {
|
||||
this.tableId = table.getId();
|
||||
|
|
@ -139,6 +140,7 @@ public class TableView implements Serializable {
|
|||
this.limited = table.getMatch().getOptions().isLimited();
|
||||
this.rated = table.getMatch().getOptions().isRated();
|
||||
this.passworded = !table.getMatch().getOptions().getPassword().isEmpty();
|
||||
this.spectatorsAllowed = table.getMatch().getOptions().isSpectatorsAllowed();
|
||||
} else {
|
||||
// TOURNAMENT
|
||||
if (table.getTournament().getOptions().getNumberRounds() > 0) {
|
||||
|
|
@ -186,6 +188,7 @@ public class TableView implements Serializable {
|
|||
this.limited = table.getTournament().getOptions().getMatchOptions().isLimited();
|
||||
this.rated = table.getTournament().getOptions().getMatchOptions().isRated();
|
||||
this.passworded = !table.getTournament().getOptions().getPassword().isEmpty();
|
||||
this.spectatorsAllowed = table.getTournament().getOptions().isWatchingAllowed();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -200,6 +203,11 @@ public class TableView implements Serializable {
|
|||
public String getControllerName() {
|
||||
return controllerName;
|
||||
}
|
||||
|
||||
public boolean getSpectatorsAllowed() {
|
||||
return spectatorsAllowed;
|
||||
}
|
||||
|
||||
|
||||
public String getGameType() {
|
||||
return gameType;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue