Ejemplo n.º 1
0
        private void ApplyChanges()
        {
            MASConfig.VerboseLogging                = verboseLogging;
            MASConfig.LuaUpdatePriority             = luaUpdatePriority;
            MASConfig.CameraTextureScale            = cameraTextureScale;
            MASConfig.navigation.generalPropagation = generalPropagation;
            MASConfig.navigation.NDBPropagation     = NDBPropagation;
            MASConfig.navigation.VORPropagation     = VORPropagation;
            MASConfig.navigation.DMEPropagation     = DMEPropagation;

            MASLoader.UpdateHorizonDistance();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Read our config settings, setting defaults where needed.
        /// </summary>
        /// <param name="node"></param>
        public override void OnLoad(ConfigNode node)
        {
            if (!node.TryGetValue("VerboseLogging", ref VerboseLogging))
            {
                VerboseLogging = true;
            }

            if (!node.TryGetValue("HideGui", ref HideGui))
            {
                HideGui = false;
            }

            if (!node.TryGetValue("ElectricCharge", ref ElectricCharge))
            {
                ElectricCharge = "ElectricCharge";
            }

            if (!node.TryGetValue("LuaUpdatePriority", ref LuaUpdatePriority))
            {
                LuaUpdatePriority = 1;
            }

            if (!node.TryGetValue("CameraTextureScale", ref CameraTextureScale))
            {
                CameraTextureScale = 0;
            }

            if (!node.TryGetValue("GeneralPropagation", ref navigation.generalPropagation))
            {
                navigation.generalPropagation = 2.0f;
            }

            if (!node.TryGetValue("NDBPropagation", ref navigation.NDBPropagation))
            {
                navigation.NDBPropagation = 1.0f;
            }

            if (!node.TryGetValue("VORPropagation", ref navigation.VORPropagation))
            {
                navigation.VORPropagation = 1.2f;
            }

            if (!node.TryGetValue("DMEPropagation", ref navigation.DMEPropagation))
            {
                navigation.DMEPropagation = 1.4f;
            }

            MASLoader.UpdateHorizonDistance();
        }