Пример #1
0
        protected void SetBustMuscleSliders(SimDescription newSim)
        {
            bool changed = false;

            using (CASParts.OutfitBuilder builder = new CASParts.OutfitBuilder(newSim, CASParts.sPrimary))
            {
                if (!builder.OutfitValid)
                {
                    return;
                }

                if (newSim.IsFemale)
                {
                    Vector2 bustRange = Manager.GetValue <BustRangeOption <TManager>, Vector2>();
                    if (bustRange.x != bustRange.y)
                    {
                        float value = RandomUtil.GetFloat(bustRange.x, bustRange.y);

                        NormalMap.ApplyBustValue(builder.Builder, value);
                        changed = true;

                        mStats.AddScoring("Bust 100s", (int)(value * 100));
                    }
                }
                else
                {
                    Vector2 muscleRange = Manager.GetValue <MuscleRangeOption <TManager>, Vector2>();
                    if (muscleRange.x != muscleRange.y)
                    {
                        float value = RandomUtil.GetFloat(muscleRange.x, muscleRange.y);

                        NormalMap.ApplyMuscleValue(builder.Builder, value);
                        changed = true;

                        mStats.AddScoring("Muscle 100s", (int)(value * 100));
                    }
                }
            }

            if (changed)
            {
                new SavedOutfit.Cache(newSim).PropagateGenetics(newSim, CASParts.sPrimary);
            }
        }
Пример #2
0
 protected override void ApplyValue(SimBuilder builder, float value)
 {
     NormalMap.ApplyMuscleValue(builder, value);
 }