예제 #1
0
 static float ApparelScoreAutoWorkPriorities(Pawn pawn, Apparel apparel)
 {
     return(WorkPriorities.WorktypeStatPriorities(pawn)
            .Select(sp => (apparel.def.equippedStatOffsets.GetStatOffsetFromList(sp.Stat)
                           + apparel.GetStatValue(sp.Stat)
                           - sp.Stat.defaultBaseValue) * sp.Weight)
            .Sum());              // NOTE: weights were already normalized to sum to 1.
 }
 public WorkPriorities(World world) : base(world)
 {
     _instance = this;
     Log.Message("WorldComponent created!");
 }