Add: [Script] GSIndustry.GetConstructionDate() method (#11145)
This commit is contained in:
@@ -49,6 +49,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