Table of Contents

Class FeaturePatch<TFeature>

Namespace
MonkeyLoader.Patching
Assembly
MonkeyLoader.dll

Specifies how much a (pre-)patcher affects a particular Feature.

public sealed class FeaturePatch<TFeature> : IFeaturePatch, IEquatable<IFeaturePatch>, IComparable<IFeaturePatch> where TFeature : Feature, new()

Type Parameters

TFeature

The patched game feature.

Inheritance
FeaturePatch<TFeature>
Implements
Inherited Members

Constructors

FeaturePatch(PatchCompatibility)

Creates a new feature patch with the given PatchCompatibility.

public FeaturePatch(PatchCompatibility patchCompatibility)

Parameters

patchCompatibility PatchCompatibility

How compatible the patch is with others.

Properties

Compatibility

Gets how compatible the patch is with others.

public PatchCompatibility Compatibility { get; }

Property Value

PatchCompatibility

Feature

Gets the affected feature.

public TFeature Feature { get; }

Property Value

TFeature

Methods

CompareTo(IFeaturePatch?)

Compares the impact of this patch to another. Uses AscendingComparer: higher impact first.

public int CompareTo(IFeaturePatch? other)

Parameters

other IFeaturePatch

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes other in the sort order. Zero This instance occurs in the same position in the sort order as other. Greater than zero This instance follows other in the sort order.

Equals(IFeaturePatch?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(IFeaturePatch? other)

Parameters

other IFeaturePatch

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.