|
@@ -148,14 +148,12 @@
|
|
|
{
|
|
|
if (!IsValidTown(town_id)) return -1;
|
|
|
|
|
|
return ::GetTown(town_id)->exclusive_counter;
|
|
|
}
|
|
|
|
|
|
extern uint GetMaskOfTownActions(int *nump, CompanyID cid, const Town *t);
|
|
|
|
|
|
/* static */ bool AITown::IsActionAvailable(TownID town_id, TownAction town_action)
|
|
|
{
|
|
|
if (!IsValidTown(town_id)) return false;
|
|
|
|
|
|
return HasBit(::GetMaskOfTownActions(NULL, _current_company, ::GetTown(town_id)), town_action);
|
|
|
}
|