Added a whole lot of rudimentary comments, also importing selects the last imported mod if possible.

This commit is contained in:
Ottermandias 2021-06-25 15:40:41 +02:00
parent a19ec226c5
commit d29049ca21
24 changed files with 83 additions and 23 deletions

View file

@ -4,6 +4,8 @@ using Penumbra.Util;
namespace Penumbra.Mod
{
// A complete Mod containing settings (i.e. dependent on a collection)
// and the resulting cache.
public class Mod
{
public ModSettings Settings { get; }

View file

@ -5,6 +5,7 @@ using Penumbra.Util;
namespace Penumbra.Mod
{
// The ModCache contains volatile information dependent on all current settings in a collection.
public class ModCache
{
public Dictionary< Mod, (List< GamePath > Files, List< MetaManipulation > Manipulations) > Conflicts { get; private set; } = new();

View file

@ -3,6 +3,9 @@ using Dalamud.Plugin;
namespace Penumbra.Mod
{
// ModData contains all permanent information about a mod,
// and is independent of collections or settings.
// It only changes when the user actively changes the mod or their filesystem.
public class ModData
{
public DirectoryInfo BasePath;

View file

@ -6,6 +6,7 @@ using Penumbra.Util;
namespace Penumbra.Mod
{
// Functions that do not really depend on only one component of a mod.
public static class ModFunctions
{
public static bool CleanUpCollection( Dictionary< string, ModSettings > settings, IEnumerable< DirectoryInfo > modPaths )

View file

@ -58,7 +58,6 @@ namespace Penumbra.Mod
return true;
}
public static ModMeta? LoadFromFile( FileInfo filePath )
{
try

View file

@ -5,6 +5,7 @@ using Penumbra.Structs;
namespace Penumbra.Mod
{
// Contains the settings for a given mod.
public class ModSettings
{
public bool Enabled { get; set; }

View file

@ -4,6 +4,9 @@ using Penumbra.Structs;
namespace Penumbra.Mod
{
// Contains settings with the option selections stored by names instead of index.
// This is meant to make them possibly more portable when we support importing collections from other users.
// Enabled does not exist, because disabled mods would not be exported in this way.
public class NamedModSettings
{
public int Priority { get; set; }