1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 18:32:35 +01:00

(svn r25969) -Add: [Script] ScriptTown::GetFundBuildingsDuration.

This commit is contained in:
frosch
2013-11-12 17:57:32 +00:00
parent 9a41aefcc4
commit 17eb3ee9df
6 changed files with 20 additions and 0 deletions

View File

@@ -228,6 +228,13 @@
return ::Town::Get(town_id)->road_build_months;
}
/* static */ int ScriptTown::GetFundBuildingsDuration(TownID town_id)
{
if (!IsValidTown(town_id)) return -1;
return ::Town::Get(town_id)->fund_buildings_months;
}
/* static */ ScriptCompany::CompanyID ScriptTown::GetExclusiveRightsCompany(TownID town_id)
{
if (ScriptObject::GetCompany() == OWNER_DEITY) return ScriptCompany::COMPANY_INVALID;