maps4fs 1.8.228__tar.gz → 1.8.230__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {maps4fs-1.8.228 → maps4fs-1.8.230}/PKG-INFO +1 -1
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/component/background.py +3 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/map.py +16 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs.egg-info/PKG-INFO +1 -1
- {maps4fs-1.8.228 → maps4fs-1.8.230}/pyproject.toml +1 -1
- {maps4fs-1.8.228 → maps4fs-1.8.230}/LICENSE.md +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/README.md +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/__init__.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/__init__.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/component/__init__.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/component/base/__init__.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/component/base/component.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/component/base/component_image.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/component/base/component_mesh.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/component/base/component_xml.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/component/config.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/component/grle.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/component/i3d.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/component/layer.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/component/satellite.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/component/texture.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dem.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/__init__.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/arctic.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/baden.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/base/wcs.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/base/wms.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/bavaria.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/canada.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/czech.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/denmark.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/dtm.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/england.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/finland.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/flanders.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/france.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/hessen.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/italy.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/lithuania.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/mv.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/niedersachsen.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/norway.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/nrw.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/rema.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/sachsenanhalt.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/scotland.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/spain.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/srtm.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/switzerland.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/usgs_wcs.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/dtm/utils.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/game.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/qgis.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/settings.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/generator/statistics.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/logger.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/toolbox/__init__.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/toolbox/background.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/toolbox/custom_osm.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs/toolbox/dem.py +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs.egg-info/SOURCES.txt +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs.egg-info/dependency_links.txt +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs.egg-info/requires.txt +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/maps4fs.egg-info/top_level.txt +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/setup.cfg +0 -0
- {maps4fs-1.8.228 → maps4fs-1.8.230}/tests/test_generator.py +0 -0
@@ -402,6 +402,9 @@ class Background(MeshComponent, ImageComponent):
|
|
402
402
|
if not self.water_resources_path:
|
403
403
|
self.logger.warning("Water resources texture not found.")
|
404
404
|
return
|
405
|
+
if not os.path.isfile(self.water_resources_path):
|
406
|
+
self.logger.warning("Water resources texture was not generated, skipping subtraction.")
|
407
|
+
return
|
405
408
|
|
406
409
|
water_resources_image = cv2.imread(self.water_resources_path, cv2.IMREAD_UNCHANGED)
|
407
410
|
dem_image = cv2.imread(self.output_path, cv2.IMREAD_UNCHANGED)
|
@@ -87,6 +87,7 @@ class Map:
|
|
87
87
|
"rotation": rotation,
|
88
88
|
"dtm_provider": dtm_provider.name(),
|
89
89
|
"custom_osm": bool(custom_osm),
|
90
|
+
"is_public": self.is_session_public(),
|
90
91
|
}
|
91
92
|
send_main_settings(main_settings)
|
92
93
|
except Exception as e:
|
@@ -347,3 +348,18 @@ class Map:
|
|
347
348
|
self.logger.error("Error getting country name by coordinates: %s", e)
|
348
349
|
return "Unknown"
|
349
350
|
return "Unknown"
|
351
|
+
|
352
|
+
def is_session_public(self) -> bool | str:
|
353
|
+
"""Check if the session is public.
|
354
|
+
|
355
|
+
Returns:
|
356
|
+
bool: True if the session is public, False otherwise.
|
357
|
+
If an error occurs, returns "Unknown".
|
358
|
+
"""
|
359
|
+
try:
|
360
|
+
from webui.config import is_public
|
361
|
+
|
362
|
+
return is_public()
|
363
|
+
except Exception as e:
|
364
|
+
self.logger.error("Error checking if the session is public: %s", e)
|
365
|
+
return "Unknown"
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "maps4fs"
|
7
|
-
version = "1.8.
|
7
|
+
version = "1.8.230"
|
8
8
|
description = "Generate map templates for Farming Simulator from real places."
|
9
9
|
authors = [{name = "iwatkot", email = "iwatkot@gmail.com"}]
|
10
10
|
license = {text = "MIT License"}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|