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:
@ -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;
|
||||
|
Reference in New Issue
Block a user