1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

Next part of town configuration:

- town screen is mostly implemented, has some minor issues
- factions are now separate from towns, neutrals have faction with id=9
- more constants to GameConstants: town-specific buildings, strings for terrains and resources
- replaced most access to builtBuildings with isBuilt() method
- replaced id's with enums for town subtype and buildings id's
This commit is contained in:
Ivan Savenko
2012-09-05 12:49:23 +00:00
parent 44cc848edc
commit 0ca9f64573
36 changed files with 1475 additions and 1471 deletions

View File

@ -760,7 +760,8 @@ void CAdvMapInt::show(SDL_Surface * to)
void CAdvMapInt::selectionChanged()
{
const CGTownInstance *to = LOCPLINT->towns[townList.getSelectedIndex()];
select(to);
if (selection != to)
select(to);
}
void CAdvMapInt::centerOn(int3 on)
{
@ -877,7 +878,7 @@ void CAdvMapInt::keyPressed(const SDL_KeyboardEvent & key)
const CGTownInstance *townWithMarket = NULL;
BOOST_FOREACH(const CGTownInstance *t, LOCPLINT->cb->getTownsInfo())
{
if(vstd::contains(t->builtBuildings, 14))
if(t->hasBuilt(EBuilding::MARKETPLACE))
{
townWithMarket = t;
break;