cyberrumor / ammo

Almost Manual Mod Organizer - Linux MO for Bethesda Games
GNU General Public License v2.0
25 stars 6 forks source link

Centralize plugin location logic #50

Closed cyberrumor closed 5 months ago

cyberrumor commented 5 months ago

The logic in component.py::Mod.__post_init__ is the correct logic to locate plugins in the proper location.

This logic needs to be moved somewhere that it can be recycled because it's also needed when deleting plugins.

It should also store full file path instead of just the name as a string, then comparisons for that filename need to be updated.

With the proposed changes, deleting plugins will no longer delete plugins from anywhere in that mod's files, in case that mod had the same plugin in multiple locations.