From c9c31f50ea1bd57304e8fcf7bd81f186b844e21f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 22 Feb 2018 23:40:57 +0300 Subject: hercules: removed debug output in map converter and use newer hash function. --- hercules/code/clienttoserver/maps.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hercules/code/clienttoserver/maps.py b/hercules/code/clienttoserver/maps.py index e6cbb66..06b7eb5 100644 --- a/hercules/code/clienttoserver/maps.py +++ b/hercules/code/clienttoserver/maps.py @@ -5,7 +5,7 @@ import array import csv -import md5 +import hashlib import os import zlib import struct @@ -74,7 +74,6 @@ def recreateMap(names): tmxName = names[0] mCaheName = destDir + names[1][:-3] + "mcache" with open(mCaheName, "wb") as w: - print (tmxName, mCaheName) dom = minidom.parse(tmxName) root = dom.documentElement tilesets = [] @@ -156,7 +155,7 @@ def recreateMap(names): binData = struct.pack(str(len(tiles))+"B", *tiles) binData = zlib.compress(binData) writeInt16(w, 1) - writeData(w, md5.new(binData).digest()) # 16 bytes + writeData(w, hashlib.md5(binData).digest()) # 16 bytes writeInt16(w, width) writeInt16(w, height) writeInt32(w, len(binData)) -- cgit v1.2.3-70-g09d2