コード例 #1
0
 private void ShipComponentDescriber_TestDesignInputs(TechDesignInputDescription inputDesc, DesignInputTypeEnum expectedType, TechDesignInternalEnum expectedInternal, string expectedDesc)
 {
     Assert.AreEqual(expectedType, inputDesc.Type);
     Assert.AreEqual(expectedInternal, inputDesc.InternalName);
     Assert.AreEqual(expectedDesc, inputDesc.Description);
     Assert.IsNotNull(inputDesc.IsEnabled);
     Assert.IsNotNull(inputDesc.AllowedValues);
     Assert.IsNotNull(inputDesc.OnValueChanged);
     Assert.IsNotNull(inputDesc.PreCompleteDesign);
     Assert.IsNotNull(inputDesc.TooltipInfo);
 }
        public static TechDesignInputDescription Get()
        {
            var result = new TechDesignInputDescription()
            {
                Type         = DesignInputTypeEnum.Choice,
                InternalName = TechDesignInternalEnum.ThermalReductionMod,
                Description  = "Thermal Reduction Modifier",
            };

            result.AllowedValues     = new Func <object, object>(input => AllowedValues(input));
            result.IsEnabled         = new Func <object, bool>(input => IsEnabled(input));
            result.OnValueChanged    = new Func <object, object>(input => OnValueChanged(input));
            result.PreCompleteDesign = new Func <object, object>(input => PreCompleteDesign(input));
            result.TooltipInfo       = new Func <object, string>(input => TooltipInfo(input));

            return(result);
        }
コード例 #3
0
        public static TechDesignInputDescription Get()
        {
            var result = new TechDesignInputDescription()
            {
                Type         = DesignInputTypeEnum.Number,
                InternalName = TechDesignInternalEnum.SizeInHS,
                Description  = "Component Size",
            };

            result.AllowedValues     = new Func <object, object>(input => AllowedValues(input));
            result.IsEnabled         = new Func <object, bool>(input => IsEnabled(input));
            result.OnValueChanged    = new Func <object, object>(input => OnValueChanged(input));
            result.PreCompleteDesign = new Func <object, object>(input => PreCompleteDesign(input));
            result.TooltipInfo       = new Func <object, string>(input => TooltipInfo(input));

            return(result);
        }
コード例 #4
0
        public static TechDesignInputDescription Get()
        {
            var result = new TechDesignInputDescription()
            {
                Type         = DesignInputTypeEnum.Choice,
                InternalName = TechDesignInternalEnum.BreakdownChangeOnActiveUse,
                Description  = "Active use Breakdown Chance",
            };

            result.AllowedValues     = new Func <object, object>(input => AllowedValues(input));
            result.IsEnabled         = new Func <object, bool>(input => IsEnabled(input));
            result.OnValueChanged    = new Func <object, object>(input => OnValueChanged(input));
            result.PreCompleteDesign = new Func <object, object>(input => PreCompleteDesign(input));
            result.TooltipInfo       = new Func <object, string>(input => TooltipInfo(input));

            return(result);
        }