private static void LoadFacilities(ConfigNode facilityNodes)
        {
            foreach (StaticInstance instance in StaticDatabase.allStaticInstances)
            {
                if (!instance.hasFacilities || instance.myFacilities.Count == 0)
                {
                    continue;
                }

                if (!facilityNodes.HasNode(CareerUtils.KeyFromString(instance.RadialPosition.ToString())))
                {
                    Log.UserWarning("No entry foud in savegame: " + instance.gameObject.name);
                    continue;
                }

                ConfigNode instanceNode = facilityNodes.GetNode(CareerUtils.KeyFromString(instance.RadialPosition.ToString()));
                foreach (var facNode in instanceNode.GetNodes())
                {
                    int index = int.Parse(facNode.GetValue("Index"));
                    if (instance.myFacilities[index].FacilityType == facNode.name)
                    {
                        //Log.Normal("Load State: " + instance.pqsCity.name + " : "  + facNode.name);
                        instance.myFacilities[index].LoadCareerConfig(facNode);
                    }
                    else
                    {
                        Log.UserError("Facility Index Missmatch in fac: " + instance.gameObject.name);
                    }
                }
            }
        }
        /// <summary>
        /// saves the facility settings to the cfg file
        /// </summary>
        internal static void SaveFacilities(ConfigNode facilityNodes)
        {
            foreach (StaticInstance instance in StaticDatabase.GetAllStatics())
            {
                if (!instance.hasFacilities)
                {
                    continue;
                }

                ConfigNode instanceNode = facilityNodes.AddNode(CareerUtils.KeyFromString(instance.RadialPosition.ToString()));
                instanceNode.SetValue("FacilityName", instance.gameObject.name, true);
                instanceNode.SetValue("FacilityType", instance.facilityType.ToString(), true);

                for (int i = 0; i < instance.myFacilities.Count; i++)
                {
                    ConfigNode facnode = instanceNode.AddNode(instance.myFacilities[i].FacilityType);
                    facnode.SetValue("Index", i, true);
                    instance.myFacilities[i].SaveCareerConfig(facnode);
                }
            }
        }