Add: [Script] GSIndustry.GetConstructionDate() method (#11145)
(cherry picked from commit ce9305a5ee
)
This commit is contained in:

committed by
Jonathan G Rennison

parent
74c0678015
commit
7839a71d7e
@@ -48,6 +48,13 @@
|
||||
return GetString(STR_INDUSTRY_NAME);
|
||||
}
|
||||
|
||||
/* static */ ScriptDate::Date ScriptIndustry::GetConstructionDate(IndustryID industry_id)
|
||||
{
|
||||
Industry *i = Industry::GetIfValid(industry_id);
|
||||
if (i == nullptr) return ScriptDate::DATE_INVALID;
|
||||
return (ScriptDate::Date)i->construction_date;
|
||||
}
|
||||
|
||||
/* static */ bool ScriptIndustry::SetText(IndustryID industry_id, Text *text)
|
||||
{
|
||||
CCountedPtr<Text> counter(text);
|
||||
|
Reference in New Issue
Block a user