mirror of
https://github.com/Jylpah/blitz-tools.git
synced 2026-10-21 10:17:05 +02:00
Map name conversion added
This commit is contained in:
1 parent
e6e09b4467
commit
e2b4e84a14
1 file changed
+9
-1
+9
-1
@@ -59,7 +59,7 @@ class WG:
|
||||
'asia': range(int(2e9),int(4e9))
|
||||
}
|
||||
|
||||
def __init__(self, WG_appID: str, tankopedia_fn: str):
|
||||
def __init__(self, WG_appID: str, tankopedia_fn: str, maps_fn = None):
|
||||
|
||||
self.WG_appID = WG_appID
|
||||
self.tanks = None
|
||||
@@ -69,6 +69,14 @@ class WG:
|
||||
self.tanks = json.loads(f.read())
|
||||
except Exception as err:
|
||||
self.error('Could not read tankopedia: ' + tankopedia_fn + '\n' + str(err))
|
||||
|
||||
if maps_fn != None:
|
||||
try:
|
||||
with open(maps_fn, 'rt', encoding='utf8') as f:
|
||||
self.maps = json.loads(f.read())
|
||||
except Exception as err:
|
||||
self.error('Could not read maps file: ' + maps_fn + '\n' + str(err))
|
||||
|
||||
self.session = aiohttp.ClientSession()
|
||||
# self.session = None
|
||||
|
||||
|
||||
Reference in new issue
Block a user