mirror of
https://github.com/FalloutCollaborationProject/FCP-Tools.git
synced 2026-07-27 16:59:37 -07:00
Introduce a new scenario settings tab with configurable starting year support and optional "start enlisted" scenario behavior, including updated scenario defs and opening text tokens. This also folds enlist settings into the main mod settings flow, adds quest and unique-character helpers for companion spawns and join quests, and includes smaller gameplay patches like NCR tent handling, Legion ear butcher drops, and quieter homing projectile logging.
29 lines
726 B
C#
29 lines
726 B
C#
namespace FCP.Core;
|
|
|
|
[UsedImplicitly]
|
|
public class CharacterTraitsDefinition : CharacterBaseDefinition
|
|
{
|
|
public Dictionary<TraitDef, int> traits = new Dictionary<TraitDef, int>();
|
|
|
|
public override bool AppliesPreGeneration => false;
|
|
public override bool AppliesPostGeneration => !traits.NullOrEmpty();
|
|
|
|
public override void ApplyToPawn(Pawn pawn)
|
|
{
|
|
if (pawn.story?.traits == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
foreach (KeyValuePair<TraitDef, int> trait in traits)
|
|
{
|
|
if (pawn.story.traits.HasTrait(trait.Key))
|
|
{
|
|
continue;
|
|
}
|
|
|
|
pawn.story.traits.GainTrait(new Trait(trait.Key, trait.Value));
|
|
}
|
|
}
|
|
}
|