Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into 570-launchers-menu-gaz
Browse files Browse the repository at this point in the history
  • Loading branch information
BGazotti committed Jul 28, 2024
2 parents c9a39a3 + 0a69959 commit b88a1a9
Show file tree
Hide file tree
Showing 63 changed files with 18,396 additions and 17,733 deletions.
3 changes: 2 additions & 1 deletion Mopy/Docs/Wrye Bash Advanced Readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -10099,7 +10099,8 @@ <h3 id="patch-tweaks">Tweak Options In Detail <a class="back2top" href="#content
<td>Changes the maximum distance the chase camera can be moved away
from the player. Very useful for creating a bird's eye view –
but also a little bit unbalancing for that reason.</td>
<td>All games but Fallout 4</td>
<td>Oblivion, Nehrim&colon; At Fate's Edge, Fallout 3 &amp;
Fallout&colon; New Vegas</td>
</tr>
<tr>
<td id="patch-tweak-settings-camera-chase-tightness">Camera: Chase
Expand Down
9 changes: 5 additions & 4 deletions Mopy/Docs/Wrye Bash General Readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -500,13 +500,14 @@ <h3 id="bain-structure">BAIN-Compatible installer layout <a class="back2top" hre
</tr>
<tr>
<td>Fallout 3</td>
<td>config, distantlod, facegen, fonts, fose, menus, uio, scripts,
shaders, trees</td>
<td>config, distantlod, facegen, fonts, fose, lodsettings, menus,
uio, scripts, shaders, trees</td>
</tr>
<tr>
<td>Fallout&colon; New Vegas</td>
<td>config, distantlod, facegen, fonts, menus, nvse, uio, scripts,
shaders, trees</td>
<td>baseobjectswapper, config, distantlod, facegen, fonts,
keywords, lodsettings, menus, nvse, uio, scripts, shaders,
trees</td>
</tr>
<tr>
<td>Skyrim</td>
Expand Down
7 changes: 5 additions & 2 deletions Mopy/Docs/Wrye Bash Technical Readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,11 @@ <h3 id="wizards-functions">Functions</h3>
<li><code>0</code> - Installed version is equal to the version specified in <var>version_string</var>.
<li><code>1</code> - Installed version is greater than the version specified in <var>version_string</var>.
</ul>
<p><dfn id="wizardsDataFileExists">DataFileExists</dfn> - Tests for the existence of a file in the Data directory. If the file you are
testing for is a plugin, this will also detect ghosted versions of the file.</p>
<p><dfn id="wizardsDataFileExists">DataFileExists</dfn> - Tests for the
existence of one or more files, relative to the Data directory. If the
files you are testing for are plugins, this will also detect ghosted
versions of them. All specified files must exist for this to return
<code>True</code>.</p>
<code class="box">DataFileExists(file_name [, ..., file_name_n])</code>
<ul>
<li><var>file_name</var> - A string or variable holding a string,
Expand Down
60 changes: 42 additions & 18 deletions Mopy/bash/ScriptParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ def SplitAtCommas(self, tokens=None):
tokens = tokens or self.tokens
parenDepth = 0
bracketDepth = 0
ret = [[]]
result = [[]]
for tok in tokens:
if tok.type == OPEN_PARENS:
parenDepth += 1
Expand All @@ -608,10 +608,10 @@ def SplitAtCommas(self, tokens=None):
if bracketDepth < 0:
error(_(u'Mismatched brackets.'))
if tok.type == COMMA and parenDepth == 0 and bracketDepth == 0:
ret.append([])
result.append([])
else:
ret[-1].append(tok)
return ret
result[-1].append(tok)
return result

def StripOuterParens(self, tokens=None):
tokens = tokens or self.tokens
Expand Down Expand Up @@ -768,11 +768,11 @@ def ExecuteRPN(self, rpn=None):
while len(args) < tkn_min_args:
args.append(stack.pop())
args.reverse()
ret = i(*args)
if isinstance(ret, list):
stack.extend([Parser.Token(x) for x in ret])
res = i(*args)
if isinstance(res, list):
stack.extend([Parser.Token(x) for x in res])
else:
stack.append(Parser.Token(ret))
stack.append(Parser.Token(res))
elif i.type == FUNCTION:
if len(stack) < i.numArgs:
_err_too_few_args('function', i.text, len(stack),
Expand All @@ -781,11 +781,11 @@ def ExecuteRPN(self, rpn=None):
while len(args) < i.numArgs:
args.append(stack.pop())
args.reverse()
ret = i(*args)
if isinstance(ret, list):
stack.extend([Parser.Token(x) for x in ret])
res = i(*args)
if isinstance(res, list):
stack.extend([Parser.Token(x) for x in res])
else:
stack.append(Parser.Token(ret))
stack.append(Parser.Token(res))
else:
stack.append(i)
if len(stack) == 1:
Expand Down Expand Up @@ -1189,11 +1189,35 @@ def fnEditINI(self, ini_name, section, setting, value, comment=''):
self._handleINIEdit(ini_name, section, setting, value, comment, False)

def fnDisableINILine(self, ini_name, section, setting):
self._handleINIEdit(ini_name, section, setting, '', '', True)
self._handleINIEdit(ini_name, section, setting, 'DELETED', '', True)

def _handleINIEdit(self, ini_name, section, setting, value, comment,
disable):
raise NotImplementedError # needs ini_files.OBSEIniFile
"""
Common implementation for the EditINI and DisableINILine wizard
functions.
:param ini_name: The name of the INI file to edit. If it's not one of
the game's default INIs (e.g. Skyrim.ini), it's treated as relative
to the Data folder.
:param section: The section of the INI file to edit.
:param setting: The name of the setting to edit.
:param value: The value to assign. If disabling a line, this must be
'DELETED'.
:param comment: The comment to place with the edit. Pass an empty
string if no comment should be placed.
:param disable: Whether this edit should disable the setting in
question.
"""
section = section.strip()
setting = setting.strip()
comment = comment.strip()
iedits = self.iniedits[ini_name]
try:
ci_section = iedits[section]
except KeyError:
ci_section = iedits[section] = bolt.LowerDict()
ci_section[setting] = (value, comment, disable)

def fnExec(self, strLines):
lines = strLines.split('\n')
Expand Down Expand Up @@ -1454,7 +1478,7 @@ def kwdSelectAll(self): self._SelectAll(True)
def kwdDeSelectAll(self): self._SelectAll(False)

def _SelectAll(self, bSelect):
raise NotImplementedError # needs self.sublist/_plugin_enabled
raise NotImplementedError # needs self.sublist/plugin_enabled

@staticmethod
def _set_all_values(di, common_value):
Expand All @@ -1468,13 +1492,13 @@ def kwd_de_select_plugin(self, plugin_name):
self._select_plugin(False, plugin_name)

def _select_plugin(self, should_activate, plugin_name):
raise NotImplementedError # needs self._plugin_enabled
raise NotImplementedError # needs self.plugin_enabled

def kwd_select_all_plugins(self): self._select_all_plugins(True)
def kwd_de_select_all_plugins(self): self._select_all_plugins(False)

def _select_all_plugins(self, should_activate):
raise NotImplementedError # needs self._plugin_enabled
raise NotImplementedError # needs self.plugin_enabled

def kwd_rename_plugin(self, plugin_name, new_plugin_name):
plugin_name = self._resolve_plugin_rename(plugin_name)
Expand All @@ -1494,7 +1518,7 @@ def kwd_reset_plugin_name(self, plugin_name):
del self.plugin_renames[plugin_name]

def _resolve_plugin_rename(self, plugin_name: str) -> FName | None:
raise NotImplementedError # needs self._plugin_enabled
raise NotImplementedError # needs self.plugin_enabled

def kwd_reset_all_plugin_names(self):
self.plugin_renames.clear()
Expand Down
Loading

0 comments on commit b88a1a9

Please sign in to comment.