コード例 #1
0
 void GridsInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sGridSection, "NoFollow", ref sNoFollow, true);
     iNIHolder.GetValue(sGridSection, "BlockIgnore", ref sBlockIgnore, true);
     iNIHolder.GetValue(sGridSection, "OrientationBlockContains", ref sOrientationBlockContains, true);
     iNIHolder.GetValue(sGridSection, "OrientationBlockNamed", ref sOrientationBlockNamed, true);
 }
コード例 #2
0
 void LoggingInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sLoggingSection, "TextPanelReport", ref sTextPanelReport, true);
     iNIHolder.GetValue(sLoggingSection, "StatusName", ref sStatusName, true);
     iNIHolder.GetValue(sLoggingSection, "LongStatus", ref sLongStatus, true);
     iNIHolder.GetValue(sLoggingSection, "RangeReport", ref sRangeReport, true);
 }
コード例 #3
0
 void OrbitalDeserialize(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sOrbitalSection, "vOrbitalLaunch", ref vOrbitalLaunch, true);
     iNIHolder.GetValue(sOrbitalSection, "ValidOrbitalLaunch", ref bValidOrbitalLaunch, true);
     iNIHolder.GetValue(sOrbitalSection, "vOrbitalHome", ref vOrbitalHome, true);
     iNIHolder.GetValue(sOrbitalSection, "ValidOrbitalHome", ref bValidOrbitalHome, true);
 }
コード例 #4
0
 void GyroInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sGridSection, "GyroIgnore", ref sGyroIgnore, true);
     iNIHolder.GetValue(sGridSection, "LIMIT_GYROS", ref LIMIT_GYROS, true);
     iNIHolder.GetValue(sGridSection, "LEAVE_GYROS", ref LEAVE_GYROS, true);
     iNIHolder.GetValue(sGridSection, "CTRL_COEFF", ref CTRL_COEFF, true);
 }
コード例 #5
0
 void NavInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sNavSection, "DTMDebug", ref dTMDebug, true);
     iNIHolder.GetValue(sNavSection, "CameraCollision", ref dTMUseCameraCollision, true);
     iNIHolder.GetValue(sNavSection, "SensorCollision", ref dTMUseSensorCollision, true);
     iNIHolder.GetValue(sNavSection, "NAVEmulateOld", ref NAVEmulateOld, true);
     iNIHolder.GetValue(sNavSection, "NAVGravityMinElevation", ref NAVGravityMinElevation, true);
 }
コード例 #6
0
 void MiningInitCustomData(INIHolder iNIHolder)
 {
     //           iNIHolder.GetValue(sMiningSection, "cargopcthighwater", ref cargopcthighwater, true);
     //            iNIHolder.GetValue(sMiningSection, "cargopctlowwater", ref cargopctlowwater, true);
     iNIHolder.GetValue(sMiningSection, "TargetMiningMps", ref fTargetMiningMps, true);
     iNIHolder.GetValue(sMiningSection, "MiningAbortMps", ref fMiningAbortMps, true);
     iNIHolder.GetValue(sMiningSection, "MiningMinThrust", ref fMiningMinThrust, true);
     iNIHolder.GetValue(sMiningSection, "AsteroidApproachMps", ref fAsteroidApproachMps, true);
     iNIHolder.GetValue(sMiningSection, "AsteroidApproachAbortMps", ref fAsteroidApproachAbortMps, true);
 }
コード例 #7
0
        void NavDeserialize(INIHolder iNIHolder)
        {
//            iNIHolder.GetValue(sNavSection, "vNavLaunch", ref vNavLaunch, true);
//            iNIHolder.GetValue(sNavSection, "ValidNavLaunch", ref bValidNavLaunch, true);
            iNIHolder.GetValue(sNavSection, "vTarget", ref vNavTarget, true);
            iNIHolder.GetValue(sNavSection, "ValidNavTarget", ref bValidNavTarget, true);

            iNIHolder.GetValue(sNavSection, "dStartShip", ref dtNavStartShip, true);
            iNIHolder.GetValue(sNavSection, "shipSpeedMax", ref shipSpeedMax, true);
            iNIHolder.GetValue(sNavSection, "arrivalDistanceMin", ref arrivalDistanceMin, true);
        }
コード例 #8
0
        void MiningDeserialize(INIHolder iNIHolder)
        {
            iNIHolder.GetValue(sMiningSection, "vLastContact", ref vLastAsteroidContact, true);
            iNIHolder.GetValue(sMiningSection, "vTargetAsteroid", ref vTargetAsteroid, true);
            iNIHolder.GetValue(sMiningSection, "vLastExit", ref vLastAsteroidExit, true);
            iNIHolder.GetValue(sMiningSection, "vExpectedExit", ref vExpectedAsteroidExit, true);
            iNIHolder.GetValue(sMiningSection, "vInitialContact", ref vInitialAsteroidContact, true);
            iNIHolder.GetValue(sMiningSection, "vInitialExit", ref vInitialAsteroidContact, true);

            iNIHolder.GetValue(sMiningSection, "ValidAsteroid", ref bValidAsteroid, true);
            iNIHolder.GetValue(sMiningSection, "ValidInitialContact", ref bValidInitialAsteroidContact, true);
            iNIHolder.GetValue(sMiningSection, "ValidInitialExit", ref bValidInitialAsteroidExit, true);

            iNIHolder.GetValue(sMiningSection, "miningAsteroidID", ref miningAsteroidID, true);
        }
コード例 #9
0
        void MiningInitCustomData(INIHolder iNIHolder)
        {
            iNIHolder.GetValue(sMiningSection, "TargetMiningMps", ref fTargetMiningMps, true);
            iNIHolder.GetValue(sMiningSection, "MiningAbortMps", ref fMiningAbortMps, true);
            iNIHolder.GetValue(sMiningSection, "MiningMinThrust", ref fMiningMinThrust, true);
            iNIHolder.GetValue(sMiningSection, "AsteroidApproachMps", ref fAsteroidApproachMps, true);
            iNIHolder.GetValue(sMiningSection, "AsteroidApproachAbortMps", ref fAsteroidApproachAbortMps, true);

            iNIHolder.GetValue(sMiningSection, "Cargopcthighwater", ref MiningCargopcthighwater, true);
            iNIHolder.GetValue(sMiningSection, "Cargopctlowater", ref MiningCargopctlowwater, true);

            iNIHolder.GetValue(sMiningSection, "MiningBoreHeight", ref MiningBoreHeight, true);
            iNIHolder.GetValue(sMiningSection, "MiningBoreWidth", ref MiningBoreWidth, true);
        }
コード例 #10
0
        void ProcessInitCustomData(bool bForceWrite = false)
        {
            INIHolder iniCustomData = new INIHolder(this, Me.CustomData);

            iniCustomData.GetValue(sMainSection, "EchoOn", ref bEchoOn, true);
            iniCustomData.GetValue(sMainSection, "DebugUpdate", ref bDebugUpdate, true);

            WorldInitCustomData(iniCustomData);
            GridsInitCustomData(iniCustomData);
            LoggingInitCustomData(iniCustomData);
            TimersInitCustomData(iniCustomData);

            ModuleInitCustomData(iniCustomData);
            if (iniCustomData.IsDirty || bForceWrite)
            {
                Me.CustomData = iniCustomData.GenerateINI(true);
            }
        }
コード例 #11
0
        void DockingDeserialize(INIHolder iNIHolder)
        {
            iNIHolder.GetValue(sDockingSection, "vDock", ref vDock, true);
            iNIHolder.GetValue(sDockingSection, "ValidDock", ref bValidDock, true);
            iNIHolder.GetValue(sDockingSection, "vLaunch1", ref vLaunch1, true);
            iNIHolder.GetValue(sDockingSection, "bValidLaunch1", ref bValidLaunch1, true);
            iNIHolder.GetValue(sDockingSection, "vHome", ref vHome, true);
            iNIHolder.GetValue(sDockingSection, "bValidHome", ref bValidHome, true);

            iNIHolder.GetValue(sDockingSection, "TargetBase", ref lTargetBase, true);
            iNIHolder.GetValue(sDockingSection, "ActionStart", ref dtDockingActionStart);
        }
コード例 #12
0
 void AirVentInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sGridSection, "AirVentHangar", ref sAirVentHangar, true);
     iNIHolder.GetValue(sGridSection, "AirVentOutside", ref sAirVentOutside, true);
     iNIHolder.GetValue(sGridSection, "AirVentBridge", ref sAirVentBridge, true);
     iNIHolder.GetValue(sGridSection, "AirVentCrew", ref sAirVentCrew, true);
     iNIHolder.GetValue(sGridSection, "AirVentIsolated", ref sAirVentIsolated, true);
     iNIHolder.GetValue(sGridSection, "AirVentAirlock", ref sAirVentAirlock, true);
     iNIHolder.GetValue(sGridSection, "AirVentCockpit", ref sAirVentCockpit, true);
 }
コード例 #13
0
        void MiningDeserialize(INIHolder iNIHolder)
        {
            if (iNIHolder == null)
            {
                return;
            }

            /*
             * iNIHolder.GetValue(sMiningSection, "vLastContact", ref vLastAsteroidContact, true);
             * iNIHolder.GetValue(sMiningSection, "vTargetAsteroid", ref vTargetAsteroid, true);
             * iNIHolder.GetValue(sMiningSection, "vLastExit", ref vLastAsteroidExit, true);
             * iNIHolder.GetValue(sMiningSection, "vExpectedExit", ref vExpectedAsteroidExit, true);
             * iNIHolder.GetValue(sMiningSection, "vInitialContact", ref vInitialAsteroidContact, true);
             * iNIHolder.GetValue(sMiningSection, "vInitialExit", ref vInitialAsteroidContact, true);
             *
             * iNIHolder.GetValue(sMiningSection, "ValidAsteroid", ref bValidAsteroid, true);
             * iNIHolder.GetValue(sMiningSection, "ValidInitialContact", ref bValidInitialAsteroidContact, true);
             * iNIHolder.GetValue(sMiningSection, "ValidInitialExit", ref bValidInitialAsteroidExit, true);
             */
            iNIHolder.GetValue(sMiningSection, "miningAsteroidID", ref miningAsteroidID, true);

            iNIHolder.GetValue(sMiningSection, "AsteroidCurrentX", ref AsteroidCurrentX, true);
            iNIHolder.GetValue(sMiningSection, "AsteroidCurrentY", ref AsteroidCurrentY, true);
            iNIHolder.GetValue(sMiningSection, "AsteroidBoreStart", ref vAsteroidBoreStart, true);
            iNIHolder.GetValue(sMiningSection, "AsteroidBoreEnd", ref vAsteroidBoreEnd, true);
            iNIHolder.GetValue(sMiningSection, "AsteroidMineMode", ref AsteroidMineMode, true);
        }
コード例 #14
0
 void DoorInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sGridSection, "DoorHangar", ref sDoorHangar, true);
     iNIHolder.GetValue(sGridSection, "DoorBay", ref sDoorBay, true);
     iNIHolder.GetValue(sGridSection, "DoorAirlock", ref sDoorAirlock, true);
     iNIHolder.GetValue(sGridSection, "DoorAirlockOutside", ref sDoorAirlockOutside, true);
     iNIHolder.GetValue(sGridSection, "DoorAirlockInside", ref sDoorAirlockInside, true);
     iNIHolder.GetValue(sGridSection, "DoorBridge", ref sDoorBridge, true);
 }
コード例 #15
0
 void DockedDeserialize(INIHolder iNIHolder)
 {
     //TODO: remember docked connector
     iNIHolder.GetValue(sDockedSection, "AutoRelaunch", ref bAutoRelaunch, true);
     iNIHolder.GetValue(sDockedSection, "ActionStart", ref dtRelaunchActionStart);
     iNIHolder.GetValue(sDockedSection, "StaticValid", ref bStaticValid);
     iNIHolder.GetValue(sDockedSection, "StaticDock", ref vStaticDock);
     iNIHolder.GetValue(sDockedSection, "StaticLaunch", ref vStaticLaunch);
     iNIHolder.GetValue(sDockedSection, "StaticHome", ref vStaticHome);
 }
コード例 #16
0
 void NavInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sNavSection, "DTMDebug", ref dTMDebug, true);
     iNIHolder.GetValue(sNavSection, "CameraCollision", ref dTMUseCameraCollision, true);
     iNIHolder.GetValue(sNavSection, "SensorCollision", ref dTMUseSensorCollision, true);
     iNIHolder.GetValue(sNavSection, "NAVEmulateOld", ref NAVEmulateOld, true);
     iNIHolder.GetValue(sNavSection, "NAVGravityMinElevation", ref NAVGravityMinElevation, true);
     iNIHolder.GetValue(sNavSection, "NavBeaconDebug", ref bNavBeaconDebug, true);
     iNIHolder.GetValue(sNavSection, "AllowBlindNav", ref AllowBlindNav, true);
     if (shipSpeedMax > fMaxWorldMps)
     {
         shipSpeedMax = fMaxWorldMps;
     }
 }
コード例 #17
0
ファイル: MainInit.cs プロジェクト: bovan/WicoSpaceEngineers
        void ModuleInitCustomData(INIHolder iniCustomData)
        {
            //           INIHolder iniCustomData = new INIHolder(this, Me.CustomData);

            //            string sValue = "";
            ConnectorInitCustomData(iniCustomData);
            BaseInitCustomData(iniCustomData);
            CamerasInitCustomData(iniCustomData);
            iniCustomData.GetValue("PATROL", "AllowPatrol", ref bAllowPatrol, true);

            //            ThrustersInitCustomData(iniCustomData);

            /*
             * if (iniCustomData.IsDirty)
             * {
             *  Me.CustomData = iniCustomData.GenerateINI(true);
             * }
             */
        }
コード例 #18
0
        void initCustomData()
        {
            INIHolder iniCustomData = new INIHolder(this, Me.CustomData);

            string sValue = "";

            iniCustomData.GetValue(sTechnikerSection, "DoForwardScans", ref bDoForwardScans, true);
            iniCustomData.GetValue(sTechnikerSection, "CheckGasGens", ref bCheckGasGens, true);
            iniCustomData.GetValue(sTechnikerSection, "TechnikerCalcs", ref bTechnikerCalcs, true);
            iniCustomData.GetValue(sTechnikerSection, "GPSFromEntities", ref bGPSFromEntities, true);
            iniCustomData.GetValue(sTechnikerSection, "AirVents", ref bAirVents, true);

//            iniCustomData.GetValue(sTechnikerSection, "thrustignore", ref sIgnoreThruster, true);
            if (iniCustomData.GetValue(sTechnikerSection, "shipname", ref sValue))
            {
                OurName         = "Wico " + sValue;
                bGotAntennaName = true;
            }

            iniCustomData.GetValue(sTechnikerSection, "shortrangemax", ref shortRangeMax, true);
            iniCustomData.GetValue(sTechnikerSection, "longrangemax", ref longRangeMax, true);

            ThrustersInitCustomData(iniCustomData);
            SensorInitCustomData(iniCustomData);

            if (iniCustomData.IsDirty)
            {
                Me.CustomData = iniCustomData.GenerateINI(true);
            }

            if (bLongRange)
            {
                maxScan = longRangeMax;
            }
            else
            {
                maxScan = shortRangeMax;
            }
        }
コード例 #19
0
 void SensorInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sSensorSection, "SensorUse", ref sSensorUse, true);
     iNIHolder.GetValue(sSensorSection, "SensorSettleWaitMS", ref dSensorSettleWaitMS, true);
 }
コード例 #20
0
 void CommunicationsInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sAntennaSection, "CommunicationsStealth", ref CommunicationsStealth, false);
 }
コード例 #21
0
 void CamerasInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sCameraSection, "CameraViewOnly", ref sCameraViewOnly, true);
 }
コード例 #22
0
 void DockedInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sDockedSection, "AllowStaticDocking", ref bAllowStaticDock, true);
     iNIHolder.GetValue(sDockedSection, "LaunchMaxVelocity", ref LaunchMaxVelocity, true);
     iNIHolder.GetValue(sDockedSection, "LaunchDistance", ref LaunchDistance, true);
 }
コード例 #23
0
 void BaseInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sBaseSection, "BaseTransmitWait", ref dBaseTransmitWait, true);
 }
コード例 #24
0
        public Program()
        {
            doModuleConstructor();

            INIHolder iniCustomData = new INIHolder(this, Me.CustomData);

            iniCustomData.GetValue(sMainSection, "EchoOn", ref bEchoOn, true);
            iniCustomData.GetValue(sMainSection, "DebugUpdate", ref bDebugUpdate, true);
            iniCustomData.GetValue(sMainSection, "SubModules", ref bSupportSubModules, true);
            iniCustomData.GetValue(sMainSection, "SubmoduleTriggerWait", ref dSubmoduleTriggerWait, true);

            _oldEcho = Echo;
            Echo     = MyEcho;

            WorldInitCustomData(iniCustomData);
            GridsInitCustomData(iniCustomData);
            LoggingInitCustomData(iniCustomData);
            TimersInitCustomData(iniCustomData);

            ModuleInitCustomData(iniCustomData);
            if (iniCustomData.IsDirty)
            {
                Me.CustomData = iniCustomData.GenerateINI(true);
            }

            sBanner = OurName + ":" + moduleName + " V" + sVersion + " ";
            _oldEcho(sBanner + "Creator");

            initLogging();
            StatusLog("clear", textLongStatus, true);  // only MAIN module should clear long status on init.
            if (!doSubModuleTimerTriggers(sMainTimer)) // try to trigger MAIN timer in case it stopped.
            {
                // if no main timer, then use UpdateFrequency
                Runtime.UpdateFrequency |= UpdateFrequency.Update100;
            }
            //	if (!Me.CustomName.Contains(moduleName))
            //		Me.CustomName = "PB " + OurName+ " "+moduleName;
            if (!Me.Enabled)
            {
                Echo("I am turned OFF!");
            }

            IMyTextSurface mesurface0 = Me.GetSurface(0);

            mesurface0.ContentType = VRage.Game.GUI.TextPanel.ContentType.TEXT_AND_IMAGE;
            mesurface0.WriteText("Wicorel\n" + moduleName);
            mesurface0.FontSize  = 2;
            mesurface0.Alignment = VRage.Game.GUI.TextPanel.TextAlignment.CENTER;

            IMyTextSurface mesurface1 = Me.GetSurface(1);

            mesurface1.ContentType = VRage.Game.GUI.TextPanel.ContentType.TEXT_AND_IMAGE;
            mesurface1.WriteText("Version:" + sVersion);
            mesurface1.Alignment   = VRage.Game.GUI.TextPanel.TextAlignment.CENTER;
            mesurface1.TextPadding = 0.25f;
            mesurface1.FontSize    = 3.5f;

            /*
             * using (var frame = mesurface0.DrawFrame())
             * {
             *  MySprite sprite;
             *  // Background
             *  //                sprite = new MySprite(SpriteType.TEXTURE, "SquareSimple", color: new Color(50, 150, 255, 255), size: SIZE);
             *  //                sprite.Position = surfaceSize * 0.5f + POS;
             *  sprite = MySprite.CreateText("Wicorel", "Monospace", Color.Red, 1f, TextAlignment.LEFT);
             *  sprite.Position = new Vector2(16, 16);
             *  frame.Add(sprite);
             * }
             */

            /*
             * using (var frame = mesurface1.DrawFrame())
             * {
             *  MySprite sprite;
             *
             *  // Background
             *  //                sprite = new MySprite(SpriteType.TEXTURE, "SquareSimple", color: new Color(50, 150, 255, 255), size: SIZE);
             *  //                sprite.Position = surfaceSize * 0.5f + POS;
             *  sprite = MySprite.CreateText(moduleName, "Monospace", Color.Red, 1f, TextAlignment.LEFT);
             *  sprite.Position = new Vector2(16, 16);
             *  frame.Add(sprite);
             * }
             */
        }
コード例 #25
0
 void WorldInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sWorldSection, "MaxWorldMps", ref fMaxWorldMps, true);
 }
コード例 #26
0
 void ConnectorInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sConnectorSection, "BaseConnector", ref sBaseConnector, true);
     iNIHolder.GetValue(sConnectorSection, "DockConnector", ref sDockConnector, true);
 }
コード例 #27
0
 void GearsInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sConnectorSection, "GearUse", ref sGearUse, true);
 }
コード例 #28
0
 void TimersInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sTimersSection, "FastTimer", ref sFastTimer, true);
     iNIHolder.GetValue(sTimersSection, "SubModuleTimer", ref sSubModuleTimer, true);
     iNIHolder.GetValue(sTimersSection, "MainTimer", ref sMainTimer, true);
 }
コード例 #29
0
 void CargoInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sCargoSection, "cargopctmin", ref cargopctmin, true);
 }
コード例 #30
0
 void SerializeInitCustomData(INIHolder iNIHolder)
 {
     iNIHolder.GetValue(sSerializeSection, "SAVE_FILE_NAME", ref SAVE_FILE_NAME, true);
 }