mirror of
https://github.com/Jylpah/blitz-tools.git
synced 2026-10-26 03:29:53 +01:00
get_tank_name(), get_map_name
This commit is contained in:
1 parent
a9db6d2191
commit
662171f10e
1 file changed
+12
-2
+12
-2
@@ -760,15 +760,25 @@ class WG:
|
|||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_map(cls, map_str: str) -> str:
|
def get_map_name(cls, map_str: str) -> str:
|
||||||
"""Return map name from short map string in replays"""
|
"""Return map name from short map string in replays"""
|
||||||
try:
|
try:
|
||||||
return cls.maps[map_str]
|
return cls.maps[map_str]
|
||||||
except:
|
except:
|
||||||
error('Map ' + map_str + ' not found')
|
error('Map ' + map_str + ' not found')
|
||||||
return None
|
return map_str
|
||||||
|
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_tank_name(cls, tank_str: str) -> str:
|
||||||
|
"""Return tnak name from short tank string in replays"""
|
||||||
|
try:
|
||||||
|
return cls.tanks["userStr"][tank_str]
|
||||||
|
except:
|
||||||
|
error('Tank ' + tank_str + ' not found')
|
||||||
|
return tank_str
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_map_user_strs(cls) -> str:
|
def get_map_user_strs(cls) -> str:
|
||||||
return cls.maps.keys()
|
return cls.maps.keys()
|
||||||
|
|||||||
Reference in new issue
Block a user