コード例 #1
0
ファイル: KSC.cs プロジェクト: ntwest/KCT
        public void SwitchLaunchPad(int LP_ID, bool updateDestrNode = true)
        {
            const string logBlockName = nameof(SpaceCenterConstruction) + "." + nameof(SwitchLaunchPad);

            using (EntryExitLogger.EntryExitLog(logBlockName, EntryExitLoggerOptions.All))
            {
                Log.Trace("LP_ID = ".MemoizedConcat(LP_ID.MemoizedToString()));
                Log.Trace("updateDestrNode = ".MemoizedConcat(updateDestrNode.MemoizedToString()));

                //set the active LP's new state
                //activate new pad

                //LaunchPads[ActiveLaunchPadID].level = KCT_Utilities.BuildingUpgradeLevel(SpaceCenterFacility.LaunchPad);
                //LaunchPads[ActiveLaunchPadID].destroyed = !KCT_Utilities.LaunchFacilityIntact(KCT_BuildListVessel.ListType.VAB); //Might want to remove this as well
                if (updateDestrNode)
                {
                    ActiveLPInstance.RefreshDestructionNode();
                }

                if (LaunchPads.Count <= LP_ID)
                {
                    Log.Error("LaunchPads List is Missing LaunchPad ID ".MemoizedConcat(LP_ID.MemoizedToString()));
                    return;
                }

                LaunchPads[LP_ID].SetActive();
            }
        }
コード例 #2
0
ファイル: KSCItem.cs プロジェクト: KvaNTy/RP-0
        public void SwitchLaunchPad(int LP_ID, bool updateDestrNode = true)
        {
            //set the active LP's new state
            //activate new pad

            if (updateDestrNode)
            {
                ActiveLPInstance?.RefreshDestructionNode();
            }

            LaunchPads[LP_ID].SetActive();
        }
コード例 #3
0
        public void SwitchLaunchPad(int LP_ID, bool updateDestrNode = true)
        {
            //set the active LP's new state
            //activate new pad

            //LaunchPads[ActiveLaunchPadID].level = KCT_Utilities.BuildingUpgradeLevel(SpaceCenterFacility.LaunchPad);
            //LaunchPads[ActiveLaunchPadID].destroyed = !KCT_Utilities.LaunchFacilityIntact(KCT_BuildListVessel.ListType.VAB); //Might want to remove this as well
            if (updateDestrNode)
            {
                ActiveLPInstance.RefreshDestructionNode();
            }

            LaunchPads[LP_ID].SetActive();
        }