1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00

Updated layout and localizations

This commit is contained in:
Ivan Savenko
2023-12-07 16:36:44 +02:00
parent bac46e3992
commit edbe25b33a
13 changed files with 200 additions and 86 deletions

View File

@ -205,11 +205,11 @@
"vcmi.optionsTab.chessFieldBase.hover" : "额外计时器",
"vcmi.optionsTab.chessFieldTurn.hover" : "转动计时器",
"vcmi.optionsTab.chessFieldBattle.hover" : "战斗计时器",
"vcmi.optionsTab.chessFieldCreature.hover" : "堆栈计时器",
"vcmi.optionsTab.chessFieldUnit.hover" : "堆栈计时器",
"vcmi.optionsTab.chessFieldBase.help" : "当{转动计时器}达到零时开始倒计时。 它仅在游戏开始时设置一次。 当计时器达到零时,玩家的回合结束。",
"vcmi.optionsTab.chessFieldTurn.help" : "当玩家在冒险地图上开始回合时开始倒计时。 它在每回合开始时重置为其初始值。 任何未使用的回合时间将被添加到{额外计时器}(如果正在使用)中。",
"vcmi.optionsTab.chessFieldBattle.help" : "战斗期间当 {堆栈计时器} 达到0时进行倒计时。 每次战斗开始时都会重置为初始值。 如果计时器达到零,当前活动的堆栈将进行防御。",
"vcmi.optionsTab.chessFieldCreature.help" : "当玩家在战斗中为当前堆栈选择一个动作时开始倒计时。 堆栈操作完成后,它会重置为其初始值。",
"vcmi.optionsTab.chessFieldUnit.help" : "当玩家在战斗中为当前堆栈选择一个动作时开始倒计时。 堆栈操作完成后,它会重置为其初始值。",
// Custom victory conditions for H3 campaigns and HotA maps
"vcmi.map.victoryCondition.daysPassed.toOthers" : "敌人依然存活至今,你失败了!",

View File

@ -236,17 +236,20 @@
"vcmi.optionsTab.turnOptions.hover" : "Turn Options",
"vcmi.optionsTab.turnOptions.help" : "Select turn timer and simultaneous turns options",
"vcmi.optionsTab.selectPreset" : "Preset",
"vcmi.optionsTab.chessFieldBase.hover" : "Base timer",
"vcmi.optionsTab.chessFieldTurn.hover" : "Turn timer",
"vcmi.optionsTab.chessFieldBattle.hover" : "Battle timer",
"vcmi.optionsTab.chessFieldCreature.hover" : "Unit timer",
"vcmi.optionsTab.chessFieldUnit.hover" : "Unit timer",
"vcmi.optionsTab.chessFieldBase.help" : "Used when {Turn Timer} reaches 0. Set once at game start. On reaching zero, ends current turn. Any ongoing combat with end with a loss.",
"vcmi.optionsTab.chessFieldTurn.help" : "Used out of combat or when {Battle Timer} runs out. Reset each turn. Leftover added to {Base Timer} at turn's end.",
"vcmi.optionsTab.chessFieldTurnAccumulate.help" : "Used out of combat or when {Battle Timer} runs out. Reset each turn. Leftover added to {Base Timer} at turn's end.",
"vcmi.optionsTab.chessFieldTurnDiscard.help" : "Used out of combat or when {Battle Timer} runs out. Reset each turn. Any unspent time is lost",
"vcmi.optionsTab.chessFieldBattle.help" : "Used in battles with AI or in pvp combat when {Unit Timer} runs out. Reset at start of each combat.",
"vcmi.optionsTab.chessFieldCreature.help" : "Used when selecting unit action in pvp combat. Reset at start of each unit's turn.",
"vcmi.optionsTab.chessFieldUnitAccumulate.help" : "Used when selecting unit action in pvp combat. Leftover added to {Battle Timer} at end of unit turn.",
"vcmi.optionsTab.chessFieldUnitDiscard.help" : "Used when selecting unit action in pvp combat. Reset at start of each unit's turn. Any unspent time is lost",
"vcmi.optionsTab.simturns" : "Simultaneous turns",
"vcmi.optionsTab.simturnsTitle" : "Simultaneous turns",
"vcmi.optionsTab.simturnsMin.hover" : "At least for",
"vcmi.optionsTab.simturnsMax.hover" : "At most for",
"vcmi.optionsTab.simturnsAI.hover" : "(Experimental) Simultaneous AI Turns",
@ -254,6 +257,31 @@
"vcmi.optionsTab.simturnsMax.help" : "Play simultaneously for specified number of days or until contact with another player",
"vcmi.optionsTab.simturnsAI.help" : "{Simultaneous AI Turns}\nExperimental option. Allows AI players to act at the same time as human player when simultaneous turns are enabled.",
"vcmi.optionsTab.turnTime.select" : "Select turn timer preset",
"vcmi.optionsTab.turnTime.unlimited" : "Unlimited turn time",
"vcmi.optionsTab.turnTime.classic.1" : "Classic timer: 1 minute",
"vcmi.optionsTab.turnTime.classic.2" : "Classic timer: 2 minutes",
"vcmi.optionsTab.turnTime.classic.5" : "Classic timer: 5 minutes",
"vcmi.optionsTab.turnTime.classic.10" : "Classic timer: 10 minutes",
"vcmi.optionsTab.turnTime.classic.20" : "Classic timer: 20 minutes",
"vcmi.optionsTab.turnTime.classic.30" : "Classic timer: 30 minutes",
"vcmi.optionsTab.turnTime.chess.20" : "Chess: 20:00 + 10:00 + 02:00 + 00:00",
"vcmi.optionsTab.turnTime.chess.16" : "Chess: 16:00 + 08:00 + 01:30 + 00:00",
"vcmi.optionsTab.turnTime.chess.8" : "Chess: 08:00 + 04:00 + 01:00 + 00:00",
"vcmi.optionsTab.turnTime.chess.4" : "Chess: 04:00 + 02:00 + 00:30 + 00:00",
"vcmi.optionsTab.turnTime.chess.2" : "Chess: 02:00 + 01:00 + 00:15 + 00:00",
"vcmi.optionsTab.turnTime.chess.1" : "Chess: 01:00 + 01:00 + 00:00 + 00:00",
"vcmi.optionsTab.simturns.select" : "Select simultaneous turns preset",
"vcmi.optionsTab.simturns.none" : "No simultaneous turns",
"vcmi.optionsTab.simturns.tillContactMax" : "Simturns: Until contact",
"vcmi.optionsTab.simturns.tillContact1" : "Simturns: 1 week, break on contact",
"vcmi.optionsTab.simturns.tillContact2" : "Simturns: 2 weeks, break on contact",
"vcmi.optionsTab.simturns.tillContact4" : "Simturns: 1 month, break on contact",
"vcmi.optionsTab.simturns.blocked1" : "Simturns: 1 week, contacts blocked",
"vcmi.optionsTab.simturns.blocked2" : "Simturns: 2 weeks, contacts blocked",
"vcmi.optionsTab.simturns.blocked4" : "Simturns: 1 month, contacts blocked",
// Translation note: translate strings below using form that is correct for "0 days", "1 day" and "2 days" in your language
// Using this information, VCMI will automatically select correct plural form for every possible amount
"vcmi.optionsTab.simturns.days.0" : " %d days",

View File

@ -240,13 +240,13 @@
"vcmi.optionsTab.chessFieldBase.hover" : "Basis-Timer",
"vcmi.optionsTab.chessFieldTurn.hover" : "Spielzug-Timer",
"vcmi.optionsTab.chessFieldBattle.hover" : "Kampf-Timer",
"vcmi.optionsTab.chessFieldCreature.hover" : "Einheiten-Timer",
"vcmi.optionsTab.chessFieldUnit.hover" : "Einheiten-Timer",
"vcmi.optionsTab.chessFieldBase.help" : "Wird verwendet, wenn {Spielzug-Timer} 0 erreicht. Wird einmal zu Beginn des Spiels gesetzt. Bei Erreichen von Null wird der aktuelle Spielzug beendet. Jeder laufende Kampf endet mit einem Verlust.",
"vcmi.optionsTab.chessFieldTurn.help" : "Wird außerhalb des Kampfes verwendet oder wenn der {Kampf-Timer} abgelaufen ist. Wird jede Runde zurückgesetzt. Reste werden am Ende der Runde zum {Basis-Timer} hinzugefügt.",
"vcmi.optionsTab.chessFieldBattle.help" : "Wird in Kämpfen mit der KI oder im PvP-Kampf verwendet, wenn {Einheiten-Timer} abläuft. Wird zu Beginn eines jeden Kampfes zurückgesetzt.",
"vcmi.optionsTab.chessFieldCreature.help" : "Wird bei der Auswahl der Einheitenaktion im PvP-Kampf verwendet. Wird zu Beginn der Runde jeder Einheit zurückgesetzt.",
"vcmi.optionsTab.chessFieldUnit.help" : "Wird bei der Auswahl der Einheitenaktion im PvP-Kampf verwendet. Wird zu Beginn der Runde jeder Einheit zurückgesetzt.",
"vcmi.optionsTab.simturns" : "Simultane Züge",
"vcmi.optionsTab.simturnsTitle" : "Simultane Züge",
"vcmi.optionsTab.simturnsMin.hover" : "Zumindest für",
"vcmi.optionsTab.simturnsMax.hover" : "Höchstens für",
"vcmi.optionsTab.simturnsAI.hover" : "(Experimentell) Simultane KI Züge",

View File

@ -204,11 +204,11 @@
"vcmi.optionsTab.chessFieldBase.hover" : "Время игрока",
"vcmi.optionsTab.chessFieldTurn.hover" : "Время на ход",
"vcmi.optionsTab.chessFieldBattle.hover" : "Время на битву",
"vcmi.optionsTab.chessFieldCreature.hover" : "Время на отряд",
"vcmi.optionsTab.chessFieldUnit.hover" : "Время на отряд",
"vcmi.optionsTab.chessFieldBase.help" : "Обратный отсчет начинается когда {время на ход} истекает. Устанавливается один раз в начале игры. По истечении времени игрок завершает ход.",
"vcmi.optionsTab.chessFieldTurn.help" : "Обратный отсчет начивается когда игрок начинает свой ход. В начале каждого хода устанавливается в иходное значение. Все неиспользованное время добавляется ко {времени игрока}, если оно используется.",
"vcmi.optionsTab.chessFieldBattle.help" : "Обратный отсчет начинается когда {время на отряд истекает}. В начале каждой битвы устанавливается в исходное значение. По истечении времени текущий отряд получает приказ защищаться.",
"vcmi.optionsTab.chessFieldCreature.help" : "Обратный отсчет начинается когда игрок получает получает контроль над отрядом во время битвы. Устанавливается в исходное значение всякий раз, когда отряд получает возможность действовать.",
"vcmi.optionsTab.chessFieldUnit.help" : "Обратный отсчет начинается когда игрок получает получает контроль над отрядом во время битвы. Устанавливается в исходное значение всякий раз, когда отряд получает возможность действовать.",
"mapObject.core.creatureBank.cyclopsStockpile.name" : "Хранилище циклопов",
"mapObject.core.creatureBank.dragonFlyHive.name" : "Улей летучих змиев",

View File

@ -229,13 +229,17 @@
"vcmi.optionsTab.chessFieldBase.hover" : "Основний таймер",
"vcmi.optionsTab.chessFieldTurn.hover" : "Таймер ходу",
"vcmi.optionsTab.chessFieldBattle.hover" : "Таймер битви",
"vcmi.optionsTab.chessFieldCreature.hover" : "Таймер загону",
"vcmi.optionsTab.chessFieldUnit.hover" : "Таймер загону",
"vcmi.optionsTab.chessFieldBase.help" : "Встановлюється один раз на початку гри. Коли вичерпується, поточний хід буде перервано, поточна битва буде програна.",
"vcmi.optionsTab.chessFieldTurn.help" : "Використовується під час ходу. Встановлюється кожен хід. Залишок додається до {основного таймеру} у кінці ходу",
"vcmi.optionsTab.chessFieldTurnAccumulate.help" : "Використовується під час ходу. Встановлюється на початку ходу. Залишок додається до {основного таймеру}",
"vcmi.optionsTab.chessFieldTurnDiscard.help" : "Використовується під час ходу. Встановлюється на початку ходу. Залишок часу буде втрачено",
"vcmi.optionsTab.chessFieldBattle.help" : "Використовується у боях з ШІ чи у боях з гравцями якщо {таймер загону} вичерпується. Встановлюється на початку кожного бою.",
"vcmi.optionsTab.chessFieldCreature.help" : "Використовується при обираннія дії загону у боях з гравцями. Встановлюється на початку кожної дії.",
"vcmi.optionsTab.chessFieldUnitAccumulate.help" : "Використовується при обираннія дії загону у боях з гравцями. Встановлюється на початку дії. Залишок додається до {таймеру битви}",
"vcmi.optionsTab.chessFieldUnitDiscard.help" : "Використовується при обираннія дії загону у боях з гравцями. Встановлюється на початку дії. Залишок часу буде втрачено.",
"vcmi.optionsTab.accumulate" : "Накопичувати",
"vcmi.optionsTab.simturns" : "Одночасні ходи",
"vcmi.optionsTab.simturnsTitle" : "Одночасні ходи",
"vcmi.optionsTab.simturnsMin.hover" : "Щонайменше",
"vcmi.optionsTab.simturnsMax.hover" : "Щонайбільше",
"vcmi.optionsTab.simturnsAI.hover" : "(Експериментально) Одночасні ходи ШІ",
@ -243,6 +247,31 @@
"vcmi.optionsTab.simturnsMax.help" : "Грати одночасно обрану кількість днів чи до першого контакту з іншим гравцем",
"vcmi.optionsTab.simturnsAI.help" : "{Одночасні ходи ШІ}\nЕкспериментальна опція. Дозволяє гравцям-ШІ діяти одночасно с гравцями-людьми якщо одночасні ходи увімкнені.",
"vcmi.optionsTab.turnTime.select" : "Типові налаштування таймерів",
"vcmi.optionsTab.turnTime.unlimited" : "Необмежений час ходу",
"vcmi.optionsTab.turnTime.classic.1" : "Класичний таймер: 1 хвилина",
"vcmi.optionsTab.turnTime.classic.2" : "Класичний таймер: 2 хвилини",
"vcmi.optionsTab.turnTime.classic.5" : "Класичний таймер: 5 хвилин",
"vcmi.optionsTab.turnTime.classic.10" : "Класичний таймер: 10 хвилин",
"vcmi.optionsTab.turnTime.classic.20" : "Класичний таймер: 20 хвилин",
"vcmi.optionsTab.turnTime.classic.30" : "Класичний таймер: 30 хвилин",
"vcmi.optionsTab.turnTime.chess.20" : "Шахи: 20:00 + 10:00 + 02:00 + 00:00",
"vcmi.optionsTab.turnTime.chess.16" : "Шахи: 16:00 + 08:00 + 01:30 + 00:00",
"vcmi.optionsTab.turnTime.chess.8" : "Шахи: 08:00 + 04:00 + 01:00 + 00:00",
"vcmi.optionsTab.turnTime.chess.4" : "Шахи: 04:00 + 02:00 + 00:30 + 00:00",
"vcmi.optionsTab.turnTime.chess.2" : "Шахи: 02:00 + 01:00 + 00:15 + 00:00",
"vcmi.optionsTab.turnTime.chess.1" : "Шахи: 01:00 + 01:00 + 00:00 + 00:00",
"vcmi.optionsTab.simturns.select" : "Типові налаштування одночасних ходів",
"vcmi.optionsTab.simturns.none" : "Без одночасних ходів",
"vcmi.optionsTab.simturns.tillContactMax" : "Одночасно: До контакту",
"vcmi.optionsTab.simturns.tillContact1" : "Одночасно: 1 тиждень, до контакту",
"vcmi.optionsTab.simturns.tillContact2" : "Одночасно: 2 тижні, до контакту",
"vcmi.optionsTab.simturns.tillContact4" : "Одночасно: 1 місяць, до контакту",
"vcmi.optionsTab.simturns.blocked1" : "Одночасно: 1 тиждень, без контактів",
"vcmi.optionsTab.simturns.blocked2" : "Одночасно: 2 тижні, без контактів",
"vcmi.optionsTab.simturns.blocked4" : "Одночасно: 1 місяць, без контактів",
// Translation note: translate strings below using form that is correct for "0 days", "1 day" and "2 days" in your language
// Using this information, VCMI will automatically select correct plural form for every possible amount
"vcmi.optionsTab.simturns.days.0" : " %d днів",

View File

@ -201,11 +201,11 @@
"vcmi.optionsTab.chessFieldBase.hover" : "Thời gian thêm",
"vcmi.optionsTab.chessFieldTurn.hover" : "Thời gian lượt",
"vcmi.optionsTab.chessFieldBattle.hover" : "Thời gian trận đánh",
"vcmi.optionsTab.chessFieldCreature.hover" : "Thời gian lính",
"vcmi.optionsTab.chessFieldUnit.hover" : "Thời gian lính",
"vcmi.optionsTab.chessFieldBase.help": "Bắt đầu đếm ngược khi {Thời gian lượt} giảm đến 0. Được đặt 1 lần khi bắt đầu trò chơi. Khi thời gian này giảm đến 0, lượt của người chơi kết thúc.",
"vcmi.optionsTab.chessFieldTurn.help": "Bắt đầu đếm ngược khi đến lượt người chơi trên bản đồ phiêu lưu. Nó được đặt lại giá trị ban đầu khi bắt đầu mỗi lượt. Thời gian lượt chưa sử dụng sẽ được thêm vào {Thời gian thêm} nếu có.",
"vcmi.optionsTab.chessFieldBattle.help": "Đếm ngược trong suốt trận đánh khi {Thời gian lính} giảm đến 0. Nó được đặt lại giá trị ban đầu khi bắt đầu mỗi trận đánh. Nếu thời gian giảm đến 0, đội lính hiện tại sẽ phòng thủ.",
"vcmi.optionsTab.chessFieldCreature.help": "Bắt đầu đếm ngược khi người chơi đang chọn hành động cho đội linh hiện tại trong suốt trận đánh. Nó được đặt lại giá trị ban đầu sau khi hành động của đội lính hoàn tất.",
"vcmi.optionsTab.chessFieldUnit.help": "Bắt đầu đếm ngược khi người chơi đang chọn hành động cho đội linh hiện tại trong suốt trận đánh. Nó được đặt lại giá trị ban đầu sau khi hành động của đội lính hoàn tất.",
"vcmi.map.victoryCondition.daysPassed.toOthers": "Đối thủ đã xoay xở để sinh tồn đến ngày này. Họ giành chiến thắng!",
"vcmi.map.victoryCondition.daysPassed.toSelf": "Chúc mừng! Bạn đã vượt khó để sinh tồn. Chiến thắng thuộc về bạn!",

View File

@ -22,35 +22,49 @@
#include "../../lib/MetaString.h"
#include "../../lib/CGeneralTextHandler.h"
std::vector<TurnTimerInfo> OptionsTabBase::getTimerPresets() const
{
std::vector<TurnTimerInfo> result;
for (auto const & tpreset : variables["timerPresets"].Vector())
{
TurnTimerInfo tinfo;
tinfo.baseTimer = tpreset[0].Integer() * 1000;
tinfo.turnTimer = tpreset[1].Integer() * 1000;
tinfo.battleTimer = tpreset[2].Integer() * 1000;
tinfo.unitTimer = tpreset[3].Integer() * 1000;
tinfo.accumulatingTurnTimer = tpreset[4].Bool();
tinfo.accumulatingUnitTimer = tpreset[5].Bool();
result.push_back(tinfo);
}
return result;
}
std::vector<SimturnsInfo> OptionsTabBase::getSimturnsPresets() const
{
std::vector<SimturnsInfo> result;
for (auto const & tpreset : variables["simturnsPresets"].Vector())
{
SimturnsInfo tinfo;
tinfo.optionalTurns = tpreset[0].Integer();
tinfo.requiredTurns = tpreset[1].Integer();
tinfo.allowHumanWithAI = tpreset[2].Bool();
result.push_back(tinfo);
}
return result;
}
OptionsTabBase::OptionsTabBase(const JsonPath & configPath)
{
recActions = 0;
auto setTimerPresetCallback = [this](int index){
if(!variables["timerPresets"].isNull())
{
auto tpreset = variables["timerPresets"].Vector().at(index).Vector();
TurnTimerInfo tinfo = SEL->getStartInfo()->turnTimerInfo;
tinfo.baseTimer = tpreset.at(0).Integer() * 1000;
tinfo.turnTimer = tpreset.at(1).Integer() * 1000;
tinfo.battleTimer = tpreset.at(2).Integer() * 1000;
tinfo.unitTimer = tpreset.at(3).Integer() * 1000;
tinfo.accumulatingTurnTimer = tpreset.at(4).Bool();
tinfo.accumulatingUnitTimer = tpreset.at(5).Bool();
CSH->setTurnTimerInfo(tinfo);
}
CSH->setTurnTimerInfo(getTimerPresets().at(index));
};
auto setSimturnsPresetCallback = [this](int index){
if(!variables["simturnsPresets"].isNull())
{
auto tpreset = variables["simturnsPresets"].Vector().at(index).Vector();
SimturnsInfo tinfo = SEL->getStartInfo()->simturnsInfo;
tinfo.optionalTurns = tpreset.at(0).Integer();
tinfo.requiredTurns = tpreset.at(1).Integer();
tinfo.allowHumanWithAI = tpreset.at(2).Bool();
CSH->setSimturnsInfo(tinfo);
}
CSH->setSimturnsInfo(getSimturnsPresets().at(index));
};
addCallback("setTimerPreset", setTimerPresetCallback);
@ -157,7 +171,7 @@ OptionsTabBase::OptionsTabBase(const JsonPath & configPath)
CSH->setTurnTimerInfo(tinfo);
}
});
addCallback("parseAndSetTimer_creature", [parseTimerString](const std::string & str){
addCallback("parseAndSetTimer_unit", [parseTimerString](const std::string & str){
int time = parseTimerString(str) * 1000;
if(time >= 0)
{
@ -306,6 +320,22 @@ void OptionsTabBase::recreate()
if(auto buttonTurnTimerAccumulate = widget<CToggleButton>("buttonTurnTimerAccumulate"))
buttonTurnTimerAccumulate->setSelectedSilent(SEL->getStartInfo()->turnTimerInfo.accumulatingTurnTimer);
if(auto chessFieldTurnLabel = widget<CLabel>("chessFieldTurnLabel"))
{
if (SEL->getStartInfo()->turnTimerInfo.accumulatingTurnTimer)
chessFieldTurnLabel->setText(CGI->generaltexth->translate("vcmi.optionsTab.chessFieldTurnAccumulate.help"));
else
chessFieldTurnLabel->setText(CGI->generaltexth->translate("vcmi.optionsTab.chessFieldTurnDiscard.help"));
}
if(auto chessFieldUnitLabel = widget<CLabel>("chessFieldUnitLabel"))
{
if (SEL->getStartInfo()->turnTimerInfo.accumulatingUnitTimer)
chessFieldUnitLabel->setText(CGI->generaltexth->translate("vcmi.optionsTab.chessFieldUnitAccumulate.help"));
else
chessFieldUnitLabel->setText(CGI->generaltexth->translate("vcmi.optionsTab.chessFieldUnitDiscard.help"));
}
if(auto buttonUnitTimerAccumulate = widget<CToggleButton>("buttonUnitTimerAccumulate"))
buttonUnitTimerAccumulate->setSelectedSilent(SEL->getStartInfo()->turnTimerInfo.accumulatingUnitTimer);
@ -343,7 +373,7 @@ void OptionsTabBase::recreate()
ww->setText(timeToString(turnTimerRemote.turnTimer), false);
if(auto ww = widget<CTextInput>("chessFieldBattle"))
ww->setText(timeToString(turnTimerRemote.battleTimer), false);
if(auto ww = widget<CTextInput>("chessFieldCreature"))
if(auto ww = widget<CTextInput>("chessFieldUnit"))
ww->setText(timeToString(turnTimerRemote.unitTimer), false);
if(auto w = widget<ComboBox>("timerModeSwitch"))

View File

@ -12,9 +12,19 @@
#include "../gui/InterfaceObjectConfigurable.h"
#include "../../lib/filesystem/ResourcePath.h"
VCMI_LIB_NAMESPACE_BEGIN
struct TurnTimerInfo;
struct SimturnsInfo;
VCMI_LIB_NAMESPACE_END
/// The options tab which is shown at the map selection phase.
class OptionsTabBase : public InterfaceObjectConfigurable
{
std::vector<TurnTimerInfo> getTimerPresets() const;
std::vector<SimturnsInfo> getSimturnsPresets() const;
public:
OptionsTabBase(const JsonPath & configPath);

View File

@ -37,7 +37,7 @@
"font": "small",
"alignment": "left",
"color": "white",
"text": "Custom turn time"
"text": "vcmi.optionsTab.turnTime.select"
}
],
"dropDown":
@ -69,7 +69,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Unlimited turn time"
"text": "vcmi.optionsTab.turnTime.unlimited"
},
{
"type": "dropDownHover",
@ -89,7 +89,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Classic timer: 1 minute"
"text": "vcmi.optionsTab.turnTime.classic.1"
},
{
"type": "dropDownHover",
@ -109,7 +109,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Classic timer: 2 minutes"
"text": "vcmi.optionsTab.turnTime.classic.2"
},
{
"type": "dropDownHover",
@ -129,7 +129,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Classic timer: 5 minutes"
"text": "vcmi.optionsTab.turnTime.classic.5"
},
{
"type": "dropDownHover",
@ -149,7 +149,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Classic timer: 10 minutes"
"text": "vcmi.optionsTab.turnTime.classic.10"
},
{
"type": "dropDownHover",
@ -169,7 +169,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Classic timer: 20 minutes"
"text": "vcmi.optionsTab.turnTime.classic.20"
},
{
"type": "dropDownHover",
@ -189,7 +189,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Classic timer: 30 minutes"
"text": "vcmi.optionsTab.turnTime.classic.30"
},
{
"type": "dropDownHover",
@ -209,7 +209,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Chess: 16:00 + 08:00 + 02:00 + 00:00"
"text": "vcmi.optionsTab.turnTime.chess.20"
},
{
"type": "dropDownHover",
@ -229,7 +229,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Chess: 16:00 + 08:00 + 01:15 + 00:00"
"text": "vcmi.optionsTab.turnTime.chess.16"
},
{
"type": "dropDownHover",
@ -249,7 +249,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Chess: 08:00 + 04:00 + 01:00 + 00:00"
"text": "vcmi.optionsTab.turnTime.chess.8"
},
{
"type": "dropDownHover",
@ -269,7 +269,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Chess: 02:00 + 01:30 + 01:00 + 00:00"
"text": "vcmi.optionsTab.turnTime.chess.4"
},
{
"type": "dropDownHover",
@ -289,7 +289,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Chess: 02:00 + 01:00 + 00:15 + 00:00"
"text": "vcmi.optionsTab.turnTime.chess.2"
},
{
"type": "dropDownHover",
@ -309,7 +309,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Chess: 01:00 + 01:00 + 00:00 + 00:00"
"text": "vcmi.optionsTab.turnTime.chess.1"
},
{
"type": "dropDownHover",
@ -334,7 +334,7 @@
"font": "small",
"alignment": "left",
"color": "white",
"text": "Custom simultaneous turns"
"text": "vcmi.optionsTab.simturns.select"
}
],
"dropDown":
@ -366,7 +366,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "No simultaneous turns"
"text": "vcmi.optionsTab.simturns.none"
},
{
"type": "dropDownHover",
@ -386,7 +386,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Simturns: Until contact"
"text": "vcmi.optionsTab.simturns.tillContactMax"
},
{
"type": "dropDownHover",
@ -406,7 +406,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Simturns: 1 week, break on contact"
"text": "vcmi.optionsTab.simturns.tillContact1"
},
{
"type": "dropDownHover",
@ -426,7 +426,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Simturns: 2 weeks, break on contact"
"text": "vcmi.optionsTab.simturns.tillContact2"
},
{
"type": "dropDownHover",
@ -446,7 +446,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Simturns: 1 month, break on contact"
"text": "vcmi.optionsTab.simturns.tillContact4"
},
{
"type": "dropDownHover",
@ -466,7 +466,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Simturns: 1 week, contacts blocked"
"text": "vcmi.optionsTab.simturns.blocked1"
},
{
"type": "dropDownHover",
@ -486,7 +486,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Simturns: 2 weeks, contacts blocked"
"text": "vcmi.optionsTab.simturns.blocked2"
},
{
"type": "dropDownHover",
@ -506,7 +506,7 @@
{
"type": "dropDownLabel",
"name": "labelName",
"text": "Simturns: 1 month, contacts blocked"
"text": "vcmi.optionsTab.simturns.blocked4"
},
{
"type": "dropDownHover",

View File

@ -67,14 +67,14 @@
"adoptHeight": true
},
{
"type": "label",
"font": "medium",
"alignment": "center",
"color": "yellow",
"text": "Select preset",
"position": {"x": 105, "y": 100}
},
// {
// "type": "label",
// "font": "medium",
// "alignment": "center",
// "color": "yellow",
// "text": "vcmi.optionsTab.selectPreset",
// "position": {"x": 105, "y": 100}
// },
{
"type" : "dropDownTimers",
"name": "timerPresetSelector",
@ -140,10 +140,10 @@
"text": "vcmi.optionsTab.chessFieldBattle.hover"
},
{
"text": "vcmi.optionsTab.chessFieldCreature.hover"
"text": "vcmi.optionsTab.chessFieldUnit.hover"
},
{
"text": "vcmi.optionsTab.simturns"
"text": "vcmi.optionsTab.simturnsTitle"
}
]
},
@ -158,13 +158,13 @@
"text": "vcmi.optionsTab.chessFieldBase.help"
},
{
"text": "vcmi.optionsTab.chessFieldTurn.help"
"name": "chessFieldTurnLabel"
},
{
"text": "vcmi.optionsTab.chessFieldBattle.help"
},
{
"text": "vcmi.optionsTab.chessFieldCreature.help"
"name": "chessFieldUnitLabel"
}
]
},
@ -174,25 +174,25 @@
"position": {"x": 160, "y": 195},
"type": "toggleButton",
"image": "lobby/checkbox",
"callback" : "setSimturnAI"
"callback" : "setTurnTimerAccumulate"
},
{
"name": "buttonUnitTimerAccumulate",
"position": {"x": 160, "y": 327},
"type": "toggleButton",
"image": "lobby/checkbox",
"callback" : "setSimturnAI"
"callback" : "setUnitTimerAccumulate"
},
{
"type" : "labelTitle",
"position": {"x": 195, "y": 199},
"text" : "Accumulate"
"text" : "vcmi.optionsTab.accumulate"
},
{
"type" : "labelTitle",
"position": {"x": 195, "y": 331},
"text" : "Accumulate"
"text" : "vcmi.optionsTab.accumulate"
},
{
@ -230,9 +230,9 @@
"help": "vcmi.optionsTab.chessFieldBattle.help"
},
{
"name": "chessFieldCreature",
"callback": "parseAndSetTimer_creature",
"help": "vcmi.optionsTab.chessFieldCreature.help"
"name": "chessFieldUnit",
"callback": "parseAndSetTimer_unit",
"help": "vcmi.optionsTab.chessFieldUnit.help"
}
]
},
@ -343,10 +343,10 @@
[ 0, 600, 0, 0, false, false],
[ 0, 1200, 0, 0, false, false],
[ 0, 1800, 0, 0, false, false],
[ 960, 480, 120, 0, true, false],
[ 960, 480, 75, 0, true, false],
[ 1200, 600, 120, 0, true, false],
[ 960, 480, 90, 0, true, false],
[ 480, 240, 60, 0, true, false],
[ 120, 90, 60, 0, true, false],
[ 240, 120, 30, 0, true, false],
[ 120, 60, 15, 0, true, false],
[ 60, 60, 0, 0, true, false]
],

View File

@ -32,6 +32,13 @@ struct DLL_LINKAGE SimturnsInfo
/// If set to true, human and 1 AI can act at the same time
bool allowHumanWithAI = false;
bool operator == (const SimturnsInfo & other) const
{
return requiredTurns == other.requiredTurns &&
optionalTurns == other.optionalTurns &&
allowHumanWithAI == other.allowHumanWithAI;
}
template <typename Handler>
void serialize(Handler &h, const int version)
{

View File

@ -19,7 +19,7 @@ bool TurnTimerInfo::isEnabled() const
bool TurnTimerInfo::isBattleEnabled() const
{
return unitTimer > 0 || battleTimer > 0;
return turnTimer > 0 || baseTimer > 0 || unitTimer > 0 || battleTimer > 0;
}
VCMI_LIB_NAMESPACE_END

View File

@ -27,6 +27,16 @@ struct DLL_LINKAGE TurnTimerInfo
bool isEnabled() const;
bool isBattleEnabled() const;
bool operator == (const TurnTimerInfo & other) const
{
return turnTimer == other.turnTimer &&
baseTimer == other.baseTimer &&
battleTimer == other.battleTimer &&
unitTimer == other.unitTimer &&
accumulatingTurnTimer == other.accumulatingTurnTimer &&
accumulatingUnitTimer == other.accumulatingUnitTimer;
}
template <typename Handler>
void serialize(Handler &h, const int version)