bugged
stringlengths 4
228k
| fixed
stringlengths 0
96.3M
| __index_level_0__
int64 0
481k
|
|---|---|---|
def AppendToMenu(self,menu,window,data): subMenu = wx.Menu() menu.AppendMenu(-1,self.name,subMenu) #--Only enable the menu and append the subMenu's if all of the selected items are archives for item in window.GetSelected(): if not isinstance(window.data[item],bosh.InstallerArchive): id = menu.FindItem(self.name) menu.Enable(id,False) break else: for link in self.links: link.AppendToMenu(subMenu,window,data)
|
def AppendToMenu(self,menu,window,data): subMenu = wx.Menu() menu.AppendMenu(-1,self.name,subMenu) #--Only enable the menu and append the subMenu's if all of the selected items are archives for item in window.GetSelected(): if not isinstance(window.data[item],bosh.InstallerArchive): id = menu.FindItem(self.name) menu.Enable(id,False) break else: for link in self.links: link.AppendToMenu(subMenu,window,data)
| 478,700
|
def remove(self,item): """Removes load list.""" settings.setChanged('bash.loadLists.data') del self.data[item] return True
|
def remove(self,item): """Removes load list.""" settings.setChanged('bash.loadLists.data') del self.data[item] return True
| 478,701
|
def DoEdit(self,event): data = Mods_LoadListData(self.window) dialog = balt.ListEditor(self.window,-1,_('Load Lists'),data) dialog.ShowModal() dialog.Destroy()
|
def DoEdit(self,event): data = Mods_LoadListData(self.window) dialog = balt.ListEditor(self.window,-1,_('Load Lists'),data) dialog.ShowModal() dialog.Destroy()
| 478,702
|
def Execute(self,event): self.window.esmsFirst = not self.window.esmsFirst self.window.PopulateItems()
|
def Execute(self,event): self.window.esmsFirst = not self.window.esmsFirst self.window.PopulateItems()
| 478,703
|
def Execute(self,event): self.window.selectedFirst = not self.window.selectedFirst self.window.PopulateItems()
|
def Execute(self,event): self.window.selectedFirst = not self.window.selectedFirst self.window.PopulateItems()
| 478,704
|
def Execute(self,event): settings['bash.mods.autoGhost'] ^= True bosh.modInfos.autoGhost(True) self.window.RefreshUI()
|
def Execute(self,event): settings['bash.mods.autoGhost'] ^= True bosh.modInfos.autoGhost(True) self.window.RefreshUI()
| 478,705
|
def Execute(self,event): settings['bash.balo.autoGroup'] = not settings.get('bash.balo.autoGroup',True) bosh.modInfos.updateAutoGroups()
|
def Execute(self,event): settings['bash.balo.autoGroup'] = not settings.get('bash.balo.autoGroup',True) bosh.modInfos.updateAutoGroups()
| 478,706
|
def Execute(self,event): deprint(_('Debug Printing: Off')) bolt.deprintOn = not bolt.deprintOn deprint(_('Debug Printing: On'))
|
def Execute(self,event): deprint(_('Debug Printing: Off')) bolt.deprintOn = not bolt.deprintOn deprint(_('Debug Printing: On'))
| 478,707
|
def Execute(self,event): if not settings.get('bash.balo.full',False): message = _("Activate Full Balo?\n\nFull Balo segregates mods by groups, and then autosorts mods within those groups by alphabetical order. Full Balo is still in development and may have some rough edges.") if balt.askContinue(self.window,message,'bash.balo.full.continue',_('Balo Groups')): dialog = Mod_BaloGroups_Edit(self.window) dialog.ShowModal() dialog.Destroy() return else: settings['bash.balo.full'] = False bosh.modInfos.fullBalo = False bosh.modInfos.refresh(doInfos=False)
|
def Execute(self,event): if not settings.get('bash.balo.full',False): message = _("Activate Full Balo?\n\nFull Balo segregates mods by groups, and then autosorts mods within those groups by alphabetical order. Full Balo is still in development and may have some rough edges.") if balt.askContinue(self.window,message,'bash.balo.full.continue',_('Balo Groups')): dialog = Mod_BaloGroups_Edit(self.window) dialog.ShowModal() dialog.Destroy() return else: settings['bash.balo.full'] = False bosh.modInfos.fullBalo = False bosh.modInfos.refresh(doInfos=False)
| 478,708
|
def Execute(self,event): message = _("Generate Bash program translator file?\n\nThis function is for translating Bash itself (NOT mods) into non-English languages. For more info, see Internationalization section of Bash readme.") if not balt.askContinue(self.window,message,'bash.dumpTranslator.continue',_('Dump Translator')): return import locale language = locale.getlocale()[0].split('_',1)[0] outPath = bosh.dirs['app'].join('Mopy','Data','NEW%s.txt' % (language,)) outFile = outPath.open('w') #--Scan for keys and dump to keyCount = 0 dumpedKeys = set() reKey = re.compile(r'_\([\'\"](.+?)[\'\"]\)') reTrans = bolt.reTrans for pyPath in (GPath(x+'.py') for x in ('bolt','balt','bush','bosh','bash','basher','bashmon')): pyText = pyPath.open() for lineNum,line in enumerate(pyText): line = re.sub('#.*','',line) for key in reKey.findall(line): key = reTrans.match(key).group(2) if key in dumpedKeys: continue outFile.write('=== %s, %d\n' % (pyPath.s,lineNum+1)) outFile.write(key+'\n>>>>\n') value = _(key,False) if value != key: outFile.write(value) outFile.write('\n') dumpedKeys.add(key) keyCount += 1 pyText.close() outFile.close() balt.showOk(self.window, '%d translation keys written to Mopy\\Data\\%s.' % (keyCount,outPath.stail), _('Dump Translator')+': '+outPath.stail)
|
def Execute(self,event): message = _("Generate Bash program translator file?\n\nThis function is for translating Bash itself (NOT mods) into non-English languages. For more info, see Internationalization section of Bash readme.") if not balt.askContinue(self.window,message,'bash.dumpTranslator.continue',_('Dump Translator')): return import locale language = locale.getlocale()[0].split('_',1)[0] outPath = bosh.dirs['app'].join('Mopy','Data','NEW%s.txt' % (language,)) outFile = outPath.open('w') #--Scan for keys and dump to keyCount = 0 dumpedKeys = set() reKey = re.compile(r'_\([\'\"](.+?)[\'\"]\)') reTrans = bolt.reTrans for pyPath in (GPath(x+'.py') for x in ('bolt','balt','bush','bosh','bash','basher','bashmon')): pyText = pyPath.open() for lineNum,line in enumerate(pyText): line = re.sub('#.*','',line) for key in reKey.findall(line): key = reTrans.match(key).group(2) if key in dumpedKeys: continue outFile.write('=== %s, %d\n' % (pyPath.s,lineNum+1)) outFile.write(key+'\n>>>>\n') value = _(key,False) if value != key: outFile.write(value) outFile.write('\n') dumpedKeys.add(key) keyCount += 1 pyText.close() outFile.close() balt.showOk(self.window, '%d translation keys written to Mopy\\Data\\%s.' % (keyCount,outPath.stail), _('Dump Translator')+': '+outPath.stail)
| 478,709
|
def Execute(self,event): """Handle menu selection.""" window = getattr(self,'gTank',None) or self.window #--Continue Query message = _("Apply an ini tweak to Fallout3.ini?\n\nWARNING: Incorrect tweaks can result in CTDs and even damage to you computer!") if not balt.askContinue(window,message,'bash.iniTweaks.continue',_("INI Tweaks")): return #--File dialog tweakDir = bosh.modInfos.dir.join("INI Tweaks") tweakDir.makedirs() tweakPath = balt.askOpen(window,_('INI Tweaks'),tweakDir,'', '*.ini') if not tweakPath: return bosh.fallout3Ini.applyTweakFile(tweakPath) balt.showInfo(window,tweakPath.stail+_(' applied.'),_('INI Tweaks'))
|
def Execute(self,event): """Handle menu selection.""" window = getattr(self,'gTank',None) or self.window #--Continue Query message = _("Apply an ini tweak to Fallout3.ini?\n\nWARNING: Incorrect tweaks can result in CTDs and even damage to you computer!") if not balt.askContinue(window,message,'bash.iniTweaks.continue',_("INI Tweaks")): return #--File dialog tweakDir = bosh.modInfos.dir.join("INI Tweaks") tweakDir.makedirs() tweakPath = balt.askOpen(window,_('INI Tweaks'),tweakDir,'', '*.ini') if not tweakPath: return bosh.fallout3Ini.applyTweakFile(tweakPath) balt.showInfo(window,tweakPath.stail+_(' applied.'),_('INI Tweaks'))
| 478,710
|
def Execute(self,event): #--Get masters list text = bosh.modInfos.getModList() if (wx.TheClipboard.Open()): wx.TheClipboard.SetData(wx.TextDataObject(text)) wx.TheClipboard.Close() balt.showLog(self.window,text,_("Active Mod Files"),asDialog=False,fixedFont=False,icons=bashBlue)
|
def Execute(self,event): #--Get masters list text = bosh.modInfos.getModList() if (wx.TheClipboard.Open()): wx.TheClipboard.SetData(wx.TextDataObject(text)) wx.TheClipboard.Close() balt.showLog(self.window,text,_("Active Mod Files"),asDialog=False,fixedFont=False,icons=bashBlue)
| 478,711
|
def Execute(self,event): lockTimes = not bosh.modInfos.lockTimes if not lockTimes: bosh.modInfos.mtimes.clear() settings['bosh.modInfos.resetMTimes'] = bosh.modInfos.lockTimes = lockTimes bosh.modInfos.refresh(doInfos=False) modList.RefreshUI()
|
def Execute(self,event): lockTimes = not bosh.modInfos.lockTimes if not lockTimes: bosh.modInfos.mtimes.clear() settings['bosh.modInfos.resetMTimes'] = bosh.modInfos.lockTimes = lockTimes bosh.modInfos.refresh(doInfos=False) modList.RefreshUI()
| 478,712
|
def Execute(self,event): """Handle selection.""" self.path.start()
|
def Execute(self,event): """Handle selection.""" self.path.start()
| 478,713
|
def Execute(self,event): """Handle selection.""" self.path.start()
|
def Execute(self,event): """Handle selection.""" self.path.start()
| 478,714
|
def Execute(self,event): """Handle selection.""" bosh.modInfos.setFallout3Version(self.key) bosh.modInfos.refresh() modList.RefreshUI() if self.setProfile: bosh.saveInfos.profiles.setItem(bosh.saveInfos.localSave,'vFallout3',self.key) bashFrame.SetTitle()
|
def Execute(self,event): """Handle selection.""" bosh.modInfos.setFallout3Version(self.key) bosh.modInfos.refresh() modList.RefreshUI() if self.setProfile: bosh.saveInfos.profiles.setItem(bosh.saveInfos.localSave,'vFallout3',self.key) bashFrame.SetTitle()
| 478,715
|
def Execute(self,event): settings['fo3Edit.iKnowWhatImDoing'] ^= True
|
def Execute(self,event): settings['fo3Edit.iKnowWhatImDoing'] ^= True
| 478,716
|
def Execute(self,event): message = (_("Update ArchiveInvalidation.txt? This updates the file that forces the game engine to recognize replaced textures. Note that this feature is experimental and most probably somewhat incomplete. You may prefer to use another program to do AI.txt file updating.")) if not balt.askContinue(self.window,message,'bash.updateAI.continue',_('ArchiveInvalidation.txt')): return bosh.ResourceReplacer.updateInvalidator() balt.showOk(self.window,"ArchiveInvalidation.txt updated.")
|
def Execute(self,event): message = (_("Update ArchiveInvalidation.txt? This updates the file that forces the game engine to recognize replaced textures. Note that this feature is experimental and most probably somewhat incomplete. You may prefer to use another program to do AI.txt file updating.")) if not balt.askContinue(self.window,message,'bash.updateAI.continue',_('ArchiveInvalidation.txt')): return bosh.ResourceReplacer.updateInvalidator() balt.showOk(self.window,"ArchiveInvalidation.txt updated.")
| 478,717
|
def Execute(self,event): message = (_("This command will export the level info for NPCs whose level is offset with respect to the PC. The exported file can be edited with most spreadsheet programs and then reimported.\n\nSee the Bash help file for more info.")) if not balt.askContinue(self.window,message,'bash.actorLevels.export.continue',_('Export NPC Levels')): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_NPC_Levels.csv') textDir = settings.get('bash.workDir',bosh.dirs['app']) #--File dialog textPath = balt.askSave(self.window,_('Export NPC levels to:'), textDir,textName, '*.csv') if not textPath: return (textDir,textName) = textPath.headTail settings['bash.workDir'] = textDir #--Export progress = balt.Progress(_("Export NPC Levels")) try: bosh.ActorLevels.dumpText(fileInfo,textPath,progress) finally: progress = progress.Destroy()
|
def Execute(self,event): message = (_("This command will export the level info for NPCs whose level is offset with respect to the PC. The exported file can be edited with most spreadsheet programs and then reimported.\n\nSee the Bash help file for more info.")) if not balt.askContinue(self.window,message,'bash.actorLevels.export.continue',_('Export NPC Levels')): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_NPC_Levels.csv') textDir = settings.get('bash.workDir',bosh.dirs['app']) #--File dialog textPath = balt.askSave(self.window,_('Export NPC levels to:'), textDir,textName, '*.csv') if not textPath: return (textDir,textName) = textPath.headTail settings['bash.workDir'] = textDir #--Export progress = balt.Progress(_("Export NPC Levels")) try: bosh.ActorLevels.dumpText(fileInfo,textPath,progress) finally: progress = progress.Destroy()
| 478,718
|
def Execute(self,event): message = (_("This command will import NPC level info from a previously exported file.\n\nSee the Bash help file for more info.")) if not balt.askContinue(self.window,message,'bash.actorLevels.import.continue',_('Import NPC Levels')): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_NPC_Levels.csv') textDir = settings.get('bash.workDir',bosh.dirs['app']) #--File dialog textPath = balt.askOpen(self.window,_('Export NPC levels to:'), textDir, textName, '*.csv') if not textPath: return (textDir,textName) = textPath.headTail settings['bash.workDir'] = textDir #--Export progress = balt.Progress(_("Import NPC Levels")) try: bosh.ActorLevels.loadText(fileInfo,textPath, progress) finally: progress = progress.Destroy()
|
def Execute(self,event): message = (_("This command will import NPC level info from a previously exported file.\n\nSee the Bash help file for more info.")) if not balt.askContinue(self.window,message,'bash.actorLevels.import.continue',_('Import NPC Levels')): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_NPC_Levels.csv') textDir = settings.get('bash.workDir',bosh.dirs['app']) #--File dialog textPath = balt.askOpen(self.window,_('Export NPC levels to:'), textDir, textName, '*.csv') if not textPath: return (textDir,textName) = textPath.headTail settings['bash.workDir'] = textDir #--Export progress = balt.Progress(_("Import NPC Levels")) try: bosh.ActorLevels.loadText(fileInfo,textPath, progress) finally: progress = progress.Destroy()
| 478,719
|
def Execute(self,event): message = _("WARNING! For advanced modders only! Adds specified master to list of masters, thus ceding ownership of new content of this mod to the new master. Useful for splitting mods into esm/esp pairs.") if not balt.askContinue(self.window,message,'bash.addMaster.continue',_('Add Master')): return fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] wildcard = _('Fallout3 Masters')+' (*.esm;*.esp)|*.esm;*.esp' masterPath = balt.askOpen(self.window,_('Add master:'),fileInfo.dir, '', wildcard) if not masterPath: return (dir,name) = masterPath.headTail if dir != fileInfo.dir: return balt.showError(self.window, _("File must be selected from Fallout3 Data Files directory.")) if name in fileInfo.header.masters: return balt.showError(self.window,_("%s is already a master!") % (name.s,)) if name in bosh.modInfos: #--Avoid capitalization errors by getting the actual name from modinfos. name = bosh.modInfos[name].name fileInfo.header.masters.append(name) fileInfo.header.changed = True fileInfo.writeHeader() bosh.modInfos.refreshFile(fileInfo.name) self.window.RefreshUI()
|
def Execute(self,event): message = _("WARNING! For advanced modders only! Adds specified master to list of masters, thus ceding ownership of new content of this mod to the new master. Useful for splitting mods into esm/esp pairs.") if not balt.askContinue(self.window,message,'bash.addMaster.continue',_('Add Master')): return fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] wildcard = _('Fallout3 Masters')+' (*.esm;*.esp)|*.esm;*.esp' masterPath = balt.askOpen(self.window,_('Add master:'),fileInfo.dir, '', wildcard) if not masterPath: return (dir,name) = masterPath.headTail if dir != fileInfo.dir: return balt.showError(self.window, _("File must be selected from Fallout3 Data Files directory.")) if name in fileInfo.header.masters: return balt.showError(self.window,_("%s is already a master!") % (name.s,)) if name in bosh.modInfos: #--Avoid capitalization errors by getting the actual name from modinfos. name = bosh.modInfos[name].name fileInfo.header.masters.append(name) fileInfo.header.changed = True fileInfo.writeHeader() bosh.modInfos.refreshFile(fileInfo.name) self.window.RefreshUI()
| 478,720
|
def DoCancel(self,event): """Handle save button.""" balt.sizes[self.__class__.__name__] = self.GetSizeTuple() self.EndModal(wx.ID_CANCEL)
|
def DoCancel(self,event): """Handle save button.""" balt.sizes[self.__class__.__name__] = self.GetSizeTuple() self.EndModal(wx.ID_CANCEL)
| 478,721
|
def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_("Allow Ghosting")) menu.AppendItem(menuItem)
|
def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_("Allow Ghosting")) menu.AppendItem(menuItem)
| 478,722
|
def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_("Disallow Ghosting")) menu.AppendItem(menuItem)
|
def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_("Disallow Ghosting")) menu.AppendItem(menuItem)
| 478,723
|
def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_("Invert Ghosting")) menu.AppendItem(menuItem)
|
def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_("Invert Ghosting")) menu.AppendItem(menuItem)
| 478,724
|
def Execute(self,event): for fileName in self.data: fileInfo = bosh.modInfos[fileName] allowGhosting = bosh.modInfos.table.getItem(fileName,'allowGhosting',True) ^ True bosh.modInfos.table.setItem(fileName,'allowGhosting',allowGhosting) toGhost = allowGhosting and fileName not in bosh.modInfos.ordered oldGhost = fileInfo.isGhost if fileInfo.setGhost(toGhost) != oldGhost: self.window.RefreshUI(fileName)
|
def Execute(self,event): for fileName in self.data: fileInfo = bosh.modInfos[fileName] allowGhosting = bosh.modInfos.table.getItem(fileName,'allowGhosting',True) ^ True bosh.modInfos.table.setItem(fileName,'allowGhosting',allowGhosting) toGhost = allowGhosting and fileName not in bosh.modInfos.ordered oldGhost = fileInfo.isGhost if fileInfo.setGhost(toGhost) != oldGhost: self.window.RefreshUI(fileName)
| 478,725
|
def Execute(self,event): fileName = self.data[0] fileInfo = bosh.modInfos[fileName] allowGhosting = self.allowGhosting ^ True bosh.modInfos.table.setItem(fileName,'allowGhosting',allowGhosting) toGhost = allowGhosting and fileName not in bosh.modInfos.ordered oldGhost = fileInfo.isGhost if fileInfo.setGhost(toGhost) != oldGhost: self.window.RefreshUI(fileName)
|
def Execute(self,event): fileName = self.data[0] fileInfo = bosh.modInfos[fileName] allowGhosting = self.allowGhosting ^ True bosh.modInfos.table.setItem(fileName,'allowGhosting',allowGhosting) toGhost = allowGhosting and fileName not in bosh.modInfos.ordered oldGhost = fileInfo.isGhost if fileInfo.setGhost(toGhost) != oldGhost: self.window.RefreshUI(fileName)
| 478,726
|
def Execute(self,event): message = _("Apply Nvidia fog fix. This modify fog values in interior cells to avoid the Nvidia black screen bug.") if not balt.askContinue(self.window,message,'bash.cleanMod.continue', _('Nvidia Fog Fix')): return progress = balt.Progress(_("Nvidia Fog Fix")) progress.setFull(len(self.data)) try: fixed = [] for index,fileName in enumerate(map(GPath,self.data)): if fileName == 'Fallout3.esm': continue progress(index,_("Scanning %s.") % (fileName.s,)) fileInfo = bosh.modInfos[fileName] cleanMod = bosh.CleanMod(fileInfo) cleanMod.clean(SubProgress(progress,index,index+1)) if cleanMod.fixedCells: fixed.append('* %4d %s' % (len(cleanMod.fixedCells),fileName.s)) progress.Destroy() if fixed: message = _("===Cells Fixed:\n")+('\n'.join(fixed)) balt.showWryeLog(self.window,message,_('Nvidia Fog Fix'),icons=bashBlue) else: message = _("No changes required.") balt.showOk(self.window,message,_('Nvidia Fog Fix')) finally: progress = progress.Destroy()
|
def Execute(self,event): message = _("Apply Nvidia fog fix. This modify fog values in interior cells to avoid the Nvidia black screen bug.") if not balt.askContinue(self.window,message,'bash.cleanMod.continue', _('Nvidia Fog Fix')): return progress = balt.Progress(_("Nvidia Fog Fix")) progress.setFull(len(self.data)) try: fixed = [] for index,fileName in enumerate(map(GPath,self.data)): if fileName == 'Fallout3.esm': continue progress(index,_("Scanning %s.") % (fileName.s,)) fileInfo = bosh.modInfos[fileName] cleanMod = bosh.CleanMod(fileInfo) cleanMod.clean(SubProgress(progress,index,index+1)) if cleanMod.fixedCells: fixed.append('* %4d %s' % (len(cleanMod.fixedCells),fileName.s)) progress.Destroy() if fixed: message = _("===Cells Fixed:\n")+('\n'.join(fixed)) balt.showWryeLog(self.window,message,_('Nvidia Fog Fix'),icons=bashBlue) else: message = _("No changes required.") balt.showOk(self.window,message,_('Nvidia Fog Fix')) finally: progress = progress.Destroy()
| 478,727
|
def Execute(self,event): data = self.data fileName = GPath(data[0]) fileInfos = self.window.data fileInfo = fileInfos[fileName] count = 0 newName = GPath('New Mod.esp') while newName in fileInfos: count += 1 newName = GPath('New Mod %d.esp' % (count,)) newInfo = bosh.ModInfo(fileInfo.dir,newName) newInfo.mtime = fileInfo.mtime+20 newFile = bosh.ModFile(newInfo,bosh.LoadFactory(True)) newFile.tes4.masters = [GPath('Fallout3.esm')] newFile.safeSave() mod_group = bosh.modInfos.table.getColumn('group') mod_group[newName] = mod_group.get(fileName,'') bosh.modInfos.refresh() self.window.RefreshUI(detail=newName)
|
def Execute(self,event): data = self.data fileName = GPath(data[0]) fileInfos = self.window.data fileInfo = fileInfos[fileName] count = 0 newName = GPath('New Mod.esp') while newName in fileInfos: count += 1 newName = GPath('New Mod %d.esp' % (count,)) newInfo = bosh.ModInfo(fileInfo.dir,newName) newInfo.mtime = fileInfo.mtime+20 newFile = bosh.ModFile(newInfo,bosh.LoadFactory(True)) newFile.tes4.masters = [GPath('Fallout3.esm')] newFile.safeSave() mod_group = bosh.modInfos.table.getColumn('group') mod_group[newName] = mod_group.get(fileName,'') bosh.modInfos.refresh() self.window.RefreshUI(detail=newName)
| 478,728
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Relations.csv') textDir = bosh.dirs['patches'] textDir.makedirs() #--File dialog textPath = balt.askSave(self.window,_('Export faction relations to:'),textDir,textName, '*Relations.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Export progress = balt.Progress(_("Export Relations")) try: factionRelations = bosh.FactionRelations() readProgress = SubProgress(progress,0.1,0.8) readProgress.setFull(len(self.data)) for index,fileName in enumerate(map(GPath,self.data)): fileInfo = bosh.modInfos[fileName] readProgress(index,_("Reading %s.") % (fileName.s,)) factionRelations.readFromMod(fileInfo) progress(0.8,_("Exporting to %s.") % (textName.s,)) factionRelations.writeToText(textPath) progress(1.0,_("Done.")) finally: progress = progress.Destroy()
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Relations.csv') textDir = bosh.dirs['patches'] textDir.makedirs() #--File dialog textPath = balt.askSave(self.window,_('Export faction relations to:'),textDir,textName, '*Relations.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Export progress = balt.Progress(_("Export Relations")) try: factionRelations = bosh.FactionRelations() readProgress = SubProgress(progress,0.1,0.8) readProgress.setFull(len(self.data)) for index,fileName in enumerate(map(GPath,self.data)): fileInfo = bosh.modInfos[fileName] readProgress(index,_("Reading %s.") % (fileName.s,)) factionRelations.readFromMod(fileInfo) progress(0.8,_("Exporting to %s.") % (textName.s,)) factionRelations.writeToText(textPath) progress(1.0,_("Done.")) finally: progress = progress.Destroy()
| 478,729
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Factions.csv') textDir = bosh.dirs['patches'] textDir.makedirs() #--File dialog textPath = balt.askSave(self.window,_('Export factions to:'),textDir,textName, '*Factions.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Export progress = balt.Progress(_("Export Factions")) try: actorFactions = bosh.ActorFactions() readProgress = SubProgress(progress,0.1,0.8) readProgress.setFull(len(self.data)) for index,fileName in enumerate(map(GPath,self.data)): fileInfo = bosh.modInfos[fileName] readProgress(index,_("Reading %s.") % (fileName.s,)) actorFactions.readFromMod(fileInfo) progress(0.8,_("Exporting to %s.") % (textName.s,)) actorFactions.writeToText(textPath) progress(1.0,_("Done.")) finally: progress = progress.Destroy()
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Factions.csv') textDir = bosh.dirs['patches'] textDir.makedirs() #--File dialog textPath = balt.askSave(self.window,_('Export factions to:'),textDir,textName, '*Factions.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Export progress = balt.Progress(_("Export Factions")) try: actorFactions = bosh.ActorFactions() readProgress = SubProgress(progress,0.1,0.8) readProgress.setFull(len(self.data)) for index,fileName in enumerate(map(GPath,self.data)): fileInfo = bosh.modInfos[fileName] readProgress(index,_("Reading %s.") % (fileName.s,)) actorFactions.readFromMod(fileInfo) progress(0.8,_("Exporting to %s.") % (textName.s,)) actorFactions.writeToText(textPath) progress(1.0,_("Done.")) finally: progress = progress.Destroy()
| 478,730
|
def Execute(self,event): message = _('Obsolete. Mods are now automatically tagged when possible.') balt.showInfo(self.window,message,_('Mark Levelers'))
|
def Execute(self,event): message = _('Obsolete. Mods are now automatically tagged when possible.') balt.showInfo(self.window,message,_('Mark Levelers'))
| 478,731
|
def Execute(self,event): yes,no = [],[] mod_mergeInfo = bosh.modInfos.table.getColumn('mergeInfo') for fileName in map(GPath,self.data): if fileName == 'Fallout3.esm': continue fileInfo = bosh.modInfos[fileName] descTags = fileInfo.getBashTagsDesc() if descTags and 'Merge' in descTags: descTags.discard('Merge') fileInfo.setBashTagsDesc(descTags) canMerge = bosh.PatchFile.modIsMergeable(fileInfo) mod_mergeInfo[fileName] = (fileInfo.size,canMerge == True) if canMerge == True: yes.append(fileName) else: no.append("%s (%s)" % (fileName.s,canMerge)) message = '' if yes: message += _('=== Mergeable\n* ') + '\n* '.join(x.s for x in yes) if yes and no: message += '\n\n' if no: message += _('=== Not Mergeable\n* ') + '\n* '.join(no) self.window.RefreshUI(yes) balt.showWryeLog(self.window,message,_('Mark Mergeable'),icons=bashBlue)
|
def Execute(self,event): yes,no = [],[] mod_mergeInfo = bosh.modInfos.table.getColumn('mergeInfo') for fileName in map(GPath,self.data): if fileName == 'Fallout3.esm': continue fileInfo = bosh.modInfos[fileName] descTags = fileInfo.getBashTagsDesc() if descTags and 'Merge' in descTags: descTags.discard('Merge') fileInfo.setBashTagsDesc(descTags) canMerge = bosh.PatchFile.modIsMergeable(fileInfo) mod_mergeInfo[fileName] = (fileInfo.size,canMerge == True) if canMerge == True: yes.append(fileName) else: no.append("%s (%s)" % (fileName.s,canMerge)) message = '' if yes: message += _('=== Mergeable\n* ') + '\n* '.join(x.s for x in yes) if yes and no: message += '\n\n' if no: message += _('=== Not Mergeable\n* ') + '\n* '.join(no) self.window.RefreshUI(yes) balt.showWryeLog(self.window,message,_('Mark Mergeable'),icons=bashBlue)
| 478,732
|
def Execute(self,event): for item in self.data: fileInfo = bosh.modInfos[item] newType = (fileInfo.isEsm() and 'esp') or 'esm' modsDir = fileInfo.dir curName = fileInfo.name newName = curName.root+'.'+newType #--Replace existing file? if modsDir.join(newName).exists(): if not balt.askYes(self.window,_('Replace existing %s?') % (newName.s,),self.label): continue bosh.modInfos[newName].makeBackup() #--New Time modInfos = bosh.modInfos timeSource = (curName,newName)[newName in modInfos] newTime = modInfos[timeSource].mtime #--Copy, set type, update mtime. modInfos.copy(curName,modsDir,newName,newTime) modInfos.table.copyRow(curName,newName) newInfo = modInfos[newName] newInfo.setType(newType) newInfo.setmtime(newTime) #--Repopulate self.window.RefreshUI(detail=newName)
|
def Execute(self,event): for item in self.data: fileInfo = bosh.modInfos[item] newType = (fileInfo.isEsm() and 'esp') or 'esm' modsDir = fileInfo.dir curName = fileInfo.name newName = curName.root+'.'+newType #--Replace existing file? if modsDir.join(newName).exists(): if not balt.askYes(self.window,_('Replace existing %s?') % (newName.s,),self.label): continue bosh.modInfos[newName].makeBackup() #--New Time modInfos = bosh.modInfos timeSource = (curName,newName)[newName in modInfos] newTime = modInfos[timeSource].mtime #--Copy, set type, update mtime. modInfos.copy(curName,modsDir,newName,newTime) modInfos.table.copyRow(curName,newName) newInfo = modInfos[newName] newInfo.setType(newType) newInfo.setmtime(newTime) #--Repopulate self.window.RefreshUI(detail=newName)
| 478,733
|
def Execute(self,event): #--Select source face file srcDir = bosh.saveInfos.dir wildcard = _('Fallout3 Files')+' (*.fos;*.for)|*.fos;*.for' #--File dialog srcPath = balt.askOpen(self.window,'Face Source:',srcDir, '', wildcard) if not srcPath: return #--Get face srcDir,srcName = srcPath.headTail srcInfo = bosh.SaveInfo(srcDir,srcName) srcFace = bosh.PCFaces.save_getFace(srcInfo) #--Save Face fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] npc = bosh.PCFaces.mod_addFace(fileInfo,srcFace) #--Save Face picture? imagePath = bosh.modInfos.dir.join('Docs','Images',npc.eid+'.jpg') if not imagePath.exists(): srcInfo.getHeader() width,height,data = srcInfo.header.image image = wx.EmptyImage(width,height) image.SetData(data) imagePath.head.makedirs() image.SaveFile(imagePath.s,wx.BITMAP_TYPE_JPEG) self.window.RefreshUI() balt.showOk(self.window,_('Imported face to: %s') % (npc.eid,),fileName.s)
|
def Execute(self,event): #--Select source face file srcDir = bosh.saveInfos.dir wildcard = _('Fallout3 Files')+' (*.fos;*.for)|*.fos;*.for' #--File dialog srcPath = balt.askOpen(self.window,'Face Source:',srcDir, '', wildcard) if not srcPath: return #--Get face srcDir,srcName = srcPath.headTail srcInfo = bosh.SaveInfo(srcDir,srcName) srcFace = bosh.PCFaces.save_getFace(srcInfo) #--Save Face fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] npc = bosh.PCFaces.mod_addFace(fileInfo,srcFace) #--Save Face picture? imagePath = bosh.modInfos.dir.join('Docs','Images',npc.eid+'.jpg') if not imagePath.exists(): srcInfo.getHeader() width,height,data = srcInfo.header.image image = wx.EmptyImage(width,height) image.SetData(data) imagePath.head.makedirs() image.SaveFile(imagePath.s,wx.BITMAP_TYPE_JPEG) self.window.RefreshUI() balt.showOk(self.window,_('Imported face to: %s') % (npc.eid,),fileName.s)
| 478,734
|
def Execute(self,event): message = _("WARNING! For advanced modders only! Flips esp/esm bit of esp masters to convert them to/from esm state. Useful for building/analyzing esp mastered mods.") if not balt.askContinue(self.window,message,'bash.flipMasters.continue'): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] updated = [fileName] espMasters = [GPath(master) for master in fileInfo.header.masters if bosh.reEspExt.search(master.s)] for masterPath in espMasters: masterInfo = bosh.modInfos.get(masterPath,None) if masterInfo: masterInfo.header.flags1.esm = self.toEsm masterInfo.writeHeader() updated.append(masterPath) self.window.RefreshUI(updated,fileName)
|
def Execute(self,event): message = _("WARNING! For advanced modders only! Flips esp/esm bit of esp masters to convert them to/from esm state. Useful for building/analyzing esp mastered mods.") if not balt.askContinue(self.window,message,'bash.flipMasters.continue'): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] updated = [fileName] espMasters = [GPath(master) for master in fileInfo.header.masters if bosh.reEspExt.search(master.s)] for masterPath in espMasters: masterInfo = bosh.modInfos.get(masterPath,None) if masterInfo: masterInfo.header.flags1.esm = self.toEsm masterInfo.writeHeader() updated.append(masterPath) self.window.RefreshUI(updated,fileName)
| 478,735
|
def Execute(self,event): message = _('WARNING! For advanced modders only!\n\nThis command flips an internal bit in the mod, converting an esp to an esm and vice versa. Note that it is this bit and NOT the file extension that determines the esp/esm state of the mod.') if not balt.askContinue(self.window,message,'bash.flipToEsmp.continue',_('Flip to Esm')): return for item in self.data: fileInfo = bosh.modInfos[item] header = fileInfo.header header.flags1.esm = not header.flags1.esm fileInfo.writeHeader() #--Repopulate self.window.RefreshUI(detail=fileInfo.name)
|
def Execute(self,event): message = _('WARNING! For advanced modders only!\n\nThis command flips an internal bit in the mod, converting an esp to an esm and vice versa. Note that it is this bit and NOT the file extension that determines the esp/esm state of the mod.') if not balt.askContinue(self.window,message,'bash.flipToEsmp.continue',_('Flip to Esm')): return for item in self.data: fileInfo = bosh.modInfos[item] header = fileInfo.header header.flags1.esm = not header.flags1.esm fileInfo.writeHeader() #--Repopulate self.window.RefreshUI(detail=fileInfo.name)
| 478,736
|
def remove(self,item): """Removes group.""" settings.setChanged(self.setKey) self.data.remove(item) #--Edit table entries. colGroup = bosh.modInfos.table.getColumn(self.column) for fileName in colGroup.keys(): if colGroup[fileName] == item: del colGroup[fileName] self.parent.PopulateItems() #--Done return True
|
def remove(self,item): """Removes group.""" settings.setChanged(self.setKey) self.data.remove(item) #--Edit table entries. colGroup = bosh.modInfos.table.getColumn(self.column) for fileName in colGroup.keys(): if colGroup[fileName] == item: del colGroup[fileName] self.parent.PopulateItems() #--Done return True
| 478,737
|
def DoEdit(self,event): """Show label editing dialog.""" data = Mod_LabelsData(self.window,self) dialog = balt.ListEditor(self.window,-1,self.editWindow,data) dialog.ShowModal() dialog.Destroy()
|
def DoEdit(self,event): """Show label editing dialog.""" data = Mod_LabelsData(self.window,self) dialog = balt.ListEditor(self.window,-1,self.editWindow,data) dialog.ShowModal() dialog.Destroy()
| 478,738
|
def AppendToMenu(self,menu,window,data): """Append label list to menu.""" #--For group labels if not settings.get('bash.balo.full'): Mod_Labels.AppendToMenu(self,menu,window,data)
|
def AppendToMenu(self,menu,window,data): """Append label list to menu.""" #--For group labels if not settings.get('bash.balo.full'): Mod_Labels.AppendToMenu(self,menu,window,data)
| 478,739
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = 'My_Groups.csv' textDir = bosh.dirs['patches'] textDir.makedirs() #--File dialog textPath = balt.askSave(self.window,_('Export groups to:'),textDir,textName, '*Groups.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Export modGroups = bosh.ModGroups() modGroups.readFromModInfos(self.data) modGroups.writeToText(textPath) balt.showOk(self.window, _("Exported %d mod/groups.") % (len(modGroups.mod_group),), _("Export Groups"))
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = 'My_Groups.csv' textDir = bosh.dirs['patches'] textDir.makedirs() #--File dialog textPath = balt.askSave(self.window,_('Export groups to:'),textDir,textName, '*Groups.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Export modGroups = bosh.ModGroups() modGroups.readFromModInfos(self.data) modGroups.writeToText(textPath) balt.showOk(self.window, _("Exported %d mod/groups.") % (len(modGroups.mod_group),), _("Export Groups"))
| 478,740
|
def Execute(self,event): message = _("Import groups from a text file. Any mods that are moved into new auto-sorted groups will be immediately reordered.") if not balt.askContinue(self.window,message,'bash.groups.import.continue', _('Import Groups')): return textDir = bosh.dirs['patches'] #--File dialog textPath = balt.askOpen(self.window,_('Import names from:'),textDir, '', '*Groups.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Extension error check if textName.cext != '.csv': balt.showError(self.window,_('Source file must be a csv file.')) return #--Import modGroups = bosh.ModGroups() modGroups.readFromText(textPath) changed = modGroups.writeToModInfos(self.data) bosh.modInfos.refresh() self.window.RefreshUI() balt.showOk(self.window, _("Imported %d mod/groups (%d changed).") % (len(modGroups.mod_group),changed), _("Import Groups"))
|
def Execute(self,event): message = _("Import groups from a text file. Any mods that are moved into new auto-sorted groups will be immediately reordered.") if not balt.askContinue(self.window,message,'bash.groups.import.continue', _('Import Groups')): return textDir = bosh.dirs['patches'] #--File dialog textPath = balt.askOpen(self.window,_('Import names from:'),textDir, '', '*Groups.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Extension error check if textName.cext != '.csv': balt.showError(self.window,_('Source file must be a csv file.')) return #--Import modGroups = bosh.ModGroups() modGroups.readFromText(textPath) changed = modGroups.writeToModInfos(self.data) bosh.modInfos.refresh() self.window.RefreshUI() balt.showOk(self.window, _("Imported %d mod/groups (%d changed).") % (len(modGroups.mod_group),changed), _("Import Groups"))
| 478,741
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Eids.csv') textDir = bosh.dirs['patches'] textDir.makedirs() #--File dialog textPath = balt.askSave(self.window,_('Export eids to:'),textDir,textName, '*Eids.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Export progress = balt.Progress(_("Export Editor Ids")) try: editorIds = bosh.EditorIds() readProgress = SubProgress(progress,0.1,0.8) readProgress.setFull(len(self.data)) for index,fileName in enumerate(map(GPath,self.data)): fileInfo = bosh.modInfos[fileName] readProgress(index,_("Reading %s.") % (fileName.s,)) editorIds.readFromMod(fileInfo) progress(0.8,_("Exporting to %s.") % (textName.s,)) editorIds.writeToText(textPath) progress(1.0,_("Done.")) finally: progress = progress.Destroy()
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Eids.csv') textDir = bosh.dirs['patches'] textDir.makedirs() #--File dialog textPath = balt.askSave(self.window,_('Export eids to:'),textDir,textName, '*Eids.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Export progress = balt.Progress(_("Export Editor Ids")) try: editorIds = bosh.EditorIds() readProgress = SubProgress(progress,0.1,0.8) readProgress.setFull(len(self.data)) for index,fileName in enumerate(map(GPath,self.data)): fileInfo = bosh.modInfos[fileName] readProgress(index,_("Reading %s.") % (fileName.s,)) editorIds.readFromMod(fileInfo) progress(0.8,_("Exporting to %s.") % (textName.s,)) editorIds.writeToText(textPath) progress(1.0,_("Done.")) finally: progress = progress.Destroy()
| 478,742
|
def Execute(self,event): message = (_("Import editor ids from a text file. This will replace existing ids and is not reversible!")) if not balt.askContinue(self.window,message,'bash.editorIds.import.continue', _('Import Editor Ids')): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Eids.csv') textDir = bosh.dirs['patches'] #--File dialog textPath = balt.askOpen(self.window,_('Import names from:'),textDir, textName, '*Eids.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Extension error check if textName.cext != '.csv': balt.showError(self.window,_('Source file must be a csv file.')) return #--Export progress = balt.Progress(_("Import Editor Ids")) changed = None try: editorIds = bosh.EditorIds() progress(0.1,_("Reading %s.") % (textName.s,)) editorIds.readFromText(textPath) progress(0.2,_("Applying to %s.") % (fileName.s,)) changed = editorIds.writeToMod(fileInfo) progress(1.0,_("Done.")) finally: progress = progress.Destroy() #--Log if not changed: balt.showOk(self.window,_("No changes required.")) else: buff = cStringIO.StringIO() format = '%s >> %s\n' for old_new in sorted(changed): buff.write(format % old_new) balt.showLog(self.window,buff.getvalue(),_('Objects Changed'),icons=bashBlue)
|
def Execute(self,event): message = (_("Import editor ids from a text file. This will replace existing ids and is not reversible!")) if not balt.askContinue(self.window,message,'bash.editorIds.import.continue', _('Import Editor Ids')): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Eids.csv') textDir = bosh.dirs['patches'] #--File dialog textPath = balt.askOpen(self.window,_('Import names from:'),textDir, textName, '*Eids.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Extension error check if textName.cext != '.csv': balt.showError(self.window,_('Source file must be a csv file.')) return #--Export progress = balt.Progress(_("Import Editor Ids")) changed = None try: editorIds = bosh.EditorIds() progress(0.1,_("Reading %s.") % (textName.s,)) editorIds.readFromText(textPath) progress(0.2,_("Applying to %s.") % (fileName.s,)) changed = editorIds.writeToMod(fileInfo) progress(1.0,_("Done.")) finally: progress = progress.Destroy() #--Log if not changed: balt.showOk(self.window,_("No changes required.")) else: buff = cStringIO.StringIO() format = '%s >> %s\n' for old_new in sorted(changed): buff.write(format % old_new) balt.showLog(self.window,buff.getvalue(),_('Objects Changed'),icons=bashBlue)
| 478,743
|
def Execute(self,event): message = _("This command will remove the effects of a 'compile all' by removing all scripts whose texts appear to be identical to the version that they override.") if not balt.askContinue(self.window,message,'bash.decompileAll.continue',_('Decompile All')): return for item in self.data: fileName = GPath(item) if item == 'Fallout3.esm': balt.showWarning(self.window,_("Skipping %s") % fileName.s,_('Decompile All')) continue fileInfo = bosh.modInfos[fileName] loadFactory = bosh.LoadFactory(True,bosh.MreScpt) modFile = bosh.ModFile(fileInfo,loadFactory) modFile.load(True) badGenericLore = False removed = [] id_text = {} if modFile.SCPT.getNumRecords(False): loadFactory = bosh.LoadFactory(False,bosh.MreScpt) for master in modFile.tes4.masters: masterFile = bosh.ModFile(bosh.modInfos[master],loadFactory) masterFile.load(True) mapper = masterFile.getLongMapper() for record in masterFile.SCPT.getActiveRecords(): id_text[mapper(record.fid)] = record.scriptText mapper = modFile.getLongMapper() newRecords = [] for record in modFile.SCPT.records: fid = mapper(record.fid) #--Special handling for genericLoreScript if (fid in id_text and record.fid == 0x00025811 and record.compiledSize == 4 and record.lastIndex == 0): removed.append(record.eid) badGenericLore = True elif fid in id_text and id_text[fid] == record.scriptText: removed.append(record.eid) else: newRecords.append(record) modFile.SCPT.records = newRecords modFile.SCPT.setChanged() if len(removed) >= 50 or badGenericLore: modFile.safeSave() balt.showOk(self.window,_("Scripts removed: %d.\nScripts remaining: %d") % (len(removed),len(modFile.SCPT.records)),fileName.s) elif removed: balt.showOk(self.window,_("Only %d scripts were identical. This is probably intentional, so no changes have been made.") % len(removed),fileName.s) else: balt.showOk(self.window,_("No changes required."),fileName.s)
|
def Execute(self,event): message = _("This command will remove the effects of a 'compile all' by removing all scripts whose texts appear to be identical to the version that they override.") if not balt.askContinue(self.window,message,'bash.decompileAll.continue',_('Decompile All')): return for item in self.data: fileName = GPath(item) if item == 'Fallout3.esm': balt.showWarning(self.window,_("Skipping %s") % fileName.s,_('Decompile All')) continue fileInfo = bosh.modInfos[fileName] loadFactory = bosh.LoadFactory(True,bosh.MreScpt) modFile = bosh.ModFile(fileInfo,loadFactory) modFile.load(True) badGenericLore = False removed = [] id_text = {} if modFile.SCPT.getNumRecords(False): loadFactory = bosh.LoadFactory(False,bosh.MreScpt) for master in modFile.tes4.masters: masterFile = bosh.ModFile(bosh.modInfos[master],loadFactory) masterFile.load(True) mapper = masterFile.getLongMapper() for record in masterFile.SCPT.getActiveRecords(): id_text[mapper(record.fid)] = record.scriptText mapper = modFile.getLongMapper() newRecords = [] for record in modFile.SCPT.records: fid = mapper(record.fid) #--Special handling for genericLoreScript if (fid in id_text and record.fid == 0x00025811 and record.compiledSize == 4 and record.lastIndex == 0): removed.append(record.eid) badGenericLore = True elif fid in id_text and id_text[fid] == record.scriptText: removed.append(record.eid) else: newRecords.append(record) modFile.SCPT.records = newRecords modFile.SCPT.setChanged() if len(removed) >= 50 or badGenericLore: modFile.safeSave() balt.showOk(self.window,_("Scripts removed: %d.\nScripts remaining: %d") % (len(removed),len(modFile.SCPT.records)),fileName.s) elif removed: balt.showOk(self.window,_("Only %d scripts were identical. This is probably intentional, so no changes have been made.") % len(removed),fileName.s) else: balt.showOk(self.window,_("No changes required."),fileName.s)
| 478,744
|
def Execute(self,event): message = _("For advanced modders only! Systematically replaces one set of Form Ids with another in npcs, creatures, containers and leveled lists according to a Replacers.csv file.") if not balt.askContinue(self.window,message,'bash.formIds.replace.continue', _('Import Form IDs')): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textDir = bosh.dirs['patches'] #--File dialog textPath = balt.askOpen(self.window,_('Form ID mapper file:'),textDir, '', '*Formids.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Extension error check if textName.cext != '.csv': balt.showError(self.window,_('Source file must be a csv file.')) return #--Export progress = balt.Progress(_("Import Form IDs")) changed = None try: replacer = bosh.FidReplacer() progress(0.1,_("Reading %s.") % (textName.s,)) replacer.readFromText(textPath) progress(0.2,_("Applying to %s.") % (fileName.s,)) changed = replacer.updateMod(fileInfo) progress(1.0,_("Done.")) finally: progress = progress.Destroy() #--Log if not changed: balt.showOk(self.window,_("No changes required.")) else: balt.showLog(self.window,changed,_('Objects Changed'),icons=bashBlue)
|
def Execute(self,event): message = _("For advanced modders only! Systematically replaces one set of Form Ids with another in npcs, creatures, containers and leveled lists according to a Replacers.csv file.") if not balt.askContinue(self.window,message,'bash.formIds.replace.continue', _('Import Form IDs')): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textDir = bosh.dirs['patches'] #--File dialog textPath = balt.askOpen(self.window,_('Form ID mapper file:'),textDir, '', '*Formids.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Extension error check if textName.cext != '.csv': balt.showError(self.window,_('Source file must be a csv file.')) return #--Export progress = balt.Progress(_("Import Form IDs")) changed = None try: replacer = bosh.FidReplacer() progress(0.1,_("Reading %s.") % (textName.s,)) replacer.readFromText(textPath) progress(0.2,_("Applying to %s.") % (fileName.s,)) changed = replacer.updateMod(fileInfo) progress(1.0,_("Done.")) finally: progress = progress.Destroy() #--Log if not changed: balt.showOk(self.window,_("No changes required.")) else: balt.showLog(self.window,changed,_('Objects Changed'),icons=bashBlue)
| 478,745
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Names.csv') textDir = bosh.dirs['patches'] textDir.makedirs() #--File dialog textPath = balt.askSave(self.window,_('Export names to:'), textDir,textName, '*Names.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Export progress = balt.Progress(_("Export Names")) try: fullNames = bosh.FullNames() readProgress = SubProgress(progress,0.1,0.8) readProgress.setFull(len(self.data)) for index,fileName in enumerate(map(GPath,self.data)): fileInfo = bosh.modInfos[fileName] readProgress(index,_("Reading %s.") % (fileName.s,)) fullNames.readFromMod(fileInfo) progress(0.8,_("Exporting to %s.") % (textName.s,)) fullNames.writeToText(textPath) progress(1.0,_("Done.")) finally: progress = progress.Destroy()
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Names.csv') textDir = bosh.dirs['patches'] textDir.makedirs() #--File dialog textPath = balt.askSave(self.window,_('Export names to:'), textDir,textName, '*Names.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Export progress = balt.Progress(_("Export Names")) try: fullNames = bosh.FullNames() readProgress = SubProgress(progress,0.1,0.8) readProgress.setFull(len(self.data)) for index,fileName in enumerate(map(GPath,self.data)): fileInfo = bosh.modInfos[fileName] readProgress(index,_("Reading %s.") % (fileName.s,)) fullNames.readFromMod(fileInfo) progress(0.8,_("Exporting to %s.") % (textName.s,)) fullNames.writeToText(textPath) progress(1.0,_("Done.")) finally: progress = progress.Destroy()
| 478,746
|
def Execute(self,event): message = (_("Import record names from a text file. This will replace existing names and is not reversible!")) if not balt.askContinue(self.window,message,'bash.fullNames.import.continue', _('Import Names')): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Names.csv') textDir = bosh.dirs['patches'] #--File dialog textPath = balt.askOpen(self.window,_('Import names from:'), textDir,textName, 'Mod/Text File|*Names.csv;*.esp;*.esm') if not textPath: return (textDir,textName) = textPath.headTail #--Extension error check ext = textName.cext if ext not in ('.esp','.esm','.csv'): balt.showError(self.window,_('Source file must be mod (.esp or .esm) or csv file.')) return #--Export progress = balt.Progress(_("Import Names")) renamed = None try: fullNames = bosh.FullNames() progress(0.1,_("Reading %s.") % (textName.s,)) if ext == '.csv': fullNames.readFromText(textPath) else: srcInfo = bosh.ModInfo(textDir,textName) fullNames.readFromMod(srcInfo) progress(0.2,_("Applying to %s.") % (fileName.s,)) renamed = fullNames.writeToMod(fileInfo) progress(1.0,_("Done.")) finally: progress = progress.Destroy() #--Log if not renamed: balt.showOk(self.window,_("No changes required.")) else: buff = cStringIO.StringIO() format = '%s: %s >> %s\n' #buff.write(format % (_('Editor Id'),_('Name'))) for eid in sorted(renamed.keys()): full,newFull = renamed[eid] buff.write(format % (eid,full,newFull)) balt.showLog(self.window,buff.getvalue(),_('Objects Renamed'),icons=bashBlue)
|
def Execute(self,event): message = (_("Import record names from a text file. This will replace existing names and is not reversible!")) if not balt.askContinue(self.window,message,'bash.fullNames.import.continue', _('Import Names')): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Names.csv') textDir = bosh.dirs['patches'] #--File dialog textPath = balt.askOpen(self.window,_('Import names from:'), textDir,textName, 'Mod/Text File|*Names.csv;*.esp;*.esm') if not textPath: return (textDir,textName) = textPath.headTail #--Extension error check ext = textName.cext if ext not in ('.esp','.esm','.csv'): balt.showError(self.window,_('Source file must be mod (.esp or .esm) or csv file.')) return #--Export progress = balt.Progress(_("Import Names")) renamed = None try: fullNames = bosh.FullNames() progress(0.1,_("Reading %s.") % (textName.s,)) if ext == '.csv': fullNames.readFromText(textPath) else: srcInfo = bosh.ModInfo(textDir,textName) fullNames.readFromMod(srcInfo) progress(0.2,_("Applying to %s.") % (fileName.s,)) renamed = fullNames.writeToMod(fileInfo) progress(1.0,_("Done.")) finally: progress = progress.Destroy() #--Log if not renamed: balt.showOk(self.window,_("No changes required.")) else: buff = cStringIO.StringIO() format = '%s: %s >> %s\n' #buff.write(format % (_('Editor Id'),_('Name'))) for eid in sorted(renamed.keys()): full,newFull = renamed[eid] buff.write(format % (eid,full,newFull)) balt.showLog(self.window,buff.getvalue(),_('Objects Renamed'),icons=bashBlue)
| 478,747
|
def Execute(self,event): """Handle activation event.""" unfiltered = [x for x in bosh.modInfos.ordered if 'Filter' in bosh.modInfos[x].getBashTags()] message = balt.fill(_("The following mods are tagged 'Filter'. These should be deactivated before building the patch, and then merged into the patch during build.\n*%s\n\nDeactivate the mods now?") % ('\n* '.join(x.s for x in unfiltered),),80) if unfiltered and balt.askYes(self.window,message,_("Deactivate Filter Mods")): for mod in unfiltered: bosh.modInfos.unselect(mod,False) bosh.modInfos.refreshInfoLists() bosh.modInfos.plugins.save() fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] if not bosh.modInfos.ordered: balt.showWarning(self.window,_("That which does not exist cannot be patched.\nLoad some mods and try again."),_("Existential Error")) return patchDialog = PatchDialog(self.window,fileInfo) patchDialog.ShowModal() self.window.RefreshUI(detail=fileName)
|
def Execute(self,event): """Handle activation event.""" unfiltered = [x for x in bosh.modInfos.ordered if 'Filter' in bosh.modInfos[x].getBashTags()] message = balt.fill(_("The following mods are tagged 'Filter'. These should be deactivated before building the patch, and then merged into the patch during build.\n*%s\n\nDeactivate the mods now?") % ('\n* '.join(x.s for x in unfiltered),),80) if unfiltered and balt.askYes(self.window,message,_("Deactivate Filter Mods")): for mod in unfiltered: bosh.modInfos.unselect(mod,False) bosh.modInfos.refreshInfoLists() bosh.modInfos.plugins.save() fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] if not bosh.modInfos.ordered: balt.showWarning(self.window,_("That which does not exist cannot be patched.\nLoad some mods and try again."),_("Existential Error")) return patchDialog = PatchDialog(self.window,fileInfo) patchDialog.ShowModal() self.window.RefreshUI(detail=fileName)
| 478,748
|
def __init__(self): """Initialize.""" self.column = 'rating' self.setKey = 'bash.mods.ratings' self.editMenu = _('Edit Ratings...') self.editWindow = _('Ratings') self.addPrompt = _('Add rating:') self.idList = ID_RATINGS Mod_Labels.__init__(self)
|
def __init__(self): """Initialize.""" self.column = 'rating' self.setKey = 'bash.mods.ratings' self.editMenu = _('Edit Ratings...') self.editWindow = _('Ratings') self.addPrompt = _('Add rating:') self.idList = ID_RATINGS Mod_Labels.__init__(self)
| 478,749
|
def Execute(self,event): message = _("WARNING! For advanced modders only! This feature allows you to edit newer official mods in the TES Construction Set by resetting the internal file version number back to 0.8. While this will make the mod editable, it may also break the mod in some way.") if not balt.askContinue(self.window,message,'bash.setModVersion.continue',_('Set File Version')): return self.fileInfo.header.version = 0.8 self.fileInfo.header.setChanged() self.fileInfo.writeHeader() #--Repopulate self.window.RefreshUI(detail=self.fileInfo.name)
|
def Execute(self,event): message = _("WARNING! For advanced modders only! This feature allows you to edit newer official mods in the TES Construction Set by resetting the internal file version number back to 0.8. While this will make the mod editable, it may also break the mod in some way.") if not balt.askContinue(self.window,message,'bash.setModVersion.continue',_('Set File Version')): return self.fileInfo.header.version = 0.8 self.fileInfo.header.setChanged() self.fileInfo.writeHeader() #--Repopulate self.window.RefreshUI(detail=self.fileInfo.name)
| 478,750
|
def Execute(self,event): modName = GPath(self.data[0]) modInfo = bosh.modInfos[modName] progress = balt.Progress(_(modName.s)) try: modDetails = bosh.ModDetails() modDetails.readFromMod(modInfo,SubProgress(progress,0.1,0.7)) buff = cStringIO.StringIO() progress(0.7,_("Sorting records.")) for group in sorted(modDetails.group_records): buff.write(group+'\n') if group in ('CELL','WRLD','DIAL'): buff.write(_(' (Details not provided for this record type.)\n\n')) continue records = modDetails.group_records[group] records.sort(key = lambda a: a[1].lower()) #if group != 'GMST': records.sort(key = lambda a: a[0] >> 24) for fid,eid in records: buff.write(' %08X %s\n' % (fid,eid)) buff.write('\n') balt.showLog(self.window,buff.getvalue(), modInfo.name.s, asDialog=False, fixedFont=True, icons=bashBlue) progress.Destroy() buff.close() finally: if progress: progress.Destroy()
|
def Execute(self,event): modName = GPath(self.data[0]) modInfo = bosh.modInfos[modName] progress = balt.Progress(_(modName.s)) try: modDetails = bosh.ModDetails() modDetails.readFromMod(modInfo,SubProgress(progress,0.1,0.7)) buff = cStringIO.StringIO() progress(0.7,_("Sorting records.")) for group in sorted(modDetails.group_records): buff.write(group+'\n') if group in ('CELL','WRLD','DIAL'): buff.write(_(' (Details not provided for this record type.)\n\n')) continue records = modDetails.group_records[group] records.sort(key = lambda a: a[1].lower()) #if group != 'GMST': records.sort(key = lambda a: a[0] >> 24) for fid,eid in records: buff.write(' %08X %s\n' % (fid,eid)) buff.write('\n') balt.showLog(self.window,buff.getvalue(), modInfo.name.s, asDialog=False, fixedFont=True, icons=bashBlue) progress.Destroy() buff.close() finally: if progress: progress.Destroy()
| 478,751
|
def Execute(self,event): message = _("In some circumstances, editing a mod will leave orphaned cell records in the world group. This command will remove such orphans.") if not balt.askContinue(self.window,message,'bash.removeWorldOrphans.continue',_('Remove World Orphans')): return for item in self.data: fileName = GPath(item) if item == 'Fallout3.esm': balt.showWarning(self.window,_("Skipping %s") % fileName.s,_('Remove World Orphans')) continue fileInfo = bosh.modInfos[fileName] #--Export progress = balt.Progress(_("Remove World Orphans")) orphans = 0 try: loadFactory = bosh.LoadFactory(True,bosh.MreCell,bosh.MreWrld) modFile = bosh.ModFile(fileInfo,loadFactory) progress(0,_("Reading %s.") % (fileName.s,)) modFile.load(True,SubProgress(progress,0,0.7)) orphans = ('WRLD' in modFile.tops) and modFile.WRLD.orphansSkipped if orphans: progress(0.1,_("Saving %s.") % (fileName.s,)) modFile.safeSave() progress(1.0,_("Done.")) finally: progress = progress.Destroy() #--Log if orphans: balt.showOk(self.window,_("Orphan cell blocks removed: %d.") % (orphans,),fileName.s) else: balt.showOk(self.window,_("No changes required."),fileName.s)
|
def Execute(self,event): message = _("In some circumstances, editing a mod will leave orphaned cell records in the world group. This command will remove such orphans.") if not balt.askContinue(self.window,message,'bash.removeWorldOrphans.continue',_('Remove World Orphans')): return for item in self.data: fileName = GPath(item) if item == 'Fallout3.esm': balt.showWarning(self.window,_("Skipping %s") % fileName.s,_('Remove World Orphans')) continue fileInfo = bosh.modInfos[fileName] #--Export progress = balt.Progress(_("Remove World Orphans")) orphans = 0 try: loadFactory = bosh.LoadFactory(True,bosh.MreCell,bosh.MreWrld) modFile = bosh.ModFile(fileInfo,loadFactory) progress(0,_("Reading %s.") % (fileName.s,)) modFile.load(True,SubProgress(progress,0,0.7)) orphans = ('WRLD' in modFile.tops) and modFile.WRLD.orphansSkipped if orphans: progress(0.1,_("Saving %s.") % (fileName.s,)) modFile.safeSave() progress(1.0,_("Done.")) finally: progress = progress.Destroy() #--Log if orphans: balt.showOk(self.window,_("Orphan cell blocks removed: %d.") % (orphans,),fileName.s) else: balt.showOk(self.window,_("No changes required."),fileName.s)
| 478,752
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] if not docBrowser: DocBrowser().Show() settings['bash.modDocs.show'] = True #balt.ensureDisplayed(docBrowser) docBrowser.SetMod(fileInfo.name) docBrowser.Raise()
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] if not docBrowser: DocBrowser().Show() settings['bash.modDocs.show'] = True #balt.ensureDisplayed(docBrowser) docBrowser.SetMod(fileInfo.name) docBrowser.Raise()
| 478,753
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Stats.csv') textDir = bosh.dirs['patches'] textDir.makedirs() #--File dialog textPath = balt.askSave(self.window,_('Export stats to:'), textDir, textName, '*Stats.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Export progress = balt.Progress(_("Export Stats")) try: itemStats = bosh.ItemStats() readProgress = SubProgress(progress,0.1,0.8) readProgress.setFull(len(self.data)) for index,fileName in enumerate(map(GPath,self.data)): fileInfo = bosh.modInfos[fileName] readProgress(index,_("Reading %s.") % (fileName.s,)) itemStats.readFromMod(fileInfo) progress(0.8,_("Exporting to %s.") % (textName.s,)) itemStats.writeToText(textPath) progress(1.0,_("Done.")) finally: progress = progress.Destroy()
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Stats.csv') textDir = bosh.dirs['patches'] textDir.makedirs() #--File dialog textPath = balt.askSave(self.window,_('Export stats to:'), textDir, textName, '*Stats.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Export progress = balt.Progress(_("Export Stats")) try: itemStats = bosh.ItemStats() readProgress = SubProgress(progress,0.1,0.8) readProgress.setFull(len(self.data)) for index,fileName in enumerate(map(GPath,self.data)): fileInfo = bosh.modInfos[fileName] readProgress(index,_("Reading %s.") % (fileName.s,)) itemStats.readFromMod(fileInfo) progress(0.8,_("Exporting to %s.") % (textName.s,)) itemStats.writeToText(textPath) progress(1.0,_("Done.")) finally: progress = progress.Destroy()
| 478,754
|
def Execute(self,event): message = (_("Import item stats from a text file. This will replace existing stats and is not reversible!")) if not balt.askContinue(self.window,message,'bash.stats.import.continue', _('Import Stats')): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Stats.csv') textDir = bosh.dirs['patches'] #--File dialog textPath = balt.askOpen(self.window,_('Import stats from:'), textDir, textName, '*Stats.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Extension error check ext = textName.cext if ext != '.csv': balt.showError(self.window,_('Source file must be a Stats.csv file.')) return #--Export progress = balt.Progress(_("Import Stats")) changed = None try: itemStats = bosh.ItemStats() progress(0.1,_("Reading %s.") % (textName.s,)) if ext == '.csv': itemStats.readFromText(textPath) else: srcInfo = bosh.ModInfo(textDir,textName) itemStats.readFromMod(srcInfo) progress(0.2,_("Applying to %s.") % (fileName.s,)) changed = itemStats.writeToMod(fileInfo) progress(1.0,_("Done.")) finally: progress = progress.Destroy() #--Log if not changed: balt.showOk(self.window,_("No relevant stats to import."),_("Import Stats")) else: buff = cStringIO.StringIO() for modName in sorted(changed): buff.write('* %03d %s:\n' % (changed[modName], modName.s)) balt.showLog(self.window,buff.getvalue(),_('Import Stats'),icons=bashBlue)
|
def Execute(self,event): message = (_("Import item stats from a text file. This will replace existing stats and is not reversible!")) if not balt.askContinue(self.window,message,'bash.stats.import.continue', _('Import Stats')): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Stats.csv') textDir = bosh.dirs['patches'] #--File dialog textPath = balt.askOpen(self.window,_('Import stats from:'), textDir, textName, '*Stats.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Extension error check ext = textName.cext if ext != '.csv': balt.showError(self.window,_('Source file must be a Stats.csv file.')) return #--Export progress = balt.Progress(_("Import Stats")) changed = None try: itemStats = bosh.ItemStats() progress(0.1,_("Reading %s.") % (textName.s,)) if ext == '.csv': itemStats.readFromText(textPath) else: srcInfo = bosh.ModInfo(textDir,textName) itemStats.readFromMod(srcInfo) progress(0.2,_("Applying to %s.") % (fileName.s,)) changed = itemStats.writeToMod(fileInfo) progress(1.0,_("Done.")) finally: progress = progress.Destroy() #--Log if not changed: balt.showOk(self.window,_("No relevant stats to import."),_("Import Stats")) else: buff = cStringIO.StringIO() for modName in sorted(changed): buff.write('* %03d %s:\n' % (changed[modName], modName.s)) balt.showLog(self.window,buff.getvalue(),_('Import Stats'),icons=bashBlue)
| 478,755
|
def Execute(self,event): message = _("Changes deleted refs to ignored. This is a very advanced feature and should only be used by modders who know exactly what they're doing.") if not balt.askContinue(self.window,message,'bash.undeleteRefs.continue', _('Undelete Refs')): return progress = balt.Progress(_("Undelete Refs")) progress.setFull(len(self.data)) try: hasFixed = False log = bolt.LogFile(cStringIO.StringIO()) for index,fileName in enumerate(map(GPath,self.data)): if fileName == 'Fallout3.esm': balt.showWarning(self.window,_("Skipping %s") % fileName.s,_('Undelete Refs')) continue progress(index,_("Scanning %s.") % (fileName.s,)) fileInfo = bosh.modInfos[fileName] undeleteRefs = bosh.UndeleteRefs(fileInfo) undeleteRefs.undelete(SubProgress(progress,index,index+1)) if undeleteRefs.fixedRefs: hasFixed = True log.setHeader('==%s' % (fileName.s,)) for fid in sorted(undeleteRefs.fixedRefs): log('. %08X' % (fid,)) progress.Destroy() if hasFixed: message = log.out.getvalue() balt.showWryeLog(self.window,message,_('Undelete Refs'),icons=bashBlue) else: message = _("No changes required.") balt.showOk(self.window,message,_('Undelete Refs')) finally: progress = progress.Destroy()
|
def Execute(self,event): message = _("Changes deleted refs to ignored. This is a very advanced feature and should only be used by modders who know exactly what they're doing.") if not balt.askContinue(self.window,message,'bash.undeleteRefs.continue', _('Undelete Refs')): return progress = balt.Progress(_("Undelete Refs")) progress.setFull(len(self.data)) try: hasFixed = False log = bolt.LogFile(cStringIO.StringIO()) for index,fileName in enumerate(map(GPath,self.data)): if fileName == 'Fallout3.esm': balt.showWarning(self.window,_("Skipping %s") % fileName.s,_('Undelete Refs')) continue progress(index,_("Scanning %s.") % (fileName.s,)) fileInfo = bosh.modInfos[fileName] undeleteRefs = bosh.UndeleteRefs(fileInfo) undeleteRefs.undelete(SubProgress(progress,index,index+1)) if undeleteRefs.fixedRefs: hasFixed = True log.setHeader('==%s' % (fileName.s,)) for fid in sorted(undeleteRefs.fixedRefs): log('. %08X' % (fid,)) progress.Destroy() if hasFixed: message = log.out.getvalue() balt.showWryeLog(self.window,message,_('Undelete Refs'),icons=bashBlue) else: message = _("No changes required.") balt.showOk(self.window,message,_('Undelete Refs')) finally: progress = progress.Destroy()
| 478,756
|
def remove(self,profile): """Removes load list.""" profileSaves = 'Saves\\'+profile+'\\' #--Can't remove active or Default directory. if bosh.saveInfos.localSave == profileSaves: balt.showError(self.parent,_('Active profile cannot be removed.')) return False #--Get file count. If > zero, verify with user. profileDir = bosh.dirs['saveBase'].join(profileSaves) files = [file for file in profileDir.list() if bosh.reSaveExt.search(file.s)] if files: message = _('Delete profile %s and the %d save files it contains?') % (profile,len(files)) if not balt.askYes(self.parent,message,_('Delete Profile')): return False #--Remove directory if GPath('Fallout3/Saves').s not in profileDir.s: raise BoltError(_('Sanity check failed: No "Fallout3\\Saves" in %s.') % (profileDir.s,)) shutil.rmtree(profileDir.s) #--DO NOT SCREW THIS UP!!! bosh.saveInfos.profiles.delRow(profileSaves) return True
|
def remove(self,profile): """Removes load list.""" profileSaves = 'Saves\\'+profile+'\\' #--Can't remove active or Default directory. if bosh.saveInfos.localSave == profileSaves: balt.showError(self.parent,_('Active profile cannot be removed.')) return False #--Get file count. If > zero, verify with user. profileDir = bosh.dirs['saveBase'].join(profileSaves) files = [file for file in profileDir.list() if bosh.reSaveExt.search(file.s)] if files: message = _('Delete profile %s and the %d save files it contains?') % (profile,len(files)) if not balt.askYes(self.parent,message,_('Delete Profile')): return False #--Remove directory if GPath('Fallout3/Saves').s not in profileDir.s: raise BoltError(_('Sanity check failed: No "Fallout3\\Saves" in %s.') % (profileDir.s,)) shutil.rmtree(profileDir.s) #--DO NOT SCREW THIS UP!!! bosh.saveInfos.profiles.delRow(profileSaves) return True
| 478,757
|
def swapFallout3Version(self,newSaves): """Swaps Fallout3 version to memorized version.""" voNew = bosh.saveInfos.profiles.setItemDefault(newSaves,'vFallout3',bosh.modInfos.voCurrent) if voNew in bosh.modInfos.voAvailable: bosh.modInfos.setFallout3Version(voNew)
|
def swapFallout3Version(self,newSaves): """Swaps Fallout3 version to memorized version.""" voNew = bosh.saveInfos.profiles.setItemDefault(newSaves,'vFallout3',bosh.modInfos.voCurrent) if voNew in bosh.modInfos.voAvailable: bosh.modInfos.setFallout3Version(voNew)
| 478,758
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] errorMessage = bosh.modInfos.selectExact(fileInfo.masterNames) modList.PopulateItems() saveList.PopulateItems() self.window.details.SetFile(fileName) if errorMessage: balt.showError(self.window,errorMessage,fileName.s)
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] errorMessage = bosh.modInfos.selectExact(fileInfo.masterNames) modList.PopulateItems() saveList.PopulateItems() self.window.details.SetFile(fileName) if errorMessage: balt.showError(self.window,errorMessage,fileName.s)
| 478,759
|
def FromMod(self,fileInfo,srcPath): """Import from a mod.""" #--Get faces srcDir,srcName = GPath(srcPath).headTail srcInfo = bosh.ModInfo(srcDir,srcName) srcFaces = bosh.PCFaces.mod_getFaces(srcInfo) #--No faces to import? if not srcFaces: balt.showOk(self.window,_('No player (PC) faces found in %s.') % (srcName.s,),srcName.s) return #--Dialog dialog = ImportFaceDialog(self.window,-1,srcName.s,fileInfo,srcFaces) dialog.ShowModal() dialog.Destroy()
|
def FromMod(self,fileInfo,srcPath): """Import from a mod.""" #--Get faces srcDir,srcName = GPath(srcPath).headTail srcInfo = bosh.ModInfo(srcDir,srcName) srcFaces = bosh.PCFaces.mod_getFaces(srcInfo) #--No faces to import? if not srcFaces: balt.showOk(self.window,_('No player (PC) faces found in %s.') % (srcName.s,),srcName.s) return #--Dialog dialog = ImportFaceDialog(self.window,-1,srcName.s,fileInfo,srcFaces) dialog.ShowModal() dialog.Destroy()
| 478,760
|
def Execute(self,event): oldNew = map(GPath,self.data) oldNew.sort(key = lambda x: bosh.saveInfos.dir.join(x).mtime) oldName = oldNew[0] oldInfo = self.window.data[GPath(oldName)] oldMasters = set(oldInfo.masterNames) if len(self.data) == 1: newName = GPath(_("Active Masters")) newMasters = set(bosh.modInfos.ordered) else: newName = oldNew[1] newInfo = self.window.data[GPath(newName)] newMasters = set(newInfo.masterNames) missing = oldMasters - newMasters extra = newMasters - oldMasters if not missing and not extra: message = _("Masters are the same.") balt.showInfo(self.window,message,_("Diff Masters")) else: message = '' if missing: message += _("=== Removed Masters (%s):\n* ") % (oldName.s,) message += '\n* '.join(x.s for x in bosh.modInfos.getOrdered(missing)) if extra: message += '\n\n' if extra: message += _("=== Added Masters (%s):\n* ") % (newName.s,) message += '\n* '.join(x.s for x in bosh.modInfos.getOrdered(extra)) balt.showWryeLog(self.window,message,_("Diff Masters"))
|
def Execute(self,event): oldNew = map(GPath,self.data) oldNew.sort(key = lambda x: bosh.saveInfos.dir.join(x).mtime) oldName = oldNew[0] oldInfo = self.window.data[GPath(oldName)] oldMasters = set(oldInfo.masterNames) if len(self.data) == 1: newName = GPath(_("Active Masters")) newMasters = set(bosh.modInfos.ordered) else: newName = oldNew[1] newInfo = self.window.data[GPath(newName)] newMasters = set(newInfo.masterNames) missing = oldMasters - newMasters extra = newMasters - oldMasters if not missing and not extra: message = _("Masters are the same.") balt.showInfo(self.window,message,_("Diff Masters")) else: message = '' if missing: message += _("=== Removed Masters (%s):\n* ") % (oldName.s,) message += '\n* '.join(x.s for x in bosh.modInfos.getOrdered(missing)) if extra: message += '\n\n' if extra: message += _("=== Added Masters (%s):\n* ") % (newName.s,) message += '\n* '.join(x.s for x in bosh.modInfos.getOrdered(extra)) balt.showWryeLog(self.window,message,_("Diff Masters"))
| 478,761
|
def save(self): """Handles save button.""" if not self.changed: balt.showOk(self.parent,_("No changes made.")) else: self.changed = False #--Allows graceful effort if close fails. count = 0 for newName,(oldName,records) in self.data.items(): if newName == oldName: continue for record in records: record.full = newName record.setChanged() record.getSize() count += 1 self.saveFile.safeSave() balt.showOk(self.parent, _("Names modified: %d.") % (count,),self.saveFile.fileInfo.name.s)
|
def save(self): """Handles save button.""" if not self.changed: balt.showOk(self.parent,_("No changes made.")) else: self.changed = False #--Allows graceful effort if close fails. count = 0 for newName,(oldName,records) in self.data.items(): if newName == oldName: continue for record in records: record.full = newName record.setChanged() record.getSize() count += 1 self.saveFile.safeSave() balt.showOk(self.parent, _("Names modified: %d.") % (count,),self.saveFile.fileInfo.name.s)
| 478,762
|
def Execute(self,event): """Handle menu selection.""" #--Get save info for file fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] #--Get SaveFile progress = balt.Progress(_("Loading...")) try: saveFile = bosh.SaveFile(fileInfo) saveFile.load(progress) finally: if progress: progress.Destroy() #--No custom items? recordTypes = Save_EditCreated.recordTypes.get(self.type,(self.type,)) records = [record for record in saveFile.created if record.recType in recordTypes] if not records: balt.showOk(self.window,_('No items to edit.')) return #--Open editor dialog data = Save_EditCreatedData(self.window,saveFile,recordTypes) dialog = balt.ListEditor(self.window,-1,self.menuName,data) dialog.ShowModal() dialog.Destroy()
|
def Execute(self,event): """Handle menu selection.""" #--Get save info for file fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] #--Get SaveFile progress = balt.Progress(_("Loading...")) try: saveFile = bosh.SaveFile(fileInfo) saveFile.load(progress) finally: if progress: progress.Destroy() #--No custom items? recordTypes = Save_EditCreated.recordTypes.get(self.type,(self.type,)) records = [record for record in saveFile.created if record.recType in recordTypes] if not records: balt.showOk(self.window,_('No items to edit.')) return #--Open editor dialog data = Save_EditCreatedData(self.window,saveFile,recordTypes) dialog = balt.ListEditor(self.window,-1,self.menuName,data) dialog.ShowModal() dialog.Destroy()
| 478,763
|
def save(self): """Handles save button click.""" self.saveSpells.removePlayerSpells(self.removed)
|
def save(self): """Handles save button click.""" self.saveSpells.removePlayerSpells(self.removed)
| 478,764
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] data = Save_EditPCSpellsData(self.window,fileInfo) dialog = balt.ListEditor(self.window,-1,_('Player Spells'),data) dialog.ShowModal() dialog.Destroy()
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] data = Save_EditPCSpellsData(self.window,fileInfo) dialog = balt.ListEditor(self.window,-1,_('Player Spells'),data) dialog.ShowModal() dialog.Destroy()
| 478,765
|
def MoveFiles(self,profile): fileInfos = self.window.data destDir = bosh.dirs['saveBase'].join('Saves') if profile != _('Default'): destDir = destDir.join(profile) if destDir == fileInfos.dir: balt.showError(self.window,_("You can't move saves to the current profile!")) return savesTable = bosh.saveInfos.table #--bashDir destTable = bolt.Table(bosh.PickleDict(destDir.join('Bash','Table.dat'))) count = 0 for fileName in self.data: if not self.window.data.moveIsSafe(fileName,destDir): message = (_('A file named %s already exists in %s. Overwrite it?') % (fileName.s,profile)) if not balt.askYes(self.window,message,_('Move File')): continue if self.copyMode: bosh.saveInfos.copy(fileName,destDir) else: bosh.saveInfos.move(fileName,destDir,False) if fileName in savesTable: destTable[fileName] = savesTable.pop(fileName) count += 1 destTable.save() bashFrame.RefreshData() if self.copyMode: balt.showInfo(self.window,_('%d files copied to %s.') % (count,profile),_('Copy File'))
|
def MoveFiles(self,profile): fileInfos = self.window.data destDir = bosh.dirs['saveBase'].join('Saves') if profile != _('Default'): destDir = destDir.join(profile) if destDir == fileInfos.dir: balt.showError(self.window,_("You can't move saves to the current profile!")) return savesTable = bosh.saveInfos.table #--bashDir destTable = bolt.Table(bosh.PickleDict(destDir.join('Bash','Table.dat'))) count = 0 for fileName in self.data: if not self.window.data.moveIsSafe(fileName,destDir): message = (_('A file named %s already exists in %s. Overwrite it?') % (fileName.s,profile)) if not balt.askYes(self.window,message,_('Move File')): continue if self.copyMode: bosh.saveInfos.copy(fileName,destDir) else: bosh.saveInfos.move(fileName,destDir,False) if fileName in savesTable: destTable[fileName] = savesTable.pop(fileName) count += 1 destTable.save() bashFrame.RefreshData() if self.copyMode: balt.showInfo(self.window,_('%d files copied to %s.') % (count,profile),_('Copy File'))
| 478,766
|
def Execute(self,event): #--File Info fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] #--Check current value saveFile = bosh.SaveFile(fileInfo) saveFile.load() (tcSize,abombCounter,abombFloat) = saveFile.getAbomb() #--Continue? progress = 100*abombFloat/struct.unpack('f',struct.pack('I',0x49000000))[0] newCounter = 0x41000000 if abombCounter <= newCounter: balt.showOk(self.window,_('Abomb counter is too low to reset.'),_('Repair Abomb')) return message = _("Reset Abomb counter? (Current progress: %.0f%%.)\n\nNote: Abomb animation slowing won't occur until progress is near 100%%.") % (progress,) if balt.askYes(self.window,message,_('Repair Abomb'),default=False): saveFile.setAbomb(newCounter) saveFile.safeSave() balt.showOk(self.window,_('Abomb counter reset.'),_('Repair Abomb'))
|
def Execute(self,event): #--File Info fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] #--Check current value saveFile = bosh.SaveFile(fileInfo) saveFile.load() (tcSize,abombCounter,abombFloat) = saveFile.getAbomb() #--Continue? progress = 100*abombFloat/struct.unpack('f',struct.pack('I',0x49000000))[0] newCounter = 0x41000000 if abombCounter <= newCounter: balt.showOk(self.window,_('Abomb counter is too low to reset.'),_('Repair Abomb')) return message = _("Reset Abomb counter? (Current progress: %.0f%%.)\n\nNote: Abomb animation slowing won't occur until progress is near 100%%.") % (progress,) if balt.askYes(self.window,message,_('Repair Abomb'),default=False): saveFile.setAbomb(newCounter) saveFile.safeSave() balt.showOk(self.window,_('Abomb counter reset.'),_('Repair Abomb'))
| 478,767
|
def Execute(self,event): debug = False message = _('This will (mostly) repair faction membership errors due to Wrye Bash v 105 bug and/or faction changes in underlying mods.\n\nWARNING! This repair is NOT perfect! Do not use it unless you have to!') if not balt.askContinue(self.window,message,'bash.repairFactions.continue',_('Update NPC Levels')): return question = _("Restore dropped factions too? WARNING: This may involve clicking through a LOT of yes/no dialogs.") restoreDropped = balt.askYes(self.window, question, _('Repair Factions'),default=False) progress = balt.Progress(_('Repair Factions')) legitNullSpells = bush.repairFactions_legitNullSpells legitNullFactions = bush.repairFactions_legitNullFactions legitDroppedFactions = bush.repairFactions_legitDroppedFactions try: #--Loop over active mods log = bolt.LogFile(cStringIO.StringIO()) offsetFlag = 0x80 npc_info = {} fact_eid = {} loadFactory = bosh.LoadFactory(False,bosh.MreNpc,bosh.MreFact) ordered = list(bosh.modInfos.ordered) subProgress = SubProgress(progress,0,0.4,len(ordered)) for index,modName in enumerate(ordered): subProgress(index,_("Scanning ") + modName.s) modInfo = bosh.modInfos[modName] modFile = bosh.ModFile(modInfo,loadFactory) modFile.load(True) #--Loop over mod NPCs mapToOrdered = bosh.MasterMap(modFile.tes4.masters+[modName], ordered) for npc in modFile.NPC_.getActiveRecords(): fid = mapToOrdered(npc.fid,None) if not fid: continue factions = [] for entry in npc.factions: faction = mapToOrdered(entry.faction,None) if not faction: continue factions.append((faction,entry.rank)) npc_info[fid] = (npc.eid,factions) #--Loop over mod factions for fact in modFile.FACT.getActiveRecords(): fid = mapToOrdered(fact.fid,None) if not fid: continue fact_eid[fid] = fact.eid #--Loop over savefiles subProgress = SubProgress(progress,0.4,1.0,len(self.data)) message = _("NPC Factions Restored/UnNulled:") for index,saveName in enumerate(self.data): log.setHeader('== '+saveName.s,True) subProgress(index,_("Updating ") + saveName.s) saveInfo = self.window.data[saveName] saveFile = bosh.SaveFile(saveInfo) saveFile.load() records = saveFile.records mapToOrdered = bosh.MasterMap(saveFile.masters, ordered) mapToSave = bosh.MasterMap(ordered,saveFile.masters) refactionedCount = unNulledCount = 0 for recNum in xrange(len(records)): unFactioned = unSpelled = unModified = refactioned = False (recId,recType,recFlags,version,data) = records[recNum] if recType != 35: continue orderedRecId = mapToOrdered(recId,None) eid = npc_info.get(orderedRecId,('',))[0] npc = bosh.SreNPC(recFlags,data) recFlags = bosh.SreNPC.flags(recFlags) #--Fix Bash v 105 null array bugs if recFlags.factions and not npc.factions and recId not in legitNullFactions: log('. %08X %s -- Factions' % (recId,eid)) npc.factions = None unFactioned = True if recFlags.modifiers and not npc.modifiers: log('. %08X %s -- Modifiers' % (recId,eid)) npc.modifiers = None unModified = True if recFlags.spells and not npc.spells and recId not in legitNullSpells: log('. %08X %s -- Spells' % (recId,eid)) npc.spells = None unSpelled = True unNulled = (unFactioned or unSpelled or unModified) unNulledCount += (0,1)[unNulled] #--Player, player faction if recId == 7: playerStartSpell = saveFile.getIref(0x00000136) if npc.spells != None and playerStartSpell not in npc.spells: log('. %08X %s -- **DefaultPlayerSpell**' % (recId,eid)) npc.spells.append(playerStartSpell) refactioned = True #--I'm lying, but... close enough. playerFactionIref = saveFile.getIref(0x0001dbcd) if (npc.factions != None and playerFactionIref not in [iref for iref,level in npc.factions] ): log('. %08X %s -- **PlayerFaction, 0**' % (recId,eid)) npc.factions.append((playerFactionIref,0)) refactioned = True #--Compare to mod data elif orderedRecId in npc_info and restoreDropped: (npcEid,factions) = npc_info[orderedRecId] #--Refaction? if npc.factions and factions: curFactions = set([iref for iref,level in npc.factions]) for orderedId,level in factions: fid = mapToSave(orderedId,None) if not fid: continue iref = saveFile.getIref(fid) if iref not in curFactions and (recId,fid) not in legitDroppedFactions: factEid = fact_eid.get(orderedId,'------') question = _('Restore %s to %s faction?') % (npcEid,factEid) if debug: print 'refactioned %08X %08X %s %s' % (recId,fid,npcEid,factEid) elif not balt.askYes(self.window, question, saveName.s,default=False): continue log('. %08X %s -- **%s, %d**' % (recId,eid,factEid,level)) npc.factions.append((iref,level)) refactioned = True refactionedCount += (0,1)[refactioned] #--Save record changes? if unNulled or refactioned: saveFile.records[recNum] = (recId,recType,npc.getFlags(),version,npc.getData()) #--Save changes? subProgress(index+0.5,_("Updating ") + saveName.s) if unNulledCount or refactionedCount: saveFile.safeSave() message += '\n%d %d %s' % (refactionedCount,unNulledCount,saveName.s,) progress.Destroy() #balt.showOk(self.window,message,_('Repair Factions')) message = log.out.getvalue() balt.showWryeLog(self.window,message,_('Repair Factions'),icons=bashBlue) finally: if progress: progress.Destroy()
|
def Execute(self,event): debug = False message = _('This will (mostly) repair faction membership errors due to Wrye Bash v 105 bug and/or faction changes in underlying mods.\n\nWARNING! This repair is NOT perfect! Do not use it unless you have to!') if not balt.askContinue(self.window,message,'bash.repairFactions.continue',_('Update NPC Levels')): return question = _("Restore dropped factions too? WARNING: This may involve clicking through a LOT of yes/no dialogs.") restoreDropped = balt.askYes(self.window, question, _('Repair Factions'),default=False) progress = balt.Progress(_('Repair Factions')) legitNullSpells = bush.repairFactions_legitNullSpells legitNullFactions = bush.repairFactions_legitNullFactions legitDroppedFactions = bush.repairFactions_legitDroppedFactions try: #--Loop over active mods log = bolt.LogFile(cStringIO.StringIO()) offsetFlag = 0x80 npc_info = {} fact_eid = {} loadFactory = bosh.LoadFactory(False,bosh.MreNpc,bosh.MreFact) ordered = list(bosh.modInfos.ordered) subProgress = SubProgress(progress,0,0.4,len(ordered)) for index,modName in enumerate(ordered): subProgress(index,_("Scanning ") + modName.s) modInfo = bosh.modInfos[modName] modFile = bosh.ModFile(modInfo,loadFactory) modFile.load(True) #--Loop over mod NPCs mapToOrdered = bosh.MasterMap(modFile.tes4.masters+[modName], ordered) for npc in modFile.NPC_.getActiveRecords(): fid = mapToOrdered(npc.fid,None) if not fid: continue factions = [] for entry in npc.factions: faction = mapToOrdered(entry.faction,None) if not faction: continue factions.append((faction,entry.rank)) npc_info[fid] = (npc.eid,factions) #--Loop over mod factions for fact in modFile.FACT.getActiveRecords(): fid = mapToOrdered(fact.fid,None) if not fid: continue fact_eid[fid] = fact.eid #--Loop over savefiles subProgress = SubProgress(progress,0.4,1.0,len(self.data)) message = _("NPC Factions Restored/UnNulled:") for index,saveName in enumerate(self.data): log.setHeader('== '+saveName.s,True) subProgress(index,_("Updating ") + saveName.s) saveInfo = self.window.data[saveName] saveFile = bosh.SaveFile(saveInfo) saveFile.load() records = saveFile.records mapToOrdered = bosh.MasterMap(saveFile.masters, ordered) mapToSave = bosh.MasterMap(ordered,saveFile.masters) refactionedCount = unNulledCount = 0 for recNum in xrange(len(records)): unFactioned = unSpelled = unModified = refactioned = False (recId,recType,recFlags,version,data) = records[recNum] if recType != 35: continue orderedRecId = mapToOrdered(recId,None) eid = npc_info.get(orderedRecId,('',))[0] npc = bosh.SreNPC(recFlags,data) recFlags = bosh.SreNPC.flags(recFlags) #--Fix Bash v 105 null array bugs if recFlags.factions and not npc.factions and recId not in legitNullFactions: log('. %08X %s -- Factions' % (recId,eid)) npc.factions = None unFactioned = True if recFlags.modifiers and not npc.modifiers: log('. %08X %s -- Modifiers' % (recId,eid)) npc.modifiers = None unModified = True if recFlags.spells and not npc.spells and recId not in legitNullSpells: log('. %08X %s -- Spells' % (recId,eid)) npc.spells = None unSpelled = True unNulled = (unFactioned or unSpelled or unModified) unNulledCount += (0,1)[unNulled] #--Player, player faction if recId == 7: playerStartSpell = saveFile.getIref(0x00000136) if npc.spells != None and playerStartSpell not in npc.spells: log('. %08X %s -- **DefaultPlayerSpell**' % (recId,eid)) npc.spells.append(playerStartSpell) refactioned = True #--I'm lying, but... close enough. playerFactionIref = saveFile.getIref(0x0001dbcd) if (npc.factions != None and playerFactionIref not in [iref for iref,level in npc.factions] ): log('. %08X %s -- **PlayerFaction, 0**' % (recId,eid)) npc.factions.append((playerFactionIref,0)) refactioned = True #--Compare to mod data elif orderedRecId in npc_info and restoreDropped: (npcEid,factions) = npc_info[orderedRecId] #--Refaction? if npc.factions and factions: curFactions = set([iref for iref,level in npc.factions]) for orderedId,level in factions: fid = mapToSave(orderedId,None) if not fid: continue iref = saveFile.getIref(fid) if iref not in curFactions and (recId,fid) not in legitDroppedFactions: factEid = fact_eid.get(orderedId,'------') question = _('Restore %s to %s faction?') % (npcEid,factEid) if debug: print 'refactioned %08X %08X %s %s' % (recId,fid,npcEid,factEid) elif not balt.askYes(self.window, question, saveName.s,default=False): continue log('. %08X %s -- **%s, %d**' % (recId,eid,factEid,level)) npc.factions.append((iref,level)) refactioned = True refactionedCount += (0,1)[refactioned] #--Save record changes? if unNulled or refactioned: saveFile.records[recNum] = (recId,recType,npc.getFlags(),version,npc.getData()) #--Save changes? subProgress(index+0.5,_("Updating ") + saveName.s) if unNulledCount or refactionedCount: saveFile.safeSave() message += '\n%d %d %s' % (refactionedCount,unNulledCount,saveName.s,) progress.Destroy() #balt.showOk(self.window,message,_('Repair Factions')) message = log.out.getvalue() balt.showWryeLog(self.window,message,_('Repair Factions'),icons=bashBlue) finally: if progress: progress.Destroy()
| 478,768
|
def Execute(self,event): #--File Info fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] if bosh.PCFaces.save_repairHair(fileInfo): balt.showOk(self.window,_('Hair repaired.')) else: balt.showOk(self.window,_('No repair necessary.'),fileName.s)
|
def Execute(self,event): #--File Info fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] if bosh.PCFaces.save_repairHair(fileInfo): balt.showOk(self.window,_('Hair repaired.')) else: balt.showOk(self.window,_('No repair necessary.'),fileName.s)
| 478,769
|
def Execute(self,event): #--Query value result = balt.askText(self.window, _("Set weight of all player potions to..."), _("Reweigh Potions"), '%0.2f' % (settings.get('bash.reweighPotions.newWeight',0.2),)) if not result: return newWeight = float(result.strip()) if newWeight < 0 or newWeight > 100: balt.showOk(self.window,_('Invalid weight: %f') % (newWeight,)) return settings['bash.reweighPotions.newWeight'] = newWeight #--Do it fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] progress = balt.Progress(_("Reweigh Potions")) try: saveFile = bosh.SaveFile(fileInfo) saveFile.load(SubProgress(progress,0,0.5)) count = 0 progress(0.5,_("Processing.")) for index,record in enumerate(saveFile.created): if record.recType == 'ALCH': record = record.getTypeCopy() record.weight = newWeight record.getSize() saveFile.created[index] = record count += 1 if count: saveFile.safeSave(SubProgress(progress,0.6,1.0)) progress.Destroy() balt.showOk(self.window,_('Potions reweighed: %d.') % (count,),fileName.s) else: progress.Destroy() balt.showOk(self.window,_('No potions to reweigh!'),fileName.s) finally: if progress: progress.Destroy()
|
def Execute(self,event): #--Query value result = balt.askText(self.window, _("Set weight of all player potions to..."), _("Reweigh Potions"), '%0.2f' % (settings.get('bash.reweighPotions.newWeight',0.2),)) if not result: return newWeight = float(result.strip()) if newWeight < 0 or newWeight > 100: balt.showOk(self.window,_('Invalid weight: %f') % (newWeight,)) return settings['bash.reweighPotions.newWeight'] = newWeight #--Do it fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] progress = balt.Progress(_("Reweigh Potions")) try: saveFile = bosh.SaveFile(fileInfo) saveFile.load(SubProgress(progress,0,0.5)) count = 0 progress(0.5,_("Processing.")) for index,record in enumerate(saveFile.created): if record.recType == 'ALCH': record = record.getTypeCopy() record.weight = newWeight record.getSize() saveFile.created[index] = record count += 1 if count: saveFile.safeSave(SubProgress(progress,0.6,1.0)) progress.Destroy() balt.showOk(self.window,_('Potions reweighed: %d.') % (count,),fileName.s) else: progress.Destroy() balt.showOk(self.window,_('No potions to reweigh!'),fileName.s) finally: if progress: progress.Destroy()
| 478,770
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] saveFile = bosh.SaveFile(fileInfo) progress = balt.Progress(_("Statistics")) try: saveFile.load(SubProgress(progress,0,0.9)) log = bolt.LogFile(cStringIO.StringIO()) progress(0.9,_("Calculating statistics.")) saveFile.logStats(log) progress.Destroy() text = log.out.getvalue() balt.showLog(self.window,text,fileName.s,asDialog=False,fixedFont=False,icons=bashBlue) finally: progress.Destroy()
|
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] saveFile = bosh.SaveFile(fileInfo) progress = balt.Progress(_("Statistics")) try: saveFile.load(SubProgress(progress,0,0.9)) log = bolt.LogFile(cStringIO.StringIO()) progress(0.9,_("Calculating statistics.")) saveFile.logStats(log) progress.Destroy() text = log.out.getvalue() balt.showLog(self.window,text,fileName.s,asDialog=False,fixedFont=False,icons=bashBlue) finally: progress.Destroy()
| 478,771
|
def Execute(self,event): #--File Info saveName = GPath(self.data[0]) saveInfo = self.window.data[saveName] progress = balt.Progress(_("Scanning for Bloat")) delObjRefs = 0 try: #--Scan and report saveFile = bosh.SaveFile(saveInfo) saveFile.load(SubProgress(progress,0,0.8)) createdCounts,nullRefCount = saveFile.findBloating(SubProgress(progress,0.8,1.0)) progress.Destroy() #--Dialog if not createdCounts and not nullRefCount: balt.showOk(self.window,_("No bloating found."),saveName.s) return message = '' if createdCounts: #message += _('Excess Created Objects\n') for type,name in sorted(createdCounts): message += ' %s %s: %s\n' % (type,name,formatInteger(createdCounts[(type,name)])) if nullRefCount: message += _(' Null Ref Objects: %s\n') % (formatInteger(nullRefCount),) message = _("Remove savegame bloating?\n%s\nWARNING: This is a risky procedure that may corrupt your savegame! Use only if necessary!") % (message,) if not balt.askYes(self.window,message,_("Remove bloating?")): return #--Remove bloating progress = balt.Progress(_("Removing Bloat")) nums = saveFile.removeBloating(createdCounts.keys(),True,SubProgress(progress,0,0.9)) progress(0.9,_("Saving...")) saveFile.safeSave() progress.Destroy() balt.showOk(self.window, _("Uncreated Objects: %d\nUncreated Refs: %d\nUnNulled Refs: %d") % nums, saveName.s) self.window.RefreshUI(saveName) finally: progress.Destroy()
|
def Execute(self,event): #--File Info saveName = GPath(self.data[0]) saveInfo = self.window.data[saveName] progress = balt.Progress(_("Scanning for Bloat")) delObjRefs = 0 try: #--Scan and report saveFile = bosh.SaveFile(saveInfo) saveFile.load(SubProgress(progress,0,0.8)) createdCounts,nullRefCount = saveFile.findBloating(SubProgress(progress,0.8,1.0)) progress.Destroy() #--Dialog if not createdCounts and not nullRefCount: balt.showOk(self.window,_("No bloating found."),saveName.s) return message = '' if createdCounts: #message += _('Excess Created Objects\n') for type,name in sorted(createdCounts): message += ' %s %s: %s\n' % (type,name,formatInteger(createdCounts[(type,name)])) if nullRefCount: message += _(' Null Ref Objects: %s\n') % (formatInteger(nullRefCount),) message = _("Remove savegame bloating?\n%s\nWARNING: This is a risky procedure that may corrupt your savegame! Use only if necessary!") % (message,) if not balt.askYes(self.window,message,_("Remove bloating?")): return #--Remove bloating progress = balt.Progress(_("Removing Bloat")) nums = saveFile.removeBloating(createdCounts.keys(),True,SubProgress(progress,0,0.9)) progress(0.9,_("Saving...")) saveFile.safeSave() progress.Destroy() balt.showOk(self.window, _("Uncreated Objects: %d\nUncreated Refs: %d\nUnNulled Refs: %d") % nums, saveName.s) self.window.RefreshUI(saveName) finally: progress.Destroy()
| 478,772
|
def Execute(self,event): debug = True message = _('This will relevel the NPCs in the selected save game(s) according to the npc levels in the currently active mods. This supercedes the older "Import NPC Levels" command.') if not balt.askContinue(self.window,message,'bash.updateNpcLevels.continue',_('Update NPC Levels')): return progress = balt.Progress(_('Update NPC Levels')) try: #--Loop over active mods offsetFlag = 0x80 npc_info = {} loadFactory = bosh.LoadFactory(False,bosh.MreNpc) ordered = list(bosh.modInfos.ordered) subProgress = SubProgress(progress,0,0.4,len(ordered)) modErrors = [] for index,modName in enumerate(ordered): subProgress(index,_("Scanning ") + modName.s) modInfo = bosh.modInfos[modName] modFile = bosh.ModFile(modInfo,loadFactory) try: modFile.load(True) except bosh.ModError, x: modErrors.append(str(x)) continue if 'NPC_' not in modFile.tops: continue #--Loop over mod NPCs mapToOrdered = bosh.MasterMap(modFile.tes4.masters+[modName], ordered) for npc in modFile.NPC_.getActiveRecords(): fid = mapToOrdered(npc.fid,None) if not fid: continue npc_info[fid] = (npc.eid, npc.level, npc.calcMin, npc.calcMax, npc.flags.pcLevelOffset) #--Loop over savefiles subProgress = SubProgress(progress,0.4,1.0,len(self.data)) message = _("NPCs Releveled:") for index,saveName in enumerate(self.data): #deprint(saveName, '==============================') subProgress(index,_("Updating ") + saveName.s) saveInfo = self.window.data[saveName] saveFile = bosh.SaveFile(saveInfo) saveFile.load() records = saveFile.records mapToOrdered = bosh.MasterMap(saveFile.masters, ordered) releveledCount = 0 #--Loop over change records for recNum in xrange(len(records)): releveled = False (recId,recType,recFlags,version,data) = records[recNum] orderedRecId = mapToOrdered(recId,None) if recType != 35 or recId == 7 or orderedRecId not in npc_info: continue (eid,level,calcMin,calcMax,pcLevelOffset) = npc_info[orderedRecId] npc = bosh.SreNPC(recFlags,data) acbs = npc.acbs if acbs and ( (acbs.level != level) or (acbs.calcMin != calcMin) or (acbs.calcMax != calcMax) or (acbs.flags.pcLevelOffset != pcLevelOffset) ): acbs.flags.pcLevelOffset = pcLevelOffset acbs.level = level acbs.calcMin = calcMin acbs.calcMax = calcMax (recId,recType,recFlags,version,data) = saveFile.records[recNum] records[recNum] = (recId,recType,npc.getFlags(),version,npc.getData()) releveledCount += 1 saveFile.records[recNum] = npc.getTuple(recId,version) #deprint(hex(recId), eid, acbs.level, acbs.calcMin, acbs.calcMax, acbs.flags.getTrueAttrs()) #--Save changes? subProgress(index+0.5,_("Updating ") + saveName.s) if releveledCount: saveFile.safeSave() message += '\n%d %s' % (releveledCount,saveName.s,) progress.Destroy() if modErrors: message += _("\n\nSome mods had load errors and were skipped:\n* ") message += '\n* '.join(modErrors) balt.showOk(self.window,message,_('Update NPC Levels')) finally: if progress: progress.Destroy()
|
def Execute(self,event): debug = True message = _('This will relevel the NPCs in the selected save game(s) according to the npc levels in the currently active mods. This supercedes the older "Import NPC Levels" command.') if not balt.askContinue(self.window,message,'bash.updateNpcLevels.continue',_('Update NPC Levels')): return progress = balt.Progress(_('Update NPC Levels')) try: #--Loop over active mods offsetFlag = 0x80 npc_info = {} loadFactory = bosh.LoadFactory(False,bosh.MreNpc) ordered = list(bosh.modInfos.ordered) subProgress = SubProgress(progress,0,0.4,len(ordered)) modErrors = [] for index,modName in enumerate(ordered): subProgress(index,_("Scanning ") + modName.s) modInfo = bosh.modInfos[modName] modFile = bosh.ModFile(modInfo,loadFactory) try: modFile.load(True) except bosh.ModError, x: modErrors.append(str(x)) continue if 'NPC_' not in modFile.tops: continue #--Loop over mod NPCs mapToOrdered = bosh.MasterMap(modFile.tes4.masters+[modName], ordered) for npc in modFile.NPC_.getActiveRecords(): fid = mapToOrdered(npc.fid,None) if not fid: continue npc_info[fid] = (npc.eid, npc.level, npc.calcMin, npc.calcMax, npc.flags.pcLevelOffset) #--Loop over savefiles subProgress = SubProgress(progress,0.4,1.0,len(self.data)) message = _("NPCs Releveled:") for index,saveName in enumerate(self.data): #deprint(saveName, '==============================') subProgress(index,_("Updating ") + saveName.s) saveInfo = self.window.data[saveName] saveFile = bosh.SaveFile(saveInfo) saveFile.load() records = saveFile.records mapToOrdered = bosh.MasterMap(saveFile.masters, ordered) releveledCount = 0 #--Loop over change records for recNum in xrange(len(records)): releveled = False (recId,recType,recFlags,version,data) = records[recNum] orderedRecId = mapToOrdered(recId,None) if recType != 35 or recId == 7 or orderedRecId not in npc_info: continue (eid,level,calcMin,calcMax,pcLevelOffset) = npc_info[orderedRecId] npc = bosh.SreNPC(recFlags,data) acbs = npc.acbs if acbs and ( (acbs.level != level) or (acbs.calcMin != calcMin) or (acbs.calcMax != calcMax) or (acbs.flags.pcLevelOffset != pcLevelOffset) ): acbs.flags.pcLevelOffset = pcLevelOffset acbs.level = level acbs.calcMin = calcMin acbs.calcMax = calcMax (recId,recType,recFlags,version,data) = saveFile.records[recNum] records[recNum] = (recId,recType,npc.getFlags(),version,npc.getData()) releveledCount += 1 saveFile.records[recNum] = npc.getTuple(recId,version) #deprint(hex(recId), eid, acbs.level, acbs.calcMin, acbs.calcMax, acbs.flags.getTrueAttrs()) #--Save changes? subProgress(index+0.5,_("Updating ") + saveName.s) if releveledCount: saveFile.safeSave() message += '\n%d %s' % (releveledCount,saveName.s,) progress.Destroy() if modErrors: message += _("\n\nSome mods had load errors and were skipped:\n* ") message += '\n* '.join(modErrors) balt.showOk(self.window,message,_('Update NPC Levels')) finally: if progress: progress.Destroy()
| 478,773
|
def Execute(self,event): fallout3Ini = bosh.fallout3Ini base = fallout3Ini.getSetting('Display','sScreenShotBaseName','ScreenShot') next = fallout3Ini.getSetting('Display','iScreenShotIndex','0') rePattern = re.compile(r'^(.+?)(\d*)$',re.I) pattern = balt.askText(self.window,_("Screenshot base name, optionally with next screenshot number.\nE.g. ScreenShot or ScreenShot_101 or Subdir\\ScreenShot_201."),_("Next Shot..."),base+next) if not pattern: return maPattern = rePattern.match(pattern) newBase,newNext = maPattern.groups() settings = {LString('Display'):{ LString('SScreenShotBaseName'): newBase, LString('iScreenShotIndex'): (newNext or next), LString('bAllowScreenShot'): '1', }} screensDir = GPath(newBase).head if screensDir: if not screensDir.isabs(): screensDir = bosh.dirs['app'].join(screensDir) screensDir.makedirs() fallout3Ini.saveSettings(settings) bosh.screensData.refresh() self.window.RefreshUI()
|
def Execute(self,event): fallout3Ini = bosh.fallout3Ini base = fallout3Ini.getSetting('Display','sScreenShotBaseName','ScreenShot') next = fallout3Ini.getSetting('Display','iScreenShotIndex','0') rePattern = re.compile(r'^(.+?)(\d*)$',re.I) pattern = balt.askText(self.window,_("Screenshot base name, optionally with next screenshot number.\nE.g. ScreenShot or ScreenShot_101 or Subdir\\ScreenShot_201."),_("Next Shot..."),base+next) if not pattern: return maPattern = rePattern.match(pattern) newBase,newNext = maPattern.groups() settings = {LString('Display'):{ LString('SScreenShotBaseName'): newBase, LString('iScreenShotIndex'): (newNext or next), LString('bAllowScreenShot'): '1', }} screensDir = GPath(newBase).head if screensDir: if not screensDir.isabs(): screensDir = bosh.dirs['app'].join(screensDir) screensDir.makedirs() fallout3Ini.saveSettings(settings) bosh.screensData.refresh() self.window.RefreshUI()
| 478,774
|
def Execute(self,event): #--File Info srcDir = self.window.data.dir progress = balt.Progress(_("Converting to Jpg")) try: progress.setFull(len(self.data)) srcDir = bosh.screensData.dir for index,fileName in enumerate(self.data): progress(index,fileName.s) srcPath = srcDir.join(fileName) destPath = srcPath.root+'.jpg' if srcPath == destPath or destPath.exists(): continue bitmap = wx.Bitmap(srcPath.s) result = bitmap.SaveFile(destPath.s,wx.BITMAP_TYPE_JPEG) if not result: continue srcPath.remove() finally: if progress: progress.Destroy() bosh.screensData.refresh() self.window.RefreshUI()
|
def Execute(self,event): #--File Info srcDir = self.window.data.dir progress = balt.Progress(_("Converting to Jpg")) try: progress.setFull(len(self.data)) srcDir = bosh.screensData.dir for index,fileName in enumerate(self.data): progress(index,fileName.s) srcPath = srcDir.join(fileName) destPath = srcPath.root+'.jpg' if srcPath == destPath or destPath.exists(): continue bitmap = wx.Bitmap(srcPath.s) result = bitmap.SaveFile(destPath.s,wx.BITMAP_TYPE_JPEG) if not result: continue srcPath.remove() finally: if progress: progress.Destroy() bosh.screensData.refresh() self.window.RefreshUI()
| 478,775
|
def Execute(self,event): #--File Info rePattern = re.compile(r'^([^\\/]+?)(\d*)(\.(jpg|bmp))$',re.I) fileName0 = self.data[0] pattern = balt.askText(self.window,_("Enter new name. E.g. Screenshot 123.bmp"), _("Rename Files"),fileName0.s) if not pattern: return maPattern = rePattern.match(pattern) if not maPattern: balt.showError(self.window,_("Bad extension or file root: ")+pattern) return root,numStr,ext = maPattern.groups()[:3] numLen = len(numStr) num = int(numStr or 0) screensDir = bosh.screensData.dir for oldName in map(GPath,self.data): newName = GPath(root)+numStr+oldName.ext if newName != oldName: oldPath = screensDir.join(oldName) newPath = screensDir.join(newName) if not newPath.exists(): oldPath.moveTo(newPath) num += 1 numStr = `num` numStr = '0'*(numLen-len(numStr))+numStr bosh.screensData.refresh() self.window.RefreshUI()
|
def Execute(self,event): #--File Info rePattern = re.compile(r'^([^\\/]+?)(\d*)(\.(jpg|bmp))$',re.I) fileName0 = self.data[0] pattern = balt.askText(self.window,_("Enter new name. E.g. Screenshot 123.bmp"), _("Rename Files"),fileName0.s) if not pattern: return maPattern = rePattern.match(pattern) if not maPattern: balt.showError(self.window,_("Bad extension or file root: ")+pattern) return root,numStr,ext = maPattern.groups()[:3] numLen = len(numStr) num = int(numStr or 0) screensDir = bosh.screensData.dir for oldName in map(GPath,self.data): newName = GPath(root)+numStr+oldName.ext if newName != oldName: oldPath = screensDir.join(oldName) newPath = screensDir.join(newName) if not newPath.exists(): oldPath.moveTo(newPath) num += 1 numStr = `num` numStr = '0'*(numLen-len(numStr))+numStr bosh.screensData.refresh() self.window.RefreshUI()
| 478,776
|
def Execute(self,event): textDir = settings.get('bash.workDir',bosh.dirs['app']) #--File dialog paths = balt.askOpenMulti(self.window,_('Import message archive(s):'),textDir, '', '*.html') if not paths: return settings['bash.workDir'] = paths[0].head for path in paths: bosh.messages.importArchive(path) self.window.RefreshUI()
|
def Execute(self,event): textDir = settings.get('bash.workDir',bosh.dirs['app']) #--File dialog paths = balt.askOpenMulti(self.window,_('Import message archive(s):'),textDir, '', '*.html') if not paths: return settings['bash.workDir'] = paths[0].head for path in paths: bosh.messages.importArchive(path) self.window.RefreshUI()
| 478,777
|
def Execute(self,event): message = _(r'Delete these %d message(s)? This operation cannot be undone.') % (len(self.data),) if not balt.askYes(self.window,message,_('Delete Messages')): return #--Do it for message in self.data: self.window.data.delete(message) #--Refresh stuff self.window.RefreshUI()
|
def Execute(self,event): message = _(r'Delete these %d message(s)? This operation cannot be undone.') % (len(self.data),) if not balt.askYes(self.window,message,_('Delete Messages')): return #--Do it for message in self.data: self.window.data.delete(message) #--Refresh stuff self.window.RefreshUI()
| 478,778
|
def Execute(self,event): name = balt.askText(self.gTank,_("Add new person:"),self.title) if not name: return if name in self.data: return balt.showInfo(self.gTank,name+_(" already exists."),self.title) self.data[name] = (time.time(),0,'') self.gTank.RefreshUI(details=name) self.gTank.gList.EnsureVisible(self.gTank.GetIndex(name)) self.data.setChanged()
|
def Execute(self,event): name = balt.askText(self.gTank,_("Add new person:"),self.title) if not name: return if name in self.data: return balt.showInfo(self.gTank,name+_(" already exists."),self.title) self.data[name] = (time.time(),0,'') self.gTank.RefreshUI(details=name) self.gTank.gList.EnsureVisible(self.gTank.GetIndex(name)) self.data.setChanged()
| 478,779
|
def Execute(self,event): textDir = settings.get('bash.workDir',bosh.dirs['app']) #--File dialog path = balt.askSave(self.gTank,_('Export people to text file:'),textDir, 'People.txt', '*.txt') if not path: return settings['bash.workDir'] = path.head self.data.dumpText(path,self.selected) balt.showInfo(self.gTank,_('Records exported: %d.') % (len(self.selected),),self.title)
|
def Execute(self,event): textDir = settings.get('bash.workDir',bosh.dirs['app']) #--File dialog path = balt.askSave(self.gTank,_('Export people to text file:'),textDir, 'People.txt', '*.txt') if not path: return settings['bash.workDir'] = path.head self.data.dumpText(path,self.selected) balt.showInfo(self.gTank,_('Records exported: %d.') % (len(self.selected),),self.title)
| 478,780
|
def Execute(self,event): textDir = settings.get('bash.workDir',bosh.dirs['app']) #--File dialog path = balt.askOpen(self.gTank,_('Import people from text file:'),textDir, '', '*.txt') if not path: return settings['bash.workDir'] = path.head newNames = self.data.loadText(path) balt.showInfo(self.gTank,_("People imported: %d") % (len(newNames),),self.title) self.gTank.RefreshUI()
|
def Execute(self,event): textDir = settings.get('bash.workDir',bosh.dirs['app']) #--File dialog path = balt.askOpen(self.gTank,_('Import people from text file:'),textDir, '', '*.txt') if not path: return settings['bash.workDir'] = path.head newNames = self.data.loadText(path) balt.showInfo(self.gTank,_("People imported: %d") % (len(newNames),),self.title) self.gTank.RefreshUI()
| 478,781
|
def DoList(self,event): """Handle selection of label.""" idList = ID_GROUPS karma = range(5,-6,-1)[event.GetId()-idList.BASE] for item in self.selected: text = self.data[item][2] self.data[item] = (time.time(),karma,text) self.gTank.RefreshUI() self.data.setChanged()
|
def DoList(self,event): """Handle selection of label.""" idList = ID_GROUPS karma = range(5,-6,-1)[event.GetId()-idList.BASE] for item in self.selected: text = self.data[item][2] self.data[item] = (time.time(),karma,text) self.gTank.RefreshUI() self.data.setChanged()
| 478,782
|
def Execute(self,event): itemId = self.data[0] masterInfo = self.window.data[itemId] masterName = masterInfo.name #--File Dialog wildcard = _('Fallout3 Mod Files')+' (*.esp;*.esm)|*.esp;*.esm' newPath = balt.askOpen(self.window,_('Change master name to:'), bosh.modInfos.dir, masterName, wildcard) if not newPath: return (newDir,newName) = newPath.headTail #--Valid directory? if newDir != bosh.modInfos.dir: balt.showError(self.window, _("File must be selected from Fallout3 Data Files directory.")) return elif newName == masterName: return #--Save Name masterInfo.setName(newName) self.window.ReList() self.window.PopulateItems() settings.getChanged('bash.mods.renames')[masterName] = newName
|
def Execute(self,event): itemId = self.data[0] masterInfo = self.window.data[itemId] masterName = masterInfo.name #--File Dialog wildcard = _('Fallout3 Mod Files')+' (*.esp;*.esm)|*.esp;*.esm' newPath = balt.askOpen(self.window,_('Change master name to:'), bosh.modInfos.dir, masterName, wildcard) if not newPath: return (newDir,newName) = newPath.headTail #--Valid directory? if newDir != bosh.modInfos.dir: balt.showError(self.window, _("File must be selected from Fallout3 Data Files directory.")) return elif newName == masterName: return #--Save Name masterInfo.setName(newName) self.window.ReList() self.window.PopulateItems() settings.getChanged('bash.mods.renames')[masterName] = newName
| 478,783
|
def Execute(self,event): itemId = self.data[0] masterInfo = self.window.data[itemId] masterName = masterInfo.name newName = GPath(re.sub('[mM]$','p','XX'+masterName.s)) #--Save Name masterInfo.setName(newName) self.window.ReList() self.window.PopulateItems()
|
def Execute(self,event): itemId = self.data[0] masterInfo = self.window.data[itemId] masterName = masterInfo.name newName = GPath(re.sub('[mM]$','p','XX'+masterName.s)) #--Save Name masterInfo.setName(newName) self.window.ReList() self.window.PopulateItems()
| 478,784
|
def Execute(self,event,extraArgs=None): exeFose = bosh.dirs['app'].join('fose_loader.exe') exeArgs = self.exeArgs if self.foseArg != None and settings.get('bash.fose.on',False) and exeFose.exists(): exePath = exeFose if self.foseArg != '': exeArgs += (self.foseArg,) else: exePath = self.exePath exeArgs = (exePath.stail,)+exeArgs if extraArgs: exeArgs += extraArgs statusBar.SetStatusText(' '.join(exeArgs),1) cwd = bolt.Path.getcwd() exePath.head.setcwd() os.spawnv(os.P_NOWAIT,exePath.s,exeArgs) cwd.setcwd()
|
def Execute(self,event,extraArgs=None): exeFose = bosh.dirs['app'].join('fose_loader.exe') exeArgs = self.exeArgs if self.foseArg != None and settings.get('bash.fose.on',False) and exeFose.exists(): exePath = exeFose if self.foseArg != '': exeArgs += (self.foseArg,) else: exePath = self.exePath exeArgs = (exePath.stail,)+exeArgs if extraArgs: exeArgs += extraArgs statusBar.SetStatusText(' '.join(exeArgs),1) cwd = bolt.Path.getcwd() exePath.head.setcwd() os.spawnv(os.P_NOWAIT,exePath.s,exeArgs) cwd.setcwd()
| 478,785
|
def Execute(self,event): """Handle menu selection.""" cwd = bolt.Path.getcwd() self.jar.head.setcwd() os.spawnv(os.P_NOWAIT,self.java.s,(self.java.stail,self.javaArg,'-jar',self.jar.stail)) cwd.setcwd()
|
def Execute(self,event): """Handle menu selection.""" cwd = bolt.Path.getcwd() self.jar.head.setcwd() os.spawnv(os.P_NOWAIT,self.java.s,(self.java.stail,self.javaArg,'-jar',self.jar.stail)) cwd.setcwd()
| 478,786
|
def Execute(self,event): extraArgs = [] if wx.GetKeyState(wx.WXK_CONTROL): extraArgs.append('-FixupPGRD') if settings['fo3Edit.iKnowWhatImDoing']: extraArgs.append('-IKnowWhatImDoing') App_Button.Execute(self,event,tuple(extraArgs))
|
def Execute(self,event): extraArgs = [] if wx.GetKeyState(wx.WXK_CONTROL): extraArgs.append('-FixupPGRD') if settings['fo3Edit.iKnowWhatImDoing']: extraArgs.append('-IKnowWhatImDoing') App_Button.Execute(self,event,tuple(extraArgs))
| 478,787
|
def Execute(self,event): App_Button.Execute(self,event)
|
def Execute(self,event): App_Button.Execute(self,event)
| 478,788
|
def Execute(self,event): App_Button.Execute(self,event) if settings.get('bash.autoQuit.on',False): bashFrame.Close()
|
def Execute(self,event): App_Button.Execute(self,event) if settings.get('bash.autoQuit.on',False): bashFrame.Close()
| 478,789
|
def Execute(self,event): """Invert state.""" self.SetState(-1)
|
def Execute(self,event): """Invert state.""" self.SetState(-1)
| 478,790
|
def Execute(self,event): """Invert state.""" self.SetState(-1)
|
def Execute(self,event): """Invert state.""" self.SetState(-1)
| 478,791
|
def Execute(self,event): """Handle menu selection.""" bolt.Path.getcwd().join('Wrye Bash.html').start()
|
def Execute(self,event): """Handle menu selection.""" bolt.Path.getcwd().join('Wrye Bash.html').start()
| 478,792
|
def Execute(self,event): """Handle menu selection.""" if not docBrowser: DocBrowser().Show() settings['bash.modDocs.show'] = True #balt.ensureDisplayed(docBrowser) docBrowser.Raise()
|
def Execute(self,event): """Handle menu selection.""" if not docBrowser: DocBrowser().Show() settings['bash.modDocs.show'] = True #balt.ensureDisplayed(docBrowser) docBrowser.Raise()
| 478,793
|
def Execute(self,event): """Handle menu selection.""" if not modChecker: ModChecker().Show() #balt.ensureDisplayed(docBrowser) modChecker.Raise()
|
def Execute(self,event): """Handle menu selection.""" if not modChecker: ModChecker().Show() #balt.ensureDisplayed(docBrowser) modChecker.Raise()
| 478,794
|
def InitSettings(): """Initializes settings dictionary for bosh and basher.""" bosh.initSettings() global settings balt._settings = bosh.settings balt.sizes = bosh.settings.getChanged('bash.window.sizes',{}) settings = bosh.settings settings.loadDefaults(settingDefaults) #--Wrye Balt settings['balt.WryeLog.temp'] = bosh.dirs['saveBase'].join('WryeLogTemp.html') settings['balt.WryeLog.cssDir'] = bosh.dirs['mods'].join('Docs')
|
def InitSettings(): """Initializes settings dictionary for bosh and basher.""" bosh.initSettings() global settings balt._settings = bosh.settings balt.sizes = bosh.settings.getChanged('bash.window.sizes',{}) settings = bosh.settings settings.loadDefaults(settingDefaults) #--Wrye Balt settings['balt.WryeLog.temp'] = bosh.dirs['saveBase'].join('WryeLogTemp.html') settings['balt.WryeLog.cssDir'] = bosh.dirs['mods'].join('Docs')
| 478,795
|
def InitImages(): """Initialize color and image collections.""" #--Colors colors['bash.esm'] = (220,220,255) colors['bash.doubleTime.not'] = 'WHITE' colors['bash.doubleTime.exists'] = (255,220,220) colors['bash.doubleTime.load'] = (255,100,100) colors['bash.exOverLoaded'] = (0xFF,0x99,0) colors['bash.masters.remapped'] = (100,255,100) colors['bash.masters.changed'] = (220,255,220) colors['bash.mods.isMergeable'] = (0x00,0x99,0x00) colors['bash.mods.groupHeader'] = (0xD8,0xD8,0xD8) colors['bash.mods.isGhost'] = (0xe8,0xe8,0xe8) colors['bash.installers.skipped'] = (0xe0,0xe0,0xe0) colors['bash.installers.outOfOrder'] = (0xDF,0xDF,0xC5) colors['bash.installers.dirty'] = (0xFF,0xBB,0x33) #--Standard images['save.on'] = Image(r'images/save_on.png',wx.BITMAP_TYPE_PNG) images['save.off'] = Image(r'images/save_off.png',wx.BITMAP_TYPE_PNG) #--Misc #images['fallout3'] = Image(r'images/fallout3.png',wx.BITMAP_TYPE_PNG) images['help'] = Image(r'images/help.png',wx.BITMAP_TYPE_PNG) #--Tools images['doc.on'] = Image(r'images/page_find.png',wx.BITMAP_TYPE_PNG) images['bashmon'] = Image(r'images/group_gear.png',wx.BITMAP_TYPE_PNG) images['modChecker'] = Image(r'images/table_error.png',wx.BITMAP_TYPE_PNG) #--ColorChecks images['checkbox.red.x'] = Image(r'images/checkbox_red_x.png',wx.BITMAP_TYPE_PNG) images['checkbox.green.on.32'] = (Image(r'images/checkbox_green_on_32.png',wx.BITMAP_TYPE_PNG)) images['checkbox.blue.on.32'] = (Image(r'images/checkbox_blue_on_32.png',wx.BITMAP_TYPE_PNG)) #--Bash images['bash.16'] = Image(r'images/bash_16.png',wx.BITMAP_TYPE_PNG) images['bash.32'] = Image(r'images/bash_32.png',wx.BITMAP_TYPE_PNG) images['bash.16.blue'] = Image(r'images/bash_16_blue.png',wx.BITMAP_TYPE_PNG) images['bash.32.blue'] = Image(r'images/bash_32_blue.png',wx.BITMAP_TYPE_PNG) #--Applications Icons global bashRed bashRed = balt.ImageBundle() bashRed.Add(images['bash.16']) bashRed.Add(images['bash.32']) #--Application Subwindow Icons global bashBlue bashBlue = balt.ImageBundle() bashBlue.Add(images['bash.16.blue']) bashBlue.Add(images['bash.32.blue'])
|
def InitImages(): """Initialize color and image collections.""" #--Colors colors['bash.esm'] = (220,220,255) colors['bash.doubleTime.not'] = 'WHITE' colors['bash.doubleTime.exists'] = (255,220,220) colors['bash.doubleTime.load'] = (255,100,100) colors['bash.exOverLoaded'] = (0xFF,0x99,0) colors['bash.masters.remapped'] = (100,255,100) colors['bash.masters.changed'] = (220,255,220) colors['bash.mods.isMergeable'] = (0x00,0x99,0x00) colors['bash.mods.groupHeader'] = (0xD8,0xD8,0xD8) colors['bash.mods.isGhost'] = (0xe8,0xe8,0xe8) colors['bash.installers.skipped'] = (0xe0,0xe0,0xe0) colors['bash.installers.outOfOrder'] = (0xDF,0xDF,0xC5) colors['bash.installers.dirty'] = (0xFF,0xBB,0x33) #--Standard images['save.on'] = Image(r'images/save_on.png',wx.BITMAP_TYPE_PNG) images['save.off'] = Image(r'images/save_off.png',wx.BITMAP_TYPE_PNG) #--Misc #images['fallout3'] = Image(r'images/fallout3.png',wx.BITMAP_TYPE_PNG) images['help'] = Image(r'images/help.png',wx.BITMAP_TYPE_PNG) #--Tools images['doc.on'] = Image(r'images/page_find.png',wx.BITMAP_TYPE_PNG) images['bashmon'] = Image(r'images/group_gear.png',wx.BITMAP_TYPE_PNG) images['modChecker'] = Image(r'images/table_error.png',wx.BITMAP_TYPE_PNG) #--ColorChecks images['checkbox.red.x'] = Image(r'images/checkbox_red_x.png',wx.BITMAP_TYPE_PNG) images['checkbox.green.on.32'] = (Image(r'images/checkbox_green_on_32.png',wx.BITMAP_TYPE_PNG)) images['checkbox.blue.on.32'] = (Image(r'images/checkbox_blue_on_32.png',wx.BITMAP_TYPE_PNG)) #--Bash images['bash.16'] = Image(r'images/bash_16.png',wx.BITMAP_TYPE_PNG) images['bash.32'] = Image(r'images/bash_32.png',wx.BITMAP_TYPE_PNG) images['bash.16.blue'] = Image(r'images/bash_16_blue.png',wx.BITMAP_TYPE_PNG) images['bash.32.blue'] = Image(r'images/bash_32_blue.png',wx.BITMAP_TYPE_PNG) #--Applications Icons global bashRed bashRed = balt.ImageBundle() bashRed.Add(images['bash.16']) bashRed.Add(images['bash.32']) #--Application Subwindow Icons global bashBlue bashBlue = balt.ImageBundle() bashBlue.Add(images['bash.16.blue']) bashBlue.Add(images['bash.32.blue'])
| 478,796
|
def InitStatusBar(): """Initialize status bar links.""" #--Bash Status/LinkBar #BashStatusBar.buttons.append(App_Fallout3()) BashStatusBar.buttons.append(Fose_Button()) BashStatusBar.buttons.append(AutoQuit_Button()) BashStatusBar.buttons.append( Fallout3_Button( bosh.dirs['app'].join('Fallout3.exe'), Image(r'images/fallout3.png'), _("Launch Fallout3"), _("Launch Fallout3 + FOSE"), '')) BashStatusBar.buttons.append( App_Button( bosh.dirs['app'].join('GECK.exe'), Image(r'images/geck.png'), _("Launch GECK"), _("Launch GECK + FOSE"), '-editor')) BashStatusBar.buttons.append( App_Button( bosh.dirs['app'].join('fomm\\fomm.exe'), Image(r'images/database_connect.png'), _("Launch FOMM"))) BashStatusBar.buttons.append( App_FO3Edit( (bosh.dirs['FO3EditPath'], '-view'), Image(r'images/brick_edit.png'), _("Launch FO3View"))) BashStatusBar.buttons.append( App_FO3Edit( dirs['FO3EditPath']), Image(r'images/brick.png'), _("Launch FO3Edit"))) BashStatusBar.buttons.append( App_FO3Edit( (dirs['FO3EditPath'],'-translate'), Image(r'images/brick_error.png'), _("Launch FO3Trans"))) BashStatusBar.buttons.append( App_BOSS( bosh.dirs['app'].join('Data\\BOSS-F.bat'), Image(r'images/Boss1.png'), _("Launch BOSS"))) BashStatusBar.buttons.append( App_BOSS( bosh.dirs['app'].join('Data\\BOSS-F.bat'), Image(r'images/boss2.png'), _("Launch BOSS"))) if bosh.inisettings['showmodelingtoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['BlenderPath'], Image(r'images/blender.png'), _("Launch Blender"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['GmaxPath'], Image(r'images/gmax.png'), _("Launch Gmax"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['MayaPath'], Image(r'images/maya.png'), _("Launch Maya"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['MaxPath'], Image(r'images/max.png'), _("Launch 3dsMax"))) if bosh.inisettings['showmodelingtoollaunchers'] or bosh.inisettings['showtexturetoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['NifskopePath'], Image(r'images/nifskope.png'), _("Launch Nifskope"))) if bosh.inisettings['showtexturetoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['GIMP'], Image(r'images/gimp.png'), _("Launch GIMP"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Photoshop'], Image(r'images/photoshop.png'), _("Launch Photoshop"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Artweaver'], Image(r'images/artweaver.png'), _("Launch Artweaver"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['PaintNET'], Image(r'images/paint.net.png'), _("Launch Paint.NET"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['DDSConverter'], Image(r'images/ddsconverter.png'), _("Launch DDSConverter"))) if bosh.inisettings['showaudiotoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['Audacity'], Image(r'images/audacity.png'), _("Launch Audacity"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Fraps'], Image(r'images/fraps.png'), _("Launch Fraps"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['NPP'], Image(r'images/notepad++.png'), _("Launch Notepad++"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom1'], Image(r'images/custom1.png'), _(bosh.inisettings['custom1txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom2'], Image(r'images/custom2.png'), _(bosh.inisettings['custom2txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom3'], Image(r'images/custom3.png'), _(bosh.inisettings['custom3txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom4'], Image(r'images/custom4.png'), _(bosh.inisettings['custom4txt']))) BashStatusBar.buttons.append(App_BashMon()) BashStatusBar.buttons.append(App_DocBrowser()) BashStatusBar.buttons.append(App_ModChecker()) BashStatusBar.buttons.append(App_Help())
|
def InitStatusBar(): """Initialize status bar links.""" #--Bash Status/LinkBar #BashStatusBar.buttons.append(App_Fallout3()) BashStatusBar.buttons.append(Fose_Button()) BashStatusBar.buttons.append(AutoQuit_Button()) BashStatusBar.buttons.append( Fallout3_Button( bosh.dirs['app'].join('Fallout3.exe'), Image(r'images/fallout3.png'), _("Launch Fallout3"), _("Launch Fallout3 + FOSE"), '')) BashStatusBar.buttons.append( App_Button( bosh.dirs['app'].join('GECK.exe'), Image(r'images/geck.png'), _("Launch GECK"), _("Launch GECK + FOSE"), '-editor')) BashStatusBar.buttons.append( App_Button( bosh.dirs['app'].join('fomm\\fomm.exe'), Image(r'images/database_connect.png'), _("Launch FOMM"))) BashStatusBar.buttons.append( App_FO3Edit( (bosh.dirs['FO3EditPath'], '-view'), Image(r'images/brick_edit.png'), _("Launch FO3View"))) BashStatusBar.buttons.append( App_FO3Edit( dirs['FO3EditPath']), Image(r'images/brick.png'), _("Launch FO3Edit"))) BashStatusBar.buttons.append( App_FO3Edit( (dirs['FO3EditPath'],'-translate'), Image(r'images/brick_error.png'), _("Launch FO3Trans"))) BashStatusBar.buttons.append( App_BOSS( bosh.dirs['app'].join('Data\\BOSS-F.bat'), Image(r'images/Boss1.png'), _("Launch BOSS"))) BashStatusBar.buttons.append( App_BOSS( bosh.dirs['app'].join('Data\\BOSS-F.bat'), Image(r'images/boss2.png'), _("Launch BOSS"))) if bosh.inisettings['showmodelingtoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['BlenderPath'], Image(r'images/blender.png'), _("Launch Blender"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['GmaxPath'], Image(r'images/gmax.png'), _("Launch Gmax"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['MayaPath'], Image(r'images/maya.png'), _("Launch Maya"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['MaxPath'], Image(r'images/max.png'), _("Launch 3dsMax"))) if bosh.inisettings['showmodelingtoollaunchers'] or bosh.inisettings['showtexturetoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['NifskopePath'], Image(r'images/nifskope.png'), _("Launch Nifskope"))) if bosh.inisettings['showtexturetoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['GIMP'], Image(r'images/gimp.png'), _("Launch GIMP"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Photoshop'], Image(r'images/photoshop.png'), _("Launch Photoshop"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Artweaver'], Image(r'images/artweaver.png'), _("Launch Artweaver"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['PaintNET'], Image(r'images/paint.net.png'), _("Launch Paint.NET"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['DDSConverter'], Image(r'images/ddsconverter.png'), _("Launch DDSConverter"))) if bosh.inisettings['showaudiotoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['Audacity'], Image(r'images/audacity.png'), _("Launch Audacity"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Fraps'], Image(r'images/fraps.png'), _("Launch Fraps"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['NPP'], Image(r'images/notepad++.png'), _("Launch Notepad++"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom1'], Image(r'images/custom1.png'), _(bosh.inisettings['custom1txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom2'], Image(r'images/custom2.png'), _(bosh.inisettings['custom2txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom3'], Image(r'images/custom3.png'), _(bosh.inisettings['custom3txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom4'], Image(r'images/custom4.png'), _(bosh.inisettings['custom4txt']))) BashStatusBar.buttons.append(App_BashMon()) BashStatusBar.buttons.append(App_DocBrowser()) BashStatusBar.buttons.append(App_ModChecker()) BashStatusBar.buttons.append(App_Help())
| 478,797
|
def InitStatusBar(): """Initialize status bar links.""" #--Bash Status/LinkBar #BashStatusBar.buttons.append(App_Fallout3()) BashStatusBar.buttons.append(Fose_Button()) BashStatusBar.buttons.append(AutoQuit_Button()) BashStatusBar.buttons.append( Fallout3_Button( bosh.dirs['app'].join('Fallout3.exe'), Image(r'images/fallout3.png'), _("Launch Fallout3"), _("Launch Fallout3 + FOSE"), '')) BashStatusBar.buttons.append( App_Button( bosh.dirs['app'].join('GECK.exe'), Image(r'images/geck.png'), _("Launch GECK"), _("Launch GECK + FOSE"), '-editor')) BashStatusBar.buttons.append( App_Button( bosh.dirs['app'].join('fomm\\fomm.exe'), Image(r'images/database_connect.png'), _("Launch FOMM"))) BashStatusBar.buttons.append( App_FO3Edit( (bosh.dirs['FO3EditPath'], '-view'), Image(r'images/brick_edit.png'), _("Launch FO3View"))) BashStatusBar.buttons.append( App_FO3Edit( dirs['FO3EditPath']), Image(r'images/brick.png'), _("Launch FO3Edit"))) BashStatusBar.buttons.append( App_FO3Edit( (dirs['FO3EditPath'],'-translate'), Image(r'images/brick_error.png'), _("Launch FO3Trans"))) BashStatusBar.buttons.append( App_BOSS( bosh.dirs['app'].join('Data\\BOSS-F.bat'), Image(r'images/Boss1.png'), _("Launch BOSS"))) BashStatusBar.buttons.append( App_BOSS( bosh.dirs['app'].join('Data\\BOSS-F.bat'), Image(r'images/boss2.png'), _("Launch BOSS"))) if bosh.inisettings['showmodelingtoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['BlenderPath'], Image(r'images/blender.png'), _("Launch Blender"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['GmaxPath'], Image(r'images/gmax.png'), _("Launch Gmax"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['MayaPath'], Image(r'images/maya.png'), _("Launch Maya"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['MaxPath'], Image(r'images/max.png'), _("Launch 3dsMax"))) if bosh.inisettings['showmodelingtoollaunchers'] or bosh.inisettings['showtexturetoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['NifskopePath'], Image(r'images/nifskope.png'), _("Launch Nifskope"))) if bosh.inisettings['showtexturetoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['GIMP'], Image(r'images/gimp.png'), _("Launch GIMP"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Photoshop'], Image(r'images/photoshop.png'), _("Launch Photoshop"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Artweaver'], Image(r'images/artweaver.png'), _("Launch Artweaver"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['PaintNET'], Image(r'images/paint.net.png'), _("Launch Paint.NET"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['DDSConverter'], Image(r'images/ddsconverter.png'), _("Launch DDSConverter"))) if bosh.inisettings['showaudiotoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['Audacity'], Image(r'images/audacity.png'), _("Launch Audacity"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Fraps'], Image(r'images/fraps.png'), _("Launch Fraps"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['NPP'], Image(r'images/notepad++.png'), _("Launch Notepad++"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom1'], Image(r'images/custom1.png'), _(bosh.inisettings['custom1txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom2'], Image(r'images/custom2.png'), _(bosh.inisettings['custom2txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom3'], Image(r'images/custom3.png'), _(bosh.inisettings['custom3txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom4'], Image(r'images/custom4.png'), _(bosh.inisettings['custom4txt']))) BashStatusBar.buttons.append(App_BashMon()) BashStatusBar.buttons.append(App_DocBrowser()) BashStatusBar.buttons.append(App_ModChecker()) BashStatusBar.buttons.append(App_Help())
|
def InitStatusBar(): """Initialize status bar links.""" #--Bash Status/LinkBar #BashStatusBar.buttons.append(App_Fallout3()) BashStatusBar.buttons.append(Fose_Button()) BashStatusBar.buttons.append(AutoQuit_Button()) BashStatusBar.buttons.append( Fallout3_Button( bosh.dirs['app'].join('Fallout3.exe'), Image(r'images/fallout3.png'), _("Launch Fallout3"), _("Launch Fallout3 + FOSE"), '')) BashStatusBar.buttons.append( App_Button( bosh.dirs['app'].join('GECK.exe'), Image(r'images/geck.png'), _("Launch GECK"), _("Launch GECK + FOSE"), '-editor')) BashStatusBar.buttons.append( App_Button( bosh.dirs['app'].join('fomm\\fomm.exe'), Image(r'images/database_connect.png'), _("Launch FOMM"))) BashStatusBar.buttons.append( App_FO3Edit( (bosh.dirs['FO3EditPath'], '-view'), Image(r'images/brick_edit.png'), _("Launch FO3View"))) BashStatusBar.buttons.append( App_FO3Edit( dirs['FO3EditPath']), Image(r'images/brick.png'), _("Launch FO3Edit"))) BashStatusBar.buttons.append( App_FO3Edit( (dirs['FO3EditPath'],'-translate'), Image(r'images/brick_error.png'), _("Launch FO3Trans"))) BashStatusBar.buttons.append( App_BOSS( bosh.dirs['app'].join('Data\\BOSS-F.bat'), Image(r'images/Boss1.png'), _("Launch BOSS"))) BashStatusBar.buttons.append( App_BOSS( bosh.dirs['app'].join('Data\\BOSS-F.bat'), Image(r'images/boss2.png'), _("Launch BOSS"))) if bosh.inisettings['showmodelingtoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['BlenderPath'], Image(r'images/blender.png'), _("Launch Blender"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['GmaxPath'], Image(r'images/gmax.png'), _("Launch Gmax"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['MayaPath'], Image(r'images/maya.png'), _("Launch Maya"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['MaxPath'], Image(r'images/max.png'), _("Launch 3dsMax"))) if bosh.inisettings['showmodelingtoollaunchers'] or bosh.inisettings['showtexturetoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['NifskopePath'], Image(r'images/nifskope.png'), _("Launch Nifskope"))) if bosh.inisettings['showtexturetoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['GIMP'], Image(r'images/gimp.png'), _("Launch GIMP"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Photoshop'], Image(r'images/photoshop.png'), _("Launch Photoshop"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Artweaver'], Image(r'images/artweaver.png'), _("Launch Artweaver"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['PaintNET'], Image(r'images/paint.net.png'), _("Launch Paint.NET"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['DDSConverter'], Image(r'images/ddsconverter.png'), _("Launch DDSConverter"))) if bosh.inisettings['showaudiotoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['Audacity'], Image(r'images/audacity.png'), _("Launch Audacity"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Fraps'], Image(r'images/fraps.png'), _("Launch Fraps"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['NPP'], Image(r'images/notepad++.png'), _("Launch Notepad++"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom1'], Image(r'images/custom1.png'), _(bosh.inisettings['custom1txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom2'], Image(r'images/custom2.png'), _(bosh.inisettings['custom2txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom3'], Image(r'images/custom3.png'), _(bosh.inisettings['custom3txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom4'], Image(r'images/custom4.png'), _(bosh.inisettings['custom4txt']))) BashStatusBar.buttons.append(App_BashMon()) BashStatusBar.buttons.append(App_DocBrowser()) BashStatusBar.buttons.append(App_ModChecker()) BashStatusBar.buttons.append(App_Help())
| 478,798
|
def InitStatusBar(): """Initialize status bar links.""" #--Bash Status/LinkBar #BashStatusBar.buttons.append(App_Fallout3()) BashStatusBar.buttons.append(Fose_Button()) BashStatusBar.buttons.append(AutoQuit_Button()) BashStatusBar.buttons.append( Fallout3_Button( bosh.dirs['app'].join('Fallout3.exe'), Image(r'images/fallout3.png'), _("Launch Fallout3"), _("Launch Fallout3 + FOSE"), '')) BashStatusBar.buttons.append( App_Button( bosh.dirs['app'].join('GECK.exe'), Image(r'images/geck.png'), _("Launch GECK"), _("Launch GECK + FOSE"), '-editor')) BashStatusBar.buttons.append( App_Button( bosh.dirs['app'].join('fomm\\fomm.exe'), Image(r'images/database_connect.png'), _("Launch FOMM"))) BashStatusBar.buttons.append( App_FO3Edit( (bosh.dirs['FO3EditPath'], '-view'), Image(r'images/brick_edit.png'), _("Launch FO3View"))) BashStatusBar.buttons.append( App_FO3Edit( dirs['FO3EditPath']), Image(r'images/brick.png'), _("Launch FO3Edit"))) BashStatusBar.buttons.append( App_FO3Edit( (dirs['FO3EditPath'],'-translate'), Image(r'images/brick_error.png'), _("Launch FO3Trans"))) BashStatusBar.buttons.append( App_BOSS( bosh.dirs['app'].join('Data\\BOSS-F.bat'), Image(r'images/Boss1.png'), _("Launch BOSS"))) BashStatusBar.buttons.append( App_BOSS( bosh.dirs['app'].join('Data\\BOSS-F.bat'), Image(r'images/boss2.png'), _("Launch BOSS"))) if bosh.inisettings['showmodelingtoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['BlenderPath'], Image(r'images/blender.png'), _("Launch Blender"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['GmaxPath'], Image(r'images/gmax.png'), _("Launch Gmax"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['MayaPath'], Image(r'images/maya.png'), _("Launch Maya"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['MaxPath'], Image(r'images/max.png'), _("Launch 3dsMax"))) if bosh.inisettings['showmodelingtoollaunchers'] or bosh.inisettings['showtexturetoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['NifskopePath'], Image(r'images/nifskope.png'), _("Launch Nifskope"))) if bosh.inisettings['showtexturetoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['GIMP'], Image(r'images/gimp.png'), _("Launch GIMP"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Photoshop'], Image(r'images/photoshop.png'), _("Launch Photoshop"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Artweaver'], Image(r'images/artweaver.png'), _("Launch Artweaver"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['PaintNET'], Image(r'images/paint.net.png'), _("Launch Paint.NET"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['DDSConverter'], Image(r'images/ddsconverter.png'), _("Launch DDSConverter"))) if bosh.inisettings['showaudiotoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['Audacity'], Image(r'images/audacity.png'), _("Launch Audacity"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Fraps'], Image(r'images/fraps.png'), _("Launch Fraps"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['NPP'], Image(r'images/notepad++.png'), _("Launch Notepad++"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom1'], Image(r'images/custom1.png'), _(bosh.inisettings['custom1txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom2'], Image(r'images/custom2.png'), _(bosh.inisettings['custom2txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom3'], Image(r'images/custom3.png'), _(bosh.inisettings['custom3txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom4'], Image(r'images/custom4.png'), _(bosh.inisettings['custom4txt']))) BashStatusBar.buttons.append(App_BashMon()) BashStatusBar.buttons.append(App_DocBrowser()) BashStatusBar.buttons.append(App_ModChecker()) BashStatusBar.buttons.append(App_Help())
|
def InitStatusBar(): """Initialize status bar links.""" #--Bash Status/LinkBar #BashStatusBar.buttons.append(App_Fallout3()) BashStatusBar.buttons.append(Fose_Button()) BashStatusBar.buttons.append(AutoQuit_Button()) BashStatusBar.buttons.append( Fallout3_Button( bosh.dirs['app'].join('Fallout3.exe'), Image(r'images/fallout3.png'), _("Launch Fallout3"), _("Launch Fallout3 + FOSE"), '')) BashStatusBar.buttons.append( App_Button( bosh.dirs['app'].join('GECK.exe'), Image(r'images/geck.png'), _("Launch GECK"), _("Launch GECK + FOSE"), '-editor')) BashStatusBar.buttons.append( App_Button( bosh.dirs['app'].join('fomm\\fomm.exe'), Image(r'images/database_connect.png'), _("Launch FOMM"))) BashStatusBar.buttons.append( App_FO3Edit( (bosh.dirs['FO3EditPath'], '-view'), Image(r'images/brick_edit.png'), _("Launch FO3View"))) BashStatusBar.buttons.append( App_FO3Edit( dirs['FO3EditPath']), Image(r'images/brick.png'), _("Launch FO3Edit"))) BashStatusBar.buttons.append( App_FO3Edit( (dirs['FO3EditPath'],'-translate'), Image(r'images/brick_error.png'), _("Launch FO3Trans"))) BashStatusBar.buttons.append( App_BOSS( bosh.dirs['app'].join('Data\\BOSS-F.bat'), Image(r'images/Boss1.png'), _("Launch BOSS"))) BashStatusBar.buttons.append( App_BOSS( bosh.dirs['app'].join('Data\\BOSS-F.bat'), Image(r'images/boss2.png'), _("Launch BOSS"))) if bosh.inisettings['showmodelingtoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['BlenderPath'], Image(r'images/blender.png'), _("Launch Blender"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['GmaxPath'], Image(r'images/gmax.png'), _("Launch Gmax"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['MayaPath'], Image(r'images/maya.png'), _("Launch Maya"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['MaxPath'], Image(r'images/max.png'), _("Launch 3dsMax"))) if bosh.inisettings['showmodelingtoollaunchers'] or bosh.inisettings['showtexturetoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['NifskopePath'], Image(r'images/nifskope.png'), _("Launch Nifskope"))) if bosh.inisettings['showtexturetoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['GIMP'], Image(r'images/gimp.png'), _("Launch GIMP"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Photoshop'], Image(r'images/photoshop.png'), _("Launch Photoshop"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Artweaver'], Image(r'images/artweaver.png'), _("Launch Artweaver"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['PaintNET'], Image(r'images/paint.net.png'), _("Launch Paint.NET"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['DDSConverter'], Image(r'images/ddsconverter.png'), _("Launch DDSConverter"))) if bosh.inisettings['showaudiotoollaunchers']: BashStatusBar.buttons.append( App_Button( bosh.dirs['Audacity'], Image(r'images/audacity.png'), _("Launch Audacity"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Fraps'], Image(r'images/fraps.png'), _("Launch Fraps"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['NPP'], Image(r'images/notepad++.png'), _("Launch Notepad++"))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom1'], Image(r'images/custom1.png'), _(bosh.inisettings['custom1txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom2'], Image(r'images/custom2.png'), _(bosh.inisettings['custom2txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom3'], Image(r'images/custom3.png'), _(bosh.inisettings['custom3txt']))) BashStatusBar.buttons.append( App_Button( bosh.dirs['Custom4'], Image(r'images/custom4.png'), _(bosh.inisettings['custom4txt']))) BashStatusBar.buttons.append(App_BashMon()) BashStatusBar.buttons.append(App_DocBrowser()) BashStatusBar.buttons.append(App_ModChecker()) BashStatusBar.buttons.append(App_Help())
| 478,799
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.