1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

netpackages

This commit is contained in:
Laserlicht
2025-10-25 20:41:39 +02:00
parent 678d8275b7
commit 66f377f14e
13 changed files with 90 additions and 28 deletions

View File

@@ -62,17 +62,6 @@ void BattleOnlyMode::openBattleWindow()
ENGINE->windows().createAndPushWindow<BattleOnlyModeWindow>();
}
BattleOnlyModeStartInfo::BattleOnlyModeStartInfo()
: selectedTerrain(TerrainId::DIRT)
, selectedTown(FactionID::NONE)
{
for(auto & element : selectedArmy)
element = std::make_shared<CCreatureSet>();
for(auto & element : primSkillLevel)
for(size_t i=0; i<GameConstants::PRIMARY_SKILLS; i++)
element[i] = 0;
}
BattleOnlyModeWindow::BattleOnlyModeWindow()
: CWindowObject(BORDERED)
, startInfo(std::make_shared<BattleOnlyModeStartInfo>())
@@ -191,6 +180,18 @@ void BattleOnlyModeWindow::init()
map->name = MetaString::createFromTextID("vcmi.lobby.battleOnlyMode");
cb = std::make_unique<EditorCallback>(map.get());
onChange();
}
void BattleOnlyModeWindow::onChange()
{
GAME->server().setBattleOnlyModeStartInfo(startInfo);
}
void BattleOnlyModeWindow::applyStartInfo(std::shared_ptr<BattleOnlyModeStartInfo> si)
{
}
void BattleOnlyModeWindow::setTerrainButtonText()