dual resources compatibility and shard page update

This commit is contained in:
Zach 2015-03-05 16:48:24 -06:00
parent ea592b148d
commit b0ee41b558
5 changed files with 25 additions and 8 deletions

3
.gitignore vendored
View file

@ -1,6 +1,9 @@
# Python artifacts:
*.pyc
# Windows
cmd.exe
# Eclipse IDE:
.project
.pydevproject

View file

@ -21,15 +21,23 @@ class DNABulkLoader:
def loadDNABulk(dnaStorage, file):
dnaLoader = DNALoader.DNALoader()
file = '../resources/' + file
dnaLoader.loadDNAFile(dnaStorage, file)
fileu = '../resources/' + file
fileo = 'resources/' + file
try:
dnaLoader.loadDNAFile(dnaStorage, fileu)
except:
dnaLoader.loadDNAFile(dnaStorage, fileo)
dnaLoader.destroy()
def loadDNAFile(dnaStorage, file):
print 'Reading DNA file...', file
dnaLoader = DNALoader.DNALoader()
file = '../resources/' + file
node = dnaLoader.loadDNAFile(dnaStorage, file)
fileu = '../resources/' + file
fileo = 'resources/' + file
try:
node = dnaLoader.loadDNAFile(dnaStorage, fileu)
except:
node = dnaLoader.loadDNAFile(dnaStorage, fileo)
dnaLoader.destroy()
if node.node().getNumChildren() > 0:
return node.node()
@ -37,8 +45,12 @@ def loadDNAFile(dnaStorage, file):
def loadDNAFileAI(dnaStorage, file):
dnaLoader = DNALoader.DNALoader()
file = '../resources/' + file
data = dnaLoader.loadDNAFileAI(dnaStorage, file)
fileu = '../resources/' + file
fileo = 'resources/' + file
try:
data = dnaLoader.loadDNAFileAI(dnaStorage, fileu)
except:
data = dnaLoader.loadDNAFileAI(dnaStorage, fileo)
dnaLoader.destroy()
return data

View file

@ -40,6 +40,7 @@ class NameGenerator:
searchPath = DSearchPath()
if __debug__:
searchPath.appendDirectory(Filename('../resources/phase_3/etc'))
searchPath.appendDirectory(Filename('resources/phase_3/etc'))
searchPath.appendDirectory(Filename('/phase_3/etc'))
filename = Filename(TTLocalizer.NameShopNameMaster)
found = vfs.resolveFilename(filename, searchPath)

View file

@ -1087,6 +1087,7 @@ class NPCMoviePlayer(DirectObject.DirectObject):
searchPath = DSearchPath()
if __debug__:
searchPath.appendDirectory(Filename('../resources/phase_3/etc'))
searchPath.appendDirectory(Filename('resources/phase_3/etc'))
searchPath.appendDirectory(Filename('/phase_3/etc'))
scriptFile = Filename('QuestScripts.txt')
found = vfs.resolveFilename(scriptFile, searchPath)

View file

@ -212,7 +212,7 @@ class ShardPage(ShtikerPage.ShtikerPage):
tText = 'Teleport to\n%s' % shardName
tImage = loader.loadModel('phase_4/models/gui/purchase_gui')
tImage.setSz(1.35)
self.shardTeleportButton = DirectButton(parent=districtInfoNode, relief=None, pos=(0.4247, 0, -0.15), image=(tImage.find('**/PurchScrn_BTN_UP'), tImage.find('**/PurchScrn_BTN_DN'), tImage.find('**/PurchScrn_BTN_RLVR')), text=tText, text_scale=0.065, text_pos=(0.0, 0.015), text_fg=Vec4(0, 0, 0, 1), textMayChange=1, command=self.choseShard, extraArgs=[shardId])
self.shardTeleportButton = DirectButton(parent=districtInfoNode, relief=None, pos=(0.4247, 0, 0.2), image=(tImage.find('**/PurchScrn_BTN_UP'), tImage.find('**/PurchScrn_BTN_DN'), tImage.find('**/PurchScrn_BTN_RLVR')), text=tText, text_scale=0.065, text_pos=(0.0, 0.015), text_fg=Vec4(0, 0, 0, 1), textMayChange=1, command=self.choseShard, extraArgs=[shardId])
self.currentBTL = buttonTuple[1]
self.currentBTR = buttonTuple[2]