private static void Postfix(MinionStartingStats __instance) { var name = __instance.NameStringKey; var state = EndpointState.Load(); if (state.times_rescued.ContainsKey(name)) { int count = state.times_rescued[name]; var trait = new Klei.AI.Trait("Rescued", "Rescued", "A previous iteration of this duplicant visited the great printing pod in the sky (x" + count + ").", 0, true, null, true, true); foreach (var attribute in TUNING.DUPLICANTSTATS.DISTRIBUTED_ATTRIBUTES) { trait.Add(new Klei.AI.AttributeModifier(attribute, state.times_rescued[name], "Rescued x" + count)); } __instance.Traits.Add(trait); } }
public static bool IsSupportedTrait(Klei.AI.Trait trait) => IsSupportedTrait(trait.Id);