Skip to main content

RuleOptionSet

A class in Root.Township, Alta.PAGaC.

A PAGaC asset tying a rule to the parts it can place. Each part, and each nested option set, is rolled against its weight.

Constructors​

MemberWhat it is
RuleOptionSet()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

5 private and internal fields
MemberWhat it is
private bool isWeightingIndividualBacking field for IsWeightingIndividual.
private LockMode lockModeBacking field for LockMode.
private PartChance[] partsParts with their chances.
private Rule ruleBacking field for Rule.
private RuleOptionSetChance[] ruleOptionSetsNested option sets with their chances.

Properties​

MemberWhat it is
bool IsWeightingIndividual { get; }Serialized flag; not read anywhere in this build.
LockMode LockMode { get; }The lock mode set on the asset; not read anywhere in this build.
Rule Rule { get; }The rule these options apply to.

Methods​

MemberWhat it is
void Evaluate(List<Part> results)Adds each part that passes its random weight roll to the list, then evaluates nested option sets that pass theirs.

Used in​

Members of other types that take, return or hold a RuleOptionSet: