From 6fbbcec0f9a14874948cdac74e774950a0634018 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Sun, 24 Feb 2008 22:29:51 +0000 Subject: [PATCH] script reads in combined.txt and outputs all but multipatch textures --- tools/cleanroom/create_new.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tools/cleanroom/create_new.py b/tools/cleanroom/create_new.py index 1bdd32af..ca6cff52 100644 --- a/tools/cleanroom/create_new.py +++ b/tools/cleanroom/create_new.py @@ -25,6 +25,15 @@ for line in texture1.split("\n"): current = Texture(line[0],line[1],line[2]) textures[line[0]] = current -a = textures.values() -a.sort(lambda a,b: cmp(a.name,b.name)) -sys.stdout.write(''.join(map(str,a))) +oldtex = file("../../textures/combined.txt", "r").read() +patches = [] +for line in oldtex.split("\n"): + if len(line) == 0 or line[0] == ";" or line[0] == "#": + print line + elif line[0] == "*": + patches.append(line) + else: + if 1 == len(patches): + print patches[0] + patches = [] + print line