Skip to content

Commit

Permalink
Disable background generation for community hosting.
Browse files Browse the repository at this point in the history
  • Loading branch information
iwatkot committed Dec 17, 2024
1 parent fc53154 commit c9740e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion maps4fs/generator/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def preprocess(self) -> None:
origin = self.coordinates

only_full_tiles = self.kwargs.get("only_full_tiles", True)
self.light_version = self.kwargs.get("light_version", False)

# Getting a list of 8 tiles around the map starting from the N(North) tile.
for path_step in get_steps(self.map_height, self.map_width, only_full_tiles):
Expand Down Expand Up @@ -98,7 +99,10 @@ def process(self) -> None:
if self.game.additional_dem_name is not None:
self.make_copy(cutted_dem_path, self.game.additional_dem_name)

self.generate_obj_files()
if not self.light_version:
self.generate_obj_files()
else:
self.logger.info("Light version is enabled, obj files will not be generated.")

def make_copy(self, dem_path: str, dem_name: str) -> None:
"""Copies DEM data to additional DEM file.
Expand Down
7 changes: 4 additions & 3 deletions webui/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ class Messages:
"Do you know what **Docker** is? If yes, please consider running the application "
"locally. \n"
"StreamLit community hosting has some limitations, such as: \n"
"🔸Maximum map size is 2048x2048 meters. \n"
"🔸Advanced settings are disabled. \n"
"🔸Texure dissolving is disabled (they will look worse). \n \n"
"🔸 Maximum map size is 2048x2048 meters. \n"
"🔸 Background terrain will not be generated. \n"
"🔸 Advanced settings are disabled. \n"
"🔸 Texure dissolving is disabled (they will look worse). \n \n"
"If you run the application locally, you won't have any of these limitations "
"and will be able to generate maps of any size with any settings you want and nice looking textures. \n"
"Learn more about the Docker version in the repo's "
Expand Down

0 comments on commit c9740e7

Please sign in to comment.