simplify ContentPackFor validation check
This commit is contained in:
parent
61d6ec12da
commit
55eec58eaf
|
@ -134,15 +134,11 @@ namespace StardewModdingAPI.Toolkit.Serialization.Models
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate content pack
|
// validate content pack ID
|
||||||
else if (isContentPack)
|
else if (isContentPack && string.IsNullOrWhiteSpace(this.ContentPackFor!.UniqueID))
|
||||||
{
|
{
|
||||||
// invalid content pack ID
|
error = $"manifest declares {nameof(IManifest.ContentPackFor)} without its required {nameof(IManifestContentPackFor.UniqueID)} field.";
|
||||||
if (string.IsNullOrWhiteSpace(this.ContentPackFor!.UniqueID))
|
return false;
|
||||||
{
|
|
||||||
error = $"manifest declares {nameof(IManifest.ContentPackFor)} without its required {nameof(IManifestContentPackFor.UniqueID)} field.";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate required fields
|
// validate required fields
|
||||||
|
|
Loading…
Reference in New Issue