Exemplo n.º 1
0
        public ConfigNode AsConfigNode()
        {
            ConfigNode node = new ConfigNode("KCT_Preset");

            node.AddValue("name", Name);
            node.AddValue("shortName", ShortName);
            node.AddValue("description", Description);
            node.AddValue("author", Author);

            node.AddValue("allowDeletion", AllowDeletion);

            node.AddValue("career", CareerEnabled);
            node.AddValue("science", ScienceEnabled);
            node.AddValue("sandbox", SandboxEnabled);

            node.AddNode(GeneralSettings.AsConfigNode());
            node.AddNode(TimeSettings.AsConfigNode());

            ConfigNode fNode = FormulaSettings.AsConfigNode();

            if (FormulaSettings.YearBasedRateMult != null)
            {
                ConfigNode rateNode = fNode.AddNode("YearBasedRateMult");
                FormulaSettings.YearBasedRateMult.Save(rateNode);
            }
            node.AddNode(fNode);

            node.AddNode(PartVariables.AsConfigNode());
            return(node);
        }
Exemplo n.º 2
0
        public ConfigNode AsConfigNode()
        {
            ConfigNode node = new ConfigNode("KCT_Preset");

            node.AddValue("name", name);
            node.AddValue("shortName", shortName);
            node.AddValue("description", description);
            node.AddValue("author", author);

            node.AddValue("allowDeletion", AllowDeletion);

            node.AddValue("career", CareerEnabled);
            node.AddValue("science", ScienceEnabled);
            node.AddValue("sandbox", SandboxEnabled);

            node.AddNode(generalSettings.AsConfigNode());
            node.AddNode(timeSettings.AsConfigNode());
            node.AddNode(formulaSettings.AsConfigNode());
            return(node);
        }