mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
sort town feature
This commit is contained in:
@ -269,3 +269,9 @@ void PlayerLocalState::removeOwnedTown(const CGTownInstance * town)
|
||||
if (currentSelection == nullptr && !ownedTowns.empty())
|
||||
setSelection(ownedTowns.front());
|
||||
}
|
||||
|
||||
void PlayerLocalState::swapOwnedTowns(int pos1, int pos2)
|
||||
{
|
||||
assert(ownedTowns[pos1] && ownedTowns[pos2]);
|
||||
std::swap(ownedTowns[pos1], ownedTowns[pos2]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user