mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-20 23:07:51 +01:00
Add checking for supported features with the currently new supported features 'Atch', 'Shp' and 'Atr'.
This commit is contained in:
parent
98203e4e8a
commit
318a41fe52
14 changed files with 216 additions and 37 deletions
|
|
@ -28,7 +28,8 @@ public partial class ModCreator(
|
|||
MetaFileManager metaFileManager,
|
||||
GamePathParser gamePathParser) : IService
|
||||
{
|
||||
public readonly Configuration Config = config;
|
||||
public const FeatureFlags SupportedFeatures = FeatureFlags.Atch | FeatureFlags.Shp | FeatureFlags.Atr;
|
||||
public readonly Configuration Config = config;
|
||||
|
||||
/// <summary> Creates directory and files necessary for a new mod without adding it to the manager. </summary>
|
||||
public DirectoryInfo? CreateEmptyMod(DirectoryInfo basePath, string newName, string description = "", string? author = null)
|
||||
|
|
@ -74,7 +75,7 @@ public partial class ModCreator(
|
|||
return false;
|
||||
|
||||
modDataChange = ModMeta.Load(dataEditor, this, mod);
|
||||
if (modDataChange.HasFlag(ModDataChangeType.Deletion) || mod.Name.Length == 0)
|
||||
if (modDataChange.HasFlag(ModDataChangeType.Deletion) || mod.Name.Length == 0 || mod.RequiredFeatures is FeatureFlags.Invalid)
|
||||
return false;
|
||||
|
||||
modDataChange |= ModLocalData.Load(dataEditor, mod);
|
||||
|
|
@ -82,9 +83,9 @@ public partial class ModCreator(
|
|||
LoadAllGroups(mod);
|
||||
if (incorporateMetaChanges)
|
||||
IncorporateAllMetaChanges(mod, true, deleteDefaultMetaChanges);
|
||||
else if (deleteDefaultMetaChanges)
|
||||
ModMetaEditor.DeleteDefaultValues(mod, metaFileManager, saveService, false);
|
||||
|
||||
else if (deleteDefaultMetaChanges)
|
||||
ModMetaEditor.DeleteDefaultValues(mod, metaFileManager, saveService, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue