Class AcquisitionValidator
- Namespace
- SurvivorsMaker.Run
- Assembly
- SurvivorsMaker.Run.dll
Pure preflight shared by generation and execution. Definition identity stays reference based.
public sealed class AcquisitionValidator : IAcquisitionValidator
- Inheritance
-
AcquisitionValidator
- Implements
- Inherited Members
Constructors
AcquisitionValidator()
public AcquisitionValidator()
Methods
Check(RunState, OfferCandidate, OfferChannel, bool, IReadOnlyList<OfferCandidate>, out AcquisitionPlan)
Checks channel eligibility, bans, ownership and capacity without changing the run; returns a destination plan when valid.
public OfferFailure Check(RunState run, OfferCandidate candidate, OfferChannel channel, bool generating, IReadOnlyList<OfferCandidate> reservations, out AcquisitionPlan plan)
Parameters
runRunStatecandidateOfferCandidatechannelOfferChannelgeneratingboolreservationsIReadOnlyList<OfferCandidate>planAcquisitionPlan
Returns
CheckMerge(RunState, int, int, out AcquisitionPlan)
Validates two owned weapon indices and their merge destination without changing inventory.
public RunResult CheckMerge(RunState run, int first, int second, out AcquisitionPlan plan)
Parameters
runRunStatefirstintsecondintplanAcquisitionPlan
Returns
Eligibility(RunState, OfferCandidate, OfferChannel, bool)
Checks candidate channel, availability and bans without checking a destination or mutating the run.
public static OfferFailure Eligibility(RunState run, OfferCandidate candidate, OfferChannel channel, bool legacyShopPurchase = false)
Parameters
runRunStatecandidateOfferCandidatechannelOfferChannellegacyShopPurchasebool
Returns
Has(IReadOnlyList<string>, string)
Tests exact string membership without allocating a candidate set.
public static bool Has(IReadOnlyList<string> values, string value)
Parameters
valuesIReadOnlyList<string>valuestring
Returns
Intersects(IReadOnlyList<string>, IReadOnlyList<string>)
Tests whether two lists share a nonempty case-sensitive value.
public static bool Intersects(IReadOnlyList<string> first, IReadOnlyList<string> second)
Parameters
firstIReadOnlyList<string>secondIReadOnlyList<string>
Returns
Kind(WeaponItemDef)
Resolves a weapon pool kind from its explicit override or combat kind.
public static WeaponPoolKind Kind(WeaponItemDef weapon)
Parameters
weaponWeaponItemDef
Returns
Result(OfferFailure)
Maps a pool rejection category to the public run-operation result.
public static RunResult Result(OfferFailure failure)
Parameters
failureOfferFailure