internal static object GetUnlockedTechState()
        {
            StringBuilder builder = StringBuilderCache.Acquire();

            foreach (string unlockedTechType in unlockedTech.Keys)
            {
                if (builder.Length != 0)
                {
                    builder.Append("|");
                }
                builder.Append(unlockedTechType);
                builder.Append("|");
                builder.Append(unlockedTech[unlockedTechType]);
            }
            string state = builder.ToStringAndRelease();

            ProceduralAvionicsUtils.Log("Unlocked Tech state:", state);
            return(state);
        }
Exemplo n.º 2
0
        public override void OnLoad(ConfigNode node)
        {
            ProceduralAvionicsUtils.Log("ScenarioModule onload");
            base.OnLoad(node);

            ConfigNode n = node.GetNode(UNLOCKED_TECH_NODE_NAME);

            string serialized = "";

            if (n != null)
            {
                string param = n.GetValue(UNLOCKED_TECH_STATE);
                if (param != null)
                {
                    serialized = param;
                }
            }
            ProceduralAvionicsUtils.Log("setting unlocked state: ", serialized);
            ProceduralAvionicsTechManager.SetUnlockedTechState(serialized);
        }