wip close round/campaign/war + refacto json None
This commit is contained in:
parent
4c8086caf4
commit
6cbb7c6534
26 changed files with 474 additions and 108 deletions
|
|
@ -49,20 +49,26 @@ class BattlesDialog(QDialog):
|
|||
def get_sector_id(self) -> str:
|
||||
return cast(str, self.ui.sectorComboBox.currentData())
|
||||
|
||||
def get_player_1_id(self) -> str:
|
||||
return cast(str, self.ui.player1ComboBox.currentData())
|
||||
def get_player_1_id(self) -> str | None:
|
||||
text = cast(str, self.ui.player1ComboBox.currentData())
|
||||
return text if text else None
|
||||
|
||||
def get_player_2_id(self) -> str:
|
||||
return cast(str, self.ui.player2ComboBox.currentData())
|
||||
def get_player_2_id(self) -> str | None:
|
||||
text = cast(str, self.ui.player2ComboBox.currentData())
|
||||
return text if text else None
|
||||
|
||||
def get_winner_id(self) -> str:
|
||||
return cast(str, self.ui.winnerComboBox.currentData())
|
||||
def get_winner_id(self) -> str | None:
|
||||
text = cast(str, self.ui.winnerComboBox.currentData())
|
||||
return text if text else None
|
||||
|
||||
def get_score(self) -> str:
|
||||
return self.ui.score.text().strip()
|
||||
def get_score(self) -> str | None:
|
||||
text = self.ui.score.text().strip()
|
||||
return text if text else None
|
||||
|
||||
def get_victory_condition(self) -> str:
|
||||
return self.ui.victoryCondition.text().strip()
|
||||
def get_victory_condition(self) -> str | None:
|
||||
text = self.ui.victoryCondition.text().strip()
|
||||
return text if text else None
|
||||
|
||||
def get_comment(self) -> str:
|
||||
return self.ui.battleComment.toPlainText().strip()
|
||||
def get_comment(self) -> str | None:
|
||||
text = self.ui.battleComment.toPlainText().strip()
|
||||
return text if text else None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue