Created
August 22, 2023 16:05
-
-
Save andythenorth/fd3f3ed6e02607291854c69fda4380ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function IndustryProductionIncreaseHistory(vulcan_town, extra_params) { | |
local industry = extra_params[0]; | |
if (industry in ::persistent_storage.industry_production_increase_timeseries) { | |
local date_substrs = []; | |
for (local counter = 0; counter < 10; counter++) { | |
if (counter < ::persistent_storage.industry_production_increase_timeseries[industry].len()) { | |
Log.Info(::persistent_storage.industry_production_increase_timeseries[industry][counter]); | |
date_substrs.append( | |
GSText( | |
GSText.STR_TOWN_STORY_INDUSTRY_REPORT_HISTORY_DATE_SUBSTR, | |
::persistent_storage.industry_production_increase_timeseries[industry][counter] | |
) | |
); | |
} | |
else { | |
date_substrs.append(GSText(GSText.STR_CABBAGE)); | |
} | |
} | |
return GSText( | |
GSText.STR_TOWN_STORY_INDUSTRY_REPORT_HISTORY_10_DATES, | |
date_substrs[0], | |
date_substrs[1], | |
date_substrs[2], | |
date_substrs[3], | |
date_substrs[4], | |
date_substrs[5], | |
date_substrs[6], | |
date_substrs[7], | |
date_substrs[8], | |
date_substrs[9] | |
) | |
} | |
else { | |
return GSText(GSText.STR_CABBAGE); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment