From 07d342711edf0cf85ed71cfe2330a72387b21f22 Mon Sep 17 00:00:00 2001 From: Loudrob Date: Sun, 15 Mar 2015 16:11:46 -0400 Subject: [PATCH] Re-add dual resources support. --- toontown/dna/DNAParser.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/toontown/dna/DNAParser.py b/toontown/dna/DNAParser.py index 76e49481..0d0662fe 100644 --- a/toontown/dna/DNAParser.py +++ b/toontown/dna/DNAParser.py @@ -17,20 +17,32 @@ class DNABulkLoader: def loadDNABulk(dnaStorage, file): dnaLoader = DNALoader() fileu = '../resources/' + file - dnaLoader.loadDNAFile(dnaStorage, fileu) + fileo = 'resources/' + file + try: + dnaLoader.loadDNAFile(dnaStorage, fileu) + except: + dnaLoader.loadDNAFile(dnaStorage, fileo) def loadDNAFile(dnaStorage, file): print 'Reading DNA file...', file dnaLoader = DNALoader() fileu = '../resources/' + file - node = dnaLoader.loadDNAFile(dnaStorage, fileu) + fileo = 'resources/' + file + try: + node = dnaLoader.loadDNAFile(dnaStorage, fileu) + except: + node = dnaLoader.loadDNAFile(dnaStorage, fileo if node.node().getNumChildren() > 0: return node.node() def loadDNAFileAI(dnaStorage, file): dnaLoader = DNALoader() fileu = '../resources/' + file - data = dnaLoader.loadDNAFileAI(dnaStorage, fileu) + fileo = 'resources/' + file + try: + data = dnaLoader.loadDNAFileAI(dnaStorage, fileu) + except: + data = dnaLoader.loadDNAFileAI(dnaStorage, fileo) return data def setupDoor(a, b, c, d, e, f):