Skip to content

Commit 2d3e169

Browse files
committed
Normalized basher.py between FO3 and FNV
1 parent 4cabb27 commit 2d3e169

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

Mopy/bash/basher.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,6 +2258,9 @@ def CheckTargets(self):
22582258
if 'FalloutPrefs.ini' not in self.choices:
22592259
self.choices['FalloutPrefs.ini'] = bosh.falloutPrefsIni.path
22602260
changed = True
2261+
if 'Fallout_default.ini' not in self.choices:
2262+
self.choices['Fallout_default.ini'] = bosh.falloutDefaultIni.path
2263+
changed = True
22612264
if _('Browse...') not in self.choices:
22622265
self.choices[_('Browse...')] = None
22632266
changed = True
@@ -3276,7 +3279,7 @@ def OnShow(self):
32763279
if bosh.inisettings['ClearRO']:
32773280
cmd = r'attrib -R "%s\*" /S /D' % (bosh.dirs['mods'])
32783281
cmd = Encode(cmd,'mbcs')
3279-
ins,err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, startupinfo=startupinfo).communicate()
3282+
ins, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, startupinfo=startupinfo).communicate()
32803283
except CancelError:
32813284
# User canceled the refresh
32823285
self.refreshing = False
@@ -4841,7 +4844,7 @@ def __init__(self, parent=None,pos=wx.DefaultPosition,size=(400,500),
48414844
wxver = wx.version()
48424845
deprint(wxver)
48434846
if not 'unicode' in wxver.lower() and not '2.9' in wxver:
4844-
balt.showWarning(bashFrame,_("Warning you appear to be using a non-unicode version of wxPython (%s) but have set Wrye Flash to unicode mode, this may cause problems, it is reccomended you use a unicode version of wPython instead.") % wxver)
4847+
balt.showWarning(bashFrame,_("Warning you appear to be using a non-unicode version of wxPython (%s) but have set Wrye Flash to unicode mode, this may cause problems, it is recommended you use a unicode version of wPython instead.") % wxver)
48454848

48464849
def SetTitle(self,title=None):
48474850
"""Set title. Set to default if no title supplied."""
@@ -5514,6 +5517,7 @@ def InitData(self,progress):
55145517
bosh.configHelpers.refresh()
55155518
bosh.falloutIni = bosh.FalloutIni()
55165519
bosh.falloutPrefsIni = bosh.FalloutPrefsIni()
5520+
bosh.falloutDefaultIni = bosh.FalloutDefaultIni()
55175521
bosh.modInfos = bosh.ModInfos()
55185522
bosh.modInfos.refresh(doAutoGroup=True)
55195523
progress.Update(30,_("Initializing SaveInfos"))
@@ -6040,7 +6044,7 @@ def ImportConfig(self,event=None):
60406044
self.SetOkEnable()
60416045

60426046
def UpdateConfig(self,patchConfigs,event=None):
6043-
if not balt.askYes(self.parent,_("Wrye Flash detects that the selected file was saved in Bash's %s mode, do you want Wrye Flash to attempt to adjust the configuration on import to work with %s mode (Good chance there will be a few mistakes)? (Otherwise this import will have no effect.)" % (['CBash','Python'][self.doCBash], ['Python','CBash'][self.doCBash]))): return
6047+
if not balt.askYes(self.parent,_("Wrye Flash detects that the selected file was saved in Flash's %s mode, do you want Wrye Flash to attempt to adjust the configuration on import to work with %s mode (Good chance there will be a few mistakes)? (Otherwise this import will have no effect.)" % (['CBash','Python'][self.doCBash], ['Python','CBash'][self.doCBash]))): return
60446048
if not self.doCBash:
60456049
bosh.CBash_PatchFile.patchTime = bosh.PatchFile.patchTime
60466050
else:
@@ -7603,7 +7607,11 @@ def Execute(self,event):
76037607
bsaFile.scan()
76047608
resetCount = bsaFile.reset()
76057609
#balt.showOk(self,_("BSA Hashes reset: %d") % (resetCount,))
7606-
bosh.falloutIni.setBsaRedirection(settings[self.key])
7610+
try:
7611+
bosh.falloutIni.setBsaRedirection(settings[self.key])
7612+
except WindowsError:
7613+
pass
7614+
bosh.falloutDefaultIni.setBsaRedirection(settings[self.key])
76077615

76087616
#------------------------------------------------------------------------------
76097617
class Installers_ConflictsReportShowsInactive(BoolLink):
@@ -14250,7 +14258,7 @@ def Execute(self,event,extraArgs=None):
1425014258
if bosh.dirs['boss'].join('BOSS.exe').version >= (2,0,0,0):
1425114259
# After version 2.0, need to pass in the -g argument
1425214260
#exeArgs += ('-g%s' % bush.game.name,)
14253-
exeArgs += ('-g%s' % u'Fallout3',)
14261+
exeArgs += ('-g%s' % 'Fallout3',)
1425414262
progress(0.05,_("Processing... launching BOSS."))
1425514263
try:
1425614264
subprocess.call((exePath.s,) + exeArgs[1:], startupinfo=bosh.startupinfo, close_fds=bolt.close_fds)
@@ -14438,7 +14446,6 @@ def InitImages():
1443814446
images['save.off'] = Image(GPath(bosh.dirs['images'].join('save_off.png')),wx.BITMAP_TYPE_PNG)
1443914447
#--Misc
1444014448
#images['fallout3'] = Image(GPath(bosh.dirs['images'].join('fallout3.png')),wx.BITMAP_TYPE_PNG)
14441-
#images['falloutnv'] = Image(GPath(bosh.dirs['images'].join('falloutnv.png')),wx.BITMAP_TYPE_PNG)
1444214449
images['help'] = Image(GPath(bosh.dirs['images'].join('help'))+bosh.inisettings['IconSize']+'.png',wx.BITMAP_TYPE_PNG)
1444314450
#--Tools
1444414451
images['doc.on'] = Image(GPath(bosh.dirs['images'].join('page_find'))+bosh.inisettings['IconSize']+'.png',wx.BITMAP_TYPE_PNG)

0 commit comments

Comments
 (0)