aiarena-web
aiarena-web copied to clipboard
Make our replays compatible with sc2reader
below is a starting point suggested on discord
try: self.region = details['cache_handles'][0].server.lower() self.map_hash = details['cache_handles'][-1].hash self.map_file = details['cache_handles'][-1] except: ...
if hashlib.sha256('Standard Data: Void.SC2Mod'.encode('utf8')).hexdigest() in dependency_hashes: self.expansion = 'LotV' elif hashlib.sha256('Standard Data: Swarm.SC2Mod'.encode('utf8')).hexdigest() in dependency_hashes: self.expansion = 'HotS' elif hashlib.sha256('Standard Data: Liberty.SC2Mod'.encode('utf8')).hexdigest() in dependency_hashes: self.expansion = 'WoL' else: self.expansion = 'LotV' self.speed = 'Faster'
these hacks get the sc2reader a little further @DrInfy#2523