summaryrefslogtreecommitdiff
path: root/client/minimap-dyecmd.py
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-10 00:45:07 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-10 00:45:07 -0300
commitc6095ad062eaa0f5576cfab1c4fe436b90c2fbfe (patch)
tree742dd839971d2aab1f08fd0291af66e6439646ab /client/minimap-dyecmd.py
downloadtools-c6095ad062eaa0f5576cfab1c4fe436b90c2fbfe.tar.gz
tools-c6095ad062eaa0f5576cfab1c4fe436b90c2fbfe.tar.bz2
tools-c6095ad062eaa0f5576cfab1c4fe436b90c2fbfe.tar.xz
tools-c6095ad062eaa0f5576cfab1c4fe436b90c2fbfe.zip
Add initial tools
Diffstat (limited to 'client/minimap-dyecmd.py')
-rwxr-xr-xclient/minimap-dyecmd.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/client/minimap-dyecmd.py b/client/minimap-dyecmd.py
new file mode 100755
index 0000000..8f3e0c7
--- /dev/null
+++ b/client/minimap-dyecmd.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+import os
+f=open("minimap-dyecmd.sh", "w");
+CLIENT_DATA_ROOT="../../client-data"
+
+map_names = sorted([os.path.splitext(p)[0] for p in os.listdir(os.path.join(CLIENT_DATA_ROOT, u'graphics', u'minimaps'))])
+
+f.write('cd '+os.path.join(CLIENT_DATA_ROOT, u'graphics', u'minimaps')+'\n')
+for c in map_names:
+ if os.path.exists(os.path.join(CLIENT_DATA_ROOT, u'graphics', u'minimaps', c+u'.png')):
+ i=c+u'.png'
+ f.write("dyecmd %s tmp ; mv tmp %s\n" % (i, i))
+ f.write("echo \"Converted "+i+" successfully.\"\n")
+
+#f.write("git checkout -- minimap-dyecmd.sh")
+f.close()