mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Merge pull request #4018 from IvanSavenko/voting
[1.5.2?] Multiplayer voting
This commit is contained in:
@@ -31,11 +31,15 @@ TurnOrderProcessor::TurnOrderProcessor(CGameHandler * owner):
|
||||
|
||||
int TurnOrderProcessor::simturnsTurnsMaxLimit() const
|
||||
{
|
||||
if (simturnsMaxDurationDays)
|
||||
return *simturnsMaxDurationDays;
|
||||
return gameHandler->getStartInfo()->simturnsInfo.optionalTurns;
|
||||
}
|
||||
|
||||
int TurnOrderProcessor::simturnsTurnsMinLimit() const
|
||||
{
|
||||
if (simturnsMinDurationDays)
|
||||
return *simturnsMinDurationDays;
|
||||
return gameHandler->getStartInfo()->simturnsInfo.requiredTurns;
|
||||
}
|
||||
|
||||
@@ -391,3 +395,13 @@ bool TurnOrderProcessor::isPlayerAwaitsNewDay(PlayerColor which) const
|
||||
{
|
||||
return vstd::contains(actedPlayers, which);
|
||||
}
|
||||
|
||||
void TurnOrderProcessor::setMinSimturnsDuration(int days)
|
||||
{
|
||||
simturnsMinDurationDays = gameHandler->getDate(Date::DAY) + days;
|
||||
}
|
||||
|
||||
void TurnOrderProcessor::setMaxSimturnsDuration(int days)
|
||||
{
|
||||
simturnsMaxDurationDays = gameHandler->getDate(Date::DAY) + days;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user