示例#1
0
 internal void ApplyLimit(TechLimit limit)
 {
     if (limit.diameterMin < diameterMin)
     {
         diameterMin = limit.diameterMin;
     }
     if (limit.diameterMax > diameterMax)
     {
         diameterMax = limit.diameterMax;
     }
     if (limit.lengthMin < lengthMin)
     {
         lengthMin = limit.lengthMin;
     }
     if (limit.lengthMax > lengthMax)
     {
         lengthMax = limit.lengthMax;
     }
     if (limit.volumeMax > volumeMax)
     {
         volumeMax = limit.volumeMax;
     }
     if (limit.allowCurveTweaking)
     {
         allowCurveTweaking = true;
     }
 }
        private void LoadTechLimits(ConfigNode node)
        {
            List<TechLimit> techLimits = new List<TechLimit>();
            foreach (ConfigNode tNode in node.GetNodes("TECHLIMIT"))
            {
                TechLimit limit = new TechLimit();
                limit.Load(tNode);
                techLimits.Add(limit);
            }
            if (techLimits.Count == 0)
                return;

            techLimitsSerialized = ObjectSerializer.Serialize(techLimits);
        }