Skip to content

Commit

Permalink
Fix 'find plugins' displaying mods instead of plugins
Browse files Browse the repository at this point in the history
Also fix a few failing tests that were a result of a last second test
refactor.
  • Loading branch information
cyberrumor committed Feb 5, 2024
1 parent 2fd8bea commit bc6e71b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ammo/mod_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def _stage(self) -> dict:
dest = mod.install_dir / corrected_name

# Add the sanitized full path to the stage, resolving
# conflicts. Record whether a mod conflicting files.
# conflicts. Record whether a mod has conflicting files.
dest = normalize(dest, self.game.directory)
if dest in result:
conflicting_mod = [
Expand Down Expand Up @@ -985,5 +985,5 @@ def find(self, *keyword: str) -> None:
if kw == "plugins":
for component in self.mods + self.downloads:
component.visible = False
for component in self.mods:
for component in self.plugins:
component.visible = True
3 changes: 2 additions & 1 deletion test/test_conflict_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from ammo.component import (
ComponentEnum,
DeleteEnum,
RenameEnum,
)


Expand Down Expand Up @@ -295,7 +296,7 @@ def test_conflicting_mods_have_conflict_flag_after_deactivate():
for mod in ["conflict_1", "conflict_2", "normal_mod"]:
install_mod(controller, mod)

controller.deactivate(ComponentEnum.MOD, 3)
controller.deactivate(ComponentEnum.MOD, 2)

assert (
controller.mods[
Expand Down

0 comments on commit bc6e71b

Please sign in to comment.