/********* ** Public methods *********/ /// <summary>Construct an instance.</summary> /// <param name="patch">The patch to represent.</param> public PatchInfo(DisabledPatch patch) : this(patch.Path, patch.RawType, patch.ParsedType) { this.RawTargetAsset = patch.AssetName; this.ContentPack = patch.ContentPack; this.State = new ContextualState().AddErrors(patch.ReasonDisabled); }
/********* ** Public methods *********/ /// <summary>Construct an instance.</summary> /// <param name="patch">The patch to represent.</param> public PatchInfo(DisabledPatch patch) { this.ShortName = this.GetShortName(patch.ContentPack, patch.LogName); this.Type = patch.Type; this.RawAssetName = patch.AssetName; this.ParsedAssetName = null; this.ParsedConditions = null; this.ContentPack = patch.ContentPack; this.IsLoaded = false; this.MatchesContext = false; this.IsApplied = false; this.ReasonDisabled = patch.ReasonDisabled; }
/********* ** Public methods *********/ /// <summary>Construct an instance.</summary> /// <param name="patch">The patch to represent.</param> public PatchInfo(DisabledPatch patch) : this( path : patch.Path, rawType : patch.RawType, parsedType : patch.ParsedType, conditions : Array.Empty <Condition>(), matchesContext : false, state : new ContextualState().AddErrors(patch.ReasonDisabled), contentPack : patch.ContentPack ) { this.RawTargetAsset = patch.AssetName; }
/********* ** Public methods *********/ /// <summary>Construct an instance.</summary> /// <param name="patch">The patch to represent.</param> public PatchInfo(DisabledPatch patch) { this.ShortName = this.GetShortName(patch.ContentPack, patch.LogName); this.Type = patch.Type; this.RawTargetAsset = patch.AssetName; this.ParsedTargetAsset = null; this.ParsedConditions = null; this.ContentPack = patch.ContentPack; this.IsLoaded = false; this.MatchesContext = false; this.IsApplied = false; this.State = new ContextualState().AddErrors(patch.ReasonDisabled); }
/// <summary>Add a patch that's permanently disabled for this session.</summary> /// <param name="patch">The patch to add.</param> public void AddPermanentlyDisabled(DisabledPatch patch) { this.PermanentlyDisabledPatches.Add(patch); }