maps4fs 1.7.6__py3-none-any.whl → 1.7.7__py3-none-any.whl
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/generator/game.py +3 -2
- {maps4fs-1.7.6.dist-info → maps4fs-1.7.7.dist-info}/METADATA +1 -1
- {maps4fs-1.7.6.dist-info → maps4fs-1.7.7.dist-info}/RECORD +6 -6
- {maps4fs-1.7.6.dist-info → maps4fs-1.7.7.dist-info}/LICENSE.md +0 -0
- {maps4fs-1.7.6.dist-info → maps4fs-1.7.7.dist-info}/WHEEL +0 -0
- {maps4fs-1.7.6.dist-info → maps4fs-1.7.7.dist-info}/top_level.txt +0 -0
maps4fs/generator/game.py
CHANGED
@@ -58,18 +58,19 @@ class Game:
|
|
58
58
|
return os.path.join(map_directory, "maps", "map", "map.xml")
|
59
59
|
|
60
60
|
@classmethod
|
61
|
-
def from_code(cls, code: str) -> Game:
|
61
|
+
def from_code(cls, code: str, map_template_path: str | None = None) -> Game:
|
62
62
|
"""Returns the game instance based on the game code.
|
63
63
|
|
64
64
|
Arguments:
|
65
65
|
code (str): The code of the game.
|
66
|
+
map_template_path (str, optional): Path to the map template file. Defaults to None.
|
66
67
|
|
67
68
|
Returns:
|
68
69
|
Game: The game instance.
|
69
70
|
"""
|
70
71
|
for game in cls.__subclasses__():
|
71
72
|
if game.code and game.code.lower() == code.lower():
|
72
|
-
return game()
|
73
|
+
return game(map_template_path)
|
73
74
|
raise ValueError(f"Game with code {code} not found.")
|
74
75
|
|
75
76
|
@property
|
@@ -5,7 +5,7 @@ maps4fs/generator/background.py,sha256=tV4UXvtkNN-OSvv6ujp4jFWRU1xGBgEvSakVGZ1H4
|
|
5
5
|
maps4fs/generator/component.py,sha256=pbpGaWy5C0UzxpcJ72HPY2gMol98snDr-bvNZSX4yY0,20823
|
6
6
|
maps4fs/generator/config.py,sha256=0QmK052B8bxyHVhg3jzCORLfOBMMmqVfhhbqXKf6OMk,4383
|
7
7
|
maps4fs/generator/dem.py,sha256=20gx0dzX0LyO6ipvDitst-BwGfcKogFqgQf9Q2qMH5U,10933
|
8
|
-
maps4fs/generator/game.py,sha256=
|
8
|
+
maps4fs/generator/game.py,sha256=GmCl_KQ9D-UwKao4HFEb0PRAm829ThtSZfkgzK3Oh2g,8143
|
9
9
|
maps4fs/generator/grle.py,sha256=hcbVBJ4j_Zr2QvEVo2cYNh2jARVXp_X3onifBtp9Zxs,20922
|
10
10
|
maps4fs/generator/i3d.py,sha256=pUyHKWKcw43xVCf3Y8iabtbQba05LYxMHi8vziGksIA,24843
|
11
11
|
maps4fs/generator/map.py,sha256=a50KQEr1XZKjS_WKXywGwh4OC3gyjY6M8FTc0eNcxpg,10183
|
@@ -23,8 +23,8 @@ maps4fs/toolbox/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,4
|
|
23
23
|
maps4fs/toolbox/background.py,sha256=9BXWNqs_n3HgqDiPztWylgYk_QM4YgBpe6_ZNQAWtSc,2154
|
24
24
|
maps4fs/toolbox/custom_osm.py,sha256=X6ZlPqiOhNjkmdD_qVroIfdOl9Rb90cDwVSLDVYgx80,1892
|
25
25
|
maps4fs/toolbox/dem.py,sha256=z9IPFNmYbjiigb3t02ZenI3Mo8odd19c5MZbjDEovTo,3525
|
26
|
-
maps4fs-1.7.
|
27
|
-
maps4fs-1.7.
|
28
|
-
maps4fs-1.7.
|
29
|
-
maps4fs-1.7.
|
30
|
-
maps4fs-1.7.
|
26
|
+
maps4fs-1.7.7.dist-info/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
|
27
|
+
maps4fs-1.7.7.dist-info/METADATA,sha256=rf4b6SCuVflM7i2t3N2FrGKvgJJetsnKIhMroi5kq0k,40436
|
28
|
+
maps4fs-1.7.7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
29
|
+
maps4fs-1.7.7.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
|
30
|
+
maps4fs-1.7.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|