Make generate_landmap importable.

This file may not be needed long term, but for now I want to import
to_multipoly for some other work.
This commit is contained in:
Dan Albert 2022-09-03 14:03:49 -07:00 committed by Raffson
parent db4b43f495
commit fa4bf3d516
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -32,7 +32,16 @@ def _geometry_collection_to_multipoly(obj: GeometryCollection) -> MultiPolygon:
raise RuntimeError(f"Not sure how to convert collection to multipoly: {obj.wkt}")
for terrain in ["cau", "nev", "syria", "channel", "normandy", "gulf", "marianaislands"]:
def main() -> None:
for terrain in [
"cau",
"nev",
"syria",
"channel",
"normandy",
"gulf",
"marianaislands",
]:
print("Terrain " + terrain)
m = Mission()
m.load_file("./{}_terrain.miz".format(terrain))
@ -69,3 +78,7 @@ for terrain in ["cau", "nev", "syria", "channel", "normandy", "gulf", "marianais
),
f,
)
if __name__ == "__main__":
main()