Skip to content

Instantly share code, notes, and snippets.

@SamuXarick
Last active February 26, 2023 18:48
Show Gist options
  • Save SamuXarick/62fc9464c1fc08ff9bf5b0e4ef6e7a62 to your computer and use it in GitHub Desktop.
Save SamuXarick/62fc9464c1fc08ff9bf5b0e4ef6e7a62 to your computer and use it in GitHub Desktop.
local result = false;
do {
local rand_index = GSBase.RandRange(town_circular_area.len());
local tile = town_circular_area[rand_index];
town_circular_area.remove(rand_index);
if (GSTile.GetClosestTown(tile) == town) {
local foo = GSExecMode();
result = GSIndustryType.BuildIndustry(industry_spec.global_id, tile);
if (result) break;
}
}
while (town_circular_area.len() > 0);
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment