Table of Contents

Class TuningPackageOverride

Namespace
LlamaLogic.TuningArchive
Assembly
LlamaLogic.TuningArchive.dll

Represents a mod's override of a game tuning, and what a game version means for it

public sealed class TuningPackageOverride
Inheritance
TuningPackageOverride
Inherited Members

Properties

Base

Gets the snapshot whose version of the tuning the mod was made from: the one the creator declared (see BaseIsDeclared), or else the one with the fewest differences from the override (see BaseIsAmbiguous), the newest with that version

public TuningArchiveSnapshot? Base { get; }

Property Value

TuningArchiveSnapshot

BaseDisagrees

Gets whether the base is the version the creator said the package was last updated for, but another version of the tuning is closer to the override

public bool BaseDisagrees { get; }

Property Value

bool

BaseDistance

Gets the number of differences between BaseText and ModText

public int BaseDistance { get; }

Property Value

int

BaseIsAmbiguous

Gets whether a version of the tuning with different content is as close to the override as the base (the base is the oldest such version, so that a change the game also made shows as a conflict)

public bool BaseIsAmbiguous { get; }

Property Value

bool

BaseIsDeclared

Gets whether the base is the version the creator said the package was last updated for, rather than inferred

public bool BaseIsDeclared { get; }

Property Value

bool

BaseIsUncertain

Gets whether the base may not be what the mod was made from: it was inferred and is ambiguous or may be older than the archive, or it was declared and another version is closer

public bool BaseIsUncertain { get; }

Property Value

bool

BaseMayBeOlder

Gets whether the mod may have been made from a version older than any in the archive: the archive's oldest snapshot already has the base's version of the tuning, and the override differs from it

public bool BaseMayBeOlder { get; }

Property Value

bool

Remarks

When it was, some of what look like the mod's changes are the game's changes since that older version, undone, and a merge carries them forward as if the mod had made them.

BaseText

Gets the base's version of the tuning (canonical text, see TuningXml)

public string? BaseText { get; }

Property Value

string

GameEntry

Gets the tuning in the game's new version

public TuningArchiveEntry? GameEntry { get; }

Property Value

TuningArchiveEntry

GameText

Gets the game's new version of the tuning (canonical text)

public string? GameText { get; }

Property Value

string

Key

Gets the key of the override in the package

public ResourceKey Key { get; }

Property Value

ResourceKey

Merge

Gets the merge of the mod's changes onto the game's new version, with every conflict resolved as the game's version, if the game changed the tuning since the base

public TuningMergeResult? Merge { get; }

Property Value

TuningMergeResult

Message

Gets what the outcome means, for the creator

public string Message { get; }

Property Value

string

ModText

Gets the override (canonical text), if it could be read

public string? ModText { get; }

Property Value

string

Name

Gets the name of the tuning

public string? Name { get; }

Property Value

string

Outcome

Gets what the game's new version means for the override

public TuningPackageOverrideOutcome Outcome { get; }

Property Value

TuningPackageOverrideOutcome

SimData

Gets whether the mod's SimData for the override is what the tuning in GetRecommendedTuning() needs, if SimData was checked

public TuningPackageSimDataState SimData { get; }

Property Value

TuningPackageSimDataState

SimDataMessage

Gets what SimData means, for the creator

public string? SimDataMessage { get; }

Property Value

string

Methods

Remerge(Func<TuningMergeConflict, TuningMergeChoice>)

Merges the mod's changes onto the game's new version again, resolving each conflict as resolve says

public TuningMergeResult Remerge(Func<TuningMergeConflict, TuningMergeChoice> resolve)

Parameters

resolve Func<TuningMergeConflict, TuningMergeChoice>

Returns

TuningMergeResult

Exceptions

InvalidOperationException

The game did not change the tuning since the base, so there is nothing to merge

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.