public MyRimeConvinceMission()
        {
            ID          = MyMissionID.RIME_CONVINCE;    /* ID must be added to MyMissions.cs */
            DebugName   = new StringBuilder("10-Rime"); // Name of mission
            Name        = MyTextsWrapperEnum.RIME_CONVINCE;
            Description = MyTextsWrapperEnum.RIME_CONVINCE_Description;
            Flags       = MyMissionFlags.Story;

            MyMwcVector3Int baseSector = new MyMwcVector3Int(-1922856, 0, -2867519);       // Story sector of the script - i.e. (-2465,0,6541)

            Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation);    // Starting dummy point - must by typecasted to uint and referenced from EntityID enum

            RequiredMissions           = new MyMissionID[] { MyMissionID.FORT_VALIANT_C }; // IDs of missions required to make this mission available
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.RIME_CONVINCE_TALK_TO_FRANCIS };

            m_objectives   = new List <MyObjective>(); // Creating of list of submissions
            RequiredActors = new MyActorEnum[] { MyActorEnum.MADELYN, MyActorEnum.MARCUS, MyActorEnum.TARJA, MyActorEnum.VALENTIN };

            var introduction = new MyObjectiveDialog(
                MyMissionID.RIME_CONVINCE_INTRODUCTION,
                null,
                this,
                new MyMissionID[] { },
                dialogId: MyDialogueEnum.RIME_0100_INTRODUCTION
                )
            {
                SaveOnSuccess = true
            };

            m_objectives.Add(introduction);

            m_01MeetReef = new MyMeetObjective(
                (MyTextsWrapperEnum.RIME_CONVINCE_GET_FRANCIS_REEF_Name),
                MyMissionID.RIME_CONVINCE_GET_FRANCIS_REEF,
                (MyTextsWrapperEnum.RIME_CONVINCE_GET_FRANCIS_REEF_Description),
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_INTRODUCTION },
                null,
                (uint)EntityID.FrancisReef,
                distanceToTalk: 300,
                slowdown: 0.25f,
                startDialogueId: MyDialogueEnum.RIME_0150_HEAD_TO_REEF,
                successDialogueId: MyDialogueEnum.RIME_0200_REEF_REACHED
                )
            {
                SaveOnSuccess = false, FollowMe = false
            };
            m_objectives.Add(m_01MeetReef);
            m_01MeetReef.OnMissionLoaded += M01MeetReefOnOnMissionLoaded;

            m_02TalkToReef = new MyObjectiveDialog(
                MyTextsWrapperEnum.Null,
                MyMissionID.RIME_CONVINCE_TALK_FRANCIS_REEF,
                MyTextsWrapperEnum.Null,
                null,
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_GET_FRANCIS_REEF },
                dialogId: MyDialogueEnum.RIME_0300_TALK_TO_REEF
                )
            {
                SaveOnSuccess = true
            };
            m_objectives.Add(m_02TalkToReef);
            m_02TalkToReef.OnMissionLoaded  += M02TalkToReefOnOnMissionLoaded;
            m_02TalkToReef.OnMissionSuccess += M02TalkToReefOnOnMissionSuccess;

            m_05FlyToDuplex = new MyObjective(
                (MyTextsWrapperEnum.RIME_CONVINCE_GO_TO_DUPLEX_Name),
                MyMissionID.RIME_CONVINCE_GO_TO_DUPLEX,
                (MyTextsWrapperEnum.RIME_CONVINCE_GO_TO_DUPLEX_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_TALK_FRANCIS_REEF },
                new MyMissionLocation(baseSector, (uint)EntityID.FlyToDummy),
                //startDialogId: MyDialogueEnum.RIME_0400_ON_THE_WAY,
                successDialogId: MyDialogueEnum.RIME_0500_LISTEN_TO_SUSPICIOUS
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudDuplex
            };
            m_objectives.Add(m_05FlyToDuplex);

            MyObjectiveDialog clientsTalk = new MyObjectiveDialog(
                MyMissionID.RIME_CONVINCE_CLIENTS_TALK,
                null,
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_GO_TO_DUPLEX },
                dialogId: MyDialogueEnum.RIME_0600_CLIENTS_TALK);

            clientsTalk.OnMissionLoaded += delegate
            {
                MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnpointClient1);
                MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnpointClient2);
            };
            m_objectives.Add(clientsTalk);

            MyObjectiveDialog bouncerTalk = new MyObjectiveDialog(
                MyMissionID.RIME_CONVINCE_DUPLEX_BOUNCER,
                null,
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_CLIENTS_TALK },
                dialogId: MyDialogueEnum.RIME_0700_DUPLEX_BOUNCER);

            bouncerTalk.OnMissionLoaded += delegate
            {
                MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnpointBouncer);
            };
            bouncerTalk.OnMissionSuccess += delegate
            {
                MySmallShipBot bouncer = MyScriptWrapper.TryGetEntity("Bouncer") as MySmallShipBot;
                if (bouncer != null)
                {
                    bouncer.LookTarget     = null;
                    m_barkeeper.LookTarget = null;
                    bouncer.SetWaypointPath("Client1");
                    bouncer.PatrolMode = MyPatrolMode.ONE_WAY;
                    bouncer.Patrol();
                }
            };
            m_objectives.Add(bouncerTalk);

            var returnBack = new MyObjective(
                (MyTextsWrapperEnum.RIME_CONVINCE_RETURN_TO_POSITION_Name),
                MyMissionID.RIME_CONVINCE_RETURN_TO_POSITION,
                (MyTextsWrapperEnum.RIME_CONVINCE_RETURN_TO_POSITION_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_DUPLEX_BOUNCER },
                new MyMissionLocation(baseSector, (uint)EntityID.FlyToDummy))
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.Nothing
            };

            returnBack.OnMissionSuccess += ReturnBackOnMissionSuccess;
            m_objectives.Add(returnBack);

            MyObjectiveDialog contactAppears = new MyObjectiveDialog(
                MyTextsWrapperEnum.RIME_CONVINCE_CONTACT_APPEARS_Name,
                MyMissionID.RIME_CONVINCE_CONTACT_APPEARS,
                MyTextsWrapperEnum.RIME_CONVINCE_CONTACT_APPEARS_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_RETURN_TO_POSITION },
                dialogId: MyDialogueEnum.RIME_0800_CONTACT_APPEARS);

            contactAppears.OnMissionSuccess += delegate
            {
                MySmallShipBot mitchel = (MySmallShipBot)MyScriptWrapper.GetEntity("Mitchel");
                mitchel.SetWaypointPath("Follow1");
                mitchel.PatrolMode = MyPatrolMode.ONE_WAY;
                mitchel.Patrol();
                m_07followContact.TargetId = mitchel.EntityId.Value.NumericValue;
            };
            m_objectives.Add(contactAppears);

            m_07followContact = new MyObjectiveFollowBot(
                (MyTextsWrapperEnum.RIME_CONVINCE_FOLLOW_CONTACT_Name),
                MyMissionID.RIME_CONVINCE_FOLLOW_CONTACT,
                (MyTextsWrapperEnum.RIME_CONVINCE_FOLLOW_CONTACT_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_CONTACT_APPEARS },
                null,
                (uint)EntityID.FactoryFound,
                MyDialogueEnum.RIME_0900_FOLLOW_INSTRUCTION)
            {
                FarDialog     = MyDialogueEnum.RIME_2100_HE_IS_GONE,
                ShortDialog   = MyDialogueEnum.RIME_2200_HE_SPOTTED_US,
                SaveOnSuccess = true,
                HudName       = MyTextsWrapperEnum.HudFollow
            };
            m_objectives.Add(m_07followContact);

            var factoryFoundDialogue = new MyObjectiveDialog(
                (MyTextsWrapperEnum.RIME_CONVINCE_FACTORY_FOUND_DIALOGUE_Name),
                MyMissionID.RIME_CONVINCE_FACTORY_FOUND_DIALOGUE,
                (MyTextsWrapperEnum.RIME_CONVINCE_FACTORY_FOUND_DIALOGUE_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_FOLLOW_CONTACT },
                dialogId: MyDialogueEnum.RIME_1000_FACTORY_FOUND
                )
            {
                SaveOnSuccess = true
            };

            m_objectives.Add(factoryFoundDialogue);

            var destroyFactoryBots = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.RIME_CONVINCE_DESTROY_FACTORY_BOTS_Name),
                MyMissionID.RIME_CONVINCE_DESTROY_FACTORY_BOTS,
                (MyTextsWrapperEnum.RIME_CONVINCE_DESTROY_FACTORY_BOTS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_FACTORY_FOUND_DIALOGUE },
                null,
                m_factorySpawns
                //startDialogID: MyDialogueEnum.RIME_1100_WE_GOT_YOUR_BACK
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.Nothing
            };

            destroyFactoryBots.OnMissionLoaded += DestroyFactoryBotsLoaded;
            m_objectives.Add(destroyFactoryBots);

            m_08CollectIllegalCargo = new MyMultipleUseObjective
                                          ((MyTextsWrapperEnum.RIME_CONVINCE_COLLECT_CARGO_Name),
                                          MyMissionID.RIME_CONVINCE_COLLECT_CARGO,
                                          (MyTextsWrapperEnum.RIME_CONVINCE_COLLECT_CARGO_Description),
                                          null,
                                          this,
                                          new MyMissionID[] { MyMissionID.RIME_CONVINCE_DESTROY_FACTORY_BOTS },
                                          MyTextsWrapperEnum.PressToCollectCargo,
                                          MyTextsWrapperEnum.IllegalCargo,
                                          MyTextsWrapperEnum.TakingInProgress,
                                          2000,
                                          m_boxes,
                                          MyUseObjectiveType.Taking
                                          )
            {
                RadiusOverride = 70f, SaveOnSuccess = true, StartDialogId = MyDialogueEnum.RIME_1100_GRAB_THE_ALCOHOL
            };
            m_objectives.Add(m_08CollectIllegalCargo);
            m_08CollectIllegalCargo.OnMissionLoaded    += M08CollectIllegalCargoOnOnMissionLoaded;
            m_08CollectIllegalCargo.OnObjectUsedSucces += M08CollectIllegalCargoOnOnObjectUsedSucces;
            m_08CollectIllegalCargo.OnMissionSuccess   += M08CollectIllegalCargoOnOnMissionSuccess;

            var cargoCollectedDialogue = new MyObjectiveDialog(
                (MyTextsWrapperEnum.RIME_CONVINCE_CARGO_COLLECTED_DIALOG_Name),
                MyMissionID.RIME_CONVINCE_CARGO_COLLECTED_DIALOG,
                (MyTextsWrapperEnum.RIME_CONVINCE_CARGO_COLLECTED_DIALOG_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_COLLECT_CARGO },
                dialogId: MyDialogueEnum.RIME_1200_GET_TO_THE_VESSEL
                )
            {
                SaveOnSuccess = true
            };

            m_objectives.Add(cargoCollectedDialogue);

            var flyToVessel = new MyObjective(
                (MyTextsWrapperEnum.RIME_CONVINCE_FLY_TO_VESSEL_Name),
                MyMissionID.RIME_CONVINCE_FLY_TO_VESSEL,
                (MyTextsWrapperEnum.RIME_CONVINCE_FLY_TO_VESSEL_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_CARGO_COLLECTED_DIALOG },
                new MyMissionLocation(baseSector, (uint)EntityID.FlyToVessel),
                startDialogId: MyDialogueEnum.RIME_1300_ON_THE_WAY_TO_VESSEL
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudRaynoldsVessel
            };

            m_objectives.Add(flyToVessel);
            flyToVessel.OnMissionLoaded += FlyToVesselLoaded;

            m_waitForTheMoment = new MyObjective(
                (MyTextsWrapperEnum.RIME_CONVINCE_WAIT_FOR_THE_MOMENT_Name),
                MyMissionID.RIME_CONVINCE_WAIT_FOR_THE_MOMENT,
                (MyTextsWrapperEnum.RIME_CONVINCE_WAIT_FOR_THE_MOMENT_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_FLY_TO_VESSEL },
                null,
                startDialogId: MyDialogueEnum.RIME_1500_WAIT_FOR_THE_SIGNAL,
                successDialogId: MyDialogueEnum.RIME_1600_THIS_IS_OUR_CHANCE)
            {
                SaveOnSuccess = true
            };
            m_objectives.Add(m_waitForTheMoment);
            m_waitForTheMoment.OnMissionLoaded  += WaitForTheMomentLoaded;
            m_waitForTheMoment.OnMissionUpdate  += WaitForTheMomentUpdate;
            m_waitForTheMoment.OnMissionCleanUp += new MissionHandler(m_waitForTheMoment_OnMissionCleanUp);

            m_09plantcargo = new MyMultipleUseObjective
                                 ((MyTextsWrapperEnum.RIME_CONVINCE_PLANT_CARGO_Name),
                                 MyMissionID.RIME_CONVINCE_PLANT_CARGO,
                                 (MyTextsWrapperEnum.RIME_CONVINCE_PLANT_CARGO_Description),
                                 null,
                                 this,
                                 new MyMissionID[] { MyMissionID.RIME_CONVINCE_WAIT_FOR_THE_MOMENT },
                                 MyTextsWrapperEnum.HoldToPlantCargo,
                                 MyTextsWrapperEnum.IllegalCargo,
                                 MyTextsWrapperEnum.PlantingInProgress,
                                 2000,
                                 m_plantBoxes,
                                 MyUseObjectiveType.Taking,
                                 startDialogId: MyDialogueEnum.RIME_1650_PLACE
                                 )
            {
                RadiusOverride = 60f, SaveOnSuccess = true
            };
            m_objectives.Add(m_09plantcargo);
            m_09plantcargo.OnMissionLoaded    += M09PlantcargoOnOnMissionLoaded;
            m_09plantcargo.OnMissionSuccess   += M09PlantcargoOnOnMissionSuccess;
            m_09plantcargo.OnObjectUsedSucces += M09PlantcargoOnOnObjectUsedSucces;

            var getOutOfTheVessel = new MyObjective(
                (MyTextsWrapperEnum.RIME_CONVINCE_GET_OUT_OF_THE_VESSEL_Name),
                MyMissionID.RIME_CONVINCE_GET_OUT_OF_THE_VESSEL,
                (MyTextsWrapperEnum.RIME_CONVINCE_GET_OUT_OF_THE_VESSEL_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_PLANT_CARGO },
                new MyMissionLocation(baseSector, (uint)EntityID.FlyToVessel)
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.Nothing
            };

            m_objectives.Add(getOutOfTheVessel);
            getOutOfTheVessel.OnMissionLoaded  += GetOutOfTheVesselLoaded;
            getOutOfTheVessel.OnMissionSuccess += GetOutOfTheVesselSuccess;

            /*
             * var cargoPlantedObjectiveDialogue = new MyObjectiveDialog(
             * new StringBuilder("Listen to the conversation"),
             * MyMissionID.RIME_CONVINCE_CARGO_PLANTED_OBJECTIVE_DIALOGUE,
             * new StringBuilder(""),
             * null,
             * this,
             * new MyMissionID[] { MyMissionID.RIME_CONVINCE_GET_OUT_OF_THE_VESSEL },
             * dialogId: MyDialogueEnum.RIME_1800_CARGO_PLANTED
             * ) { SaveOnSuccess = true };
             * m_objectives.Add(cargoPlantedObjectiveDialogue);
             */
            m_10MeetReef = new MyMeetObjective(
                (MyTextsWrapperEnum.RIME_CONVINCE_GO_BACK_TO_FRANCIS_Name),
                MyMissionID.RIME_CONVINCE_GO_BACK_TO_FRANCIS,
                (MyTextsWrapperEnum.RIME_CONVINCE_GO_BACK_TO_FRANCIS_Description),
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_GET_OUT_OF_THE_VESSEL },
                null,
                (uint)EntityID.FrancisReef,
                100,
                0.25f,
                null,
                startDialogueId: MyDialogueEnum.RIME_1800_CARGO_PLANTED
                )
            {
                SaveOnSuccess = false, FollowMe = false
            };
            m_objectives.Add(m_10MeetReef);
            //m_01MeetReef.OnMissionLoaded += M01MeetReefOnOnMissionLoaded;

            m_11TalkToReef = new MyObjectiveDialog(
                MyMissionID.RIME_CONVINCE_TALK_TO_FRANCIS,
                null,
                this,
                new MyMissionID[] { MyMissionID.RIME_CONVINCE_GO_BACK_TO_FRANCIS },
                dialogId: MyDialogueEnum.RIME_2000_REEF_TALK
                )
            {
                SaveOnSuccess = false
            };
            m_objectives.Add(m_11TalkToReef);
            m_11TalkToReef.OnMissionLoaded  += M11TalkToReefOnOnMissionLoaded;
            m_11TalkToReef.OnMissionSuccess += M11TalkToReefOnOnMissionSuccess;
        }
        public MyReichstagAMission()
        {
            ID          = MyMissionID.REICHSTAG_A; /* ID must be added to MyMissions.cs */
            DebugName   = new StringBuilder("18a-Reichstag A");
            Name        = MyTextsWrapperEnum.REICHSTAG_A;
            Description = MyTextsWrapperEnum.REICHSTAG_A_Description;
            Flags       = MyMissionFlags.Story;

            MyMwcVector3Int baseSector = new MyMwcVector3Int(-2325831, 0, -7186381);

            Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation);

            RequiredMissions           = new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.REICHSTAG_A_COLONEL_DIALOGUE };
            RequiredActors             = new MyActorEnum[] { MyActorEnum.MADELYN, MyActorEnum.TARJA, MyActorEnum.VALENTIN };

            m_objectives = new List <MyObjective>();

            var introduction = new MyObjectiveDialog(
                MyMissionID.REICHSTAG_A_INTRODUCTION,
                null,
                this,
                new MyMissionID[] { },
                dialogId: MyDialogueEnum.REICHSTAG_A_0100_INTRODUCTION
                )
            {
                SaveOnSuccess = true
            };

            m_objectives.Add(introduction);

            var getCloserToStation = new MyObjective(
                (MyTextsWrapperEnum.REICHSTAG_A_GET_TO_MAIN_BUILDING_Name),
                MyMissionID.REICHSTAG_A_GET_TO_MAIN_BUILDING,
                (MyTextsWrapperEnum.REICHSTAG_A_GET_TO_MAIN_BUILDING_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.REICHSTAG_A_INTRODUCTION },
                new MyMissionLocation(baseSector, (uint)EntityID.MainBuilding)
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudMainBuilding
            };

            getCloserToStation.OnMissionLoaded += GetCloserToStationLoaded;
            m_objectives.Add(getCloserToStation);

            var meetColonel = new MyMeetObjective(
                (MyTextsWrapperEnum.REICHSTAG_A_MEET_COLONEL_Name),
                MyMissionID.REICHSTAG_A_MEET_COLONEL,
                (MyTextsWrapperEnum.REICHSTAG_A_MEET_COLONEL_Description),
                this,
                new MyMissionID[] { MyMissionID.REICHSTAG_A_GET_TO_MAIN_BUILDING },
                null,
                (uint)EntityID.Bot_WaltherStauffenberg,
                100,
                0.25f,
                null,
                startDialogueId: MyDialogueEnum.REICHSTAG_A_0300_REACHING_REICHSTAG
                )
            {
                SaveOnSuccess = false, FollowMe = false, HudName = MyTextsWrapperEnum.HudColonelVonStauffenberg
            };

            m_objectives.Add(meetColonel);


            var colonelDialogue = new MyObjectiveDialog(
                MyMissionID.REICHSTAG_A_COLONEL_DIALOGUE,
                null,
                this,
                new MyMissionID[] { MyMissionID.REICHSTAG_A_MEET_COLONEL },
                dialogId: MyDialogueEnum.REICHSTAG_A_0400_OFFICER_DIALOGUE
                )
            {
                SaveOnSuccess = true
            };

            m_objectives.Add(colonelDialogue);
            colonelDialogue.OnMissionSuccess += ColonelDialogueSuccess;
        }
        public MyFortValiantMissionB()
            : base()
        {
            ID = MyMissionID.FORT_VALIANT_B; /* ID must be added to MyMissions.cs */
            DebugName = new StringBuilder("09c-Fort Valiant B"); // Name of mission
            Name = MyTextsWrapperEnum.FORT_VALIANT_B;
            Description = MyTextsWrapperEnum.FORT_VALIANT_B_Description;
            RequiredActors = new MyActorEnum[] { MyActorEnum.MADELYN, MyActorEnum.MARCUS, MyActorEnum.TARJA, MyActorEnum.VALENTIN };
            RequiredMissions = new MyMissionID[] { MyMissionID.SLAVER_BASE_1 };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.FORT_VALIANT_B_VISIT_VENDOR };
            m_objectives = new List<MyObjective>(); // Creating of list of submissions

            
            var flyOne = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_B_FLY_ONE_Name),
                MyMissionID.FORT_VALIANT_B_FLY_ONE,
                (MyTextsWrapperEnum.FORT_VALIANT_B_FLY_ONE_Description),
                null,
                this,
                new MyMissionID[] { },
                new MyMissionLocation(baseSector, (uint)EntityID.DetecorGateKeeper),
                null,
                null,
                MyDialogueEnum.FORT_VALIANT_B_0100) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudFortValiant };
            m_objectives.Add(flyOne);

            /*
            var speakGateKeeper = new MyMeetObjective(
                new StringBuilder("Reach the gate of Fort Valiant"),
                MyMissionID.FORT_VALIANT_B_SPEAK_GATE_KEEPER,
                new StringBuilder(""),
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_FLY_ONE },
                (uint)EntityID.DetecorGateKeeper,
                (uint)EntityID.GateKeeper,
                25,
                0.25f,
                dialog3,
                dialog2
                ) { SaveOnSuccess = true };
            m_objectives.Add(speakGateKeeper);

            */

            var speakCaptain = new MyMeetObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_B_MEET_CAPTAIN_Name),
                MyMissionID.FORT_VALIANT_B_MEET_CAPTAIN,
                (MyTextsWrapperEnum.FORT_VALIANT_B_MEET_CAPTAIN_Description),
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_B_FLY_ONE },
                (uint)EntityID.DetectorCaptain,
                (uint)EntityID.Captain,
                50,
                0.25f,
                MyDialogueEnum.FORT_VALIANT_B_0200,
                null,
                false
                ) { SaveOnSuccess = true, FollowMe = false};
            m_objectives.Add(speakCaptain);
            speakCaptain.OnMissionSuccess += SpeakCaptainOnOnMissionSuccess;

            m_visitVendor = new MyObjectiveEnterInventory(
               (MyTextsWrapperEnum.FORT_VALIANT_B_VISIT_VENDOR_Name),
               MyMissionID.FORT_VALIANT_B_VISIT_VENDOR,
               (MyTextsWrapperEnum.FORT_VALIANT_B_VISIT_VENDOR_Description),
               null,
               this,
               new MyMissionID[] { MyMissionID.FORT_VALIANT_B_MEET_CAPTAIN },
               (uint)EntityID.VendorB,
               null,
               null
               );
            m_objectives.Add(m_visitVendor);
            m_visitVendor.OnMissionLoaded += MVisitVendorOnOnMissionLoaded; 
                         /*
            var flyToMadelyn = new MyObjective(
                   new StringBuilder("Meet your mothership close to the Templar cargo bay"),
                   MyMissionID.FORT_VALIANT_B_FLY_BACK_MADELYN,
                   new StringBuilder(""),
                   null,
                   this,
                   new MyMissionID[] { MyMissionID.FORT_VALIANT_B_VISIT_VENDOR },
                   new MyMissionLocation(baseSector, MyMissionLocation.MADELYN_HANGAR)
             );
            m_objectives.Add(flyToMadelyn);
                           */


        }
        public MyFortValiantMissionC()
            : base()
        {
            ID                         = MyMissionID.FORT_VALIANT_C;              /* ID must be added to MyMissions.cs */
            DebugName                  = new StringBuilder("09e-Fort Valiant C"); // Name of mission
            Name                       = MyTextsWrapperEnum.FORT_VALIANT_C;
            Description                = MyTextsWrapperEnum.FORT_VALIANT_C_Description;
            RequiredActors             = new MyActorEnum[] { MyActorEnum.MADELYN, MyActorEnum.MARCUS, MyActorEnum.TARJA, MyActorEnum.VALENTIN };
            Location                   = new MyMissionLocation(baseSector, (uint)EntityID.StartLocationC); //StartLocationC Starting dummy point - must by typecasted to uint and referenced from EntityID enum
            RequiredMissions           = new MyMissionID[] { MyMissionID.SLAVER_BASE_2 };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.FORT_VALIANT_C_PICK_UP_EQUIP };
            AchievementName            = MySteamAchievementNames.Mission17_FortValiantDungeons;

            #region Objectives
            m_objectives = new List <MyObjective>();

            var speakCaptain = new MyMeetObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_CAPTAIN_Name),
                MyMissionID.FORT_VALIANT_C_CAPTAIN,
                (MyTextsWrapperEnum.FORT_VALIANT_C_CAPTAIN_Description),
                this,
                new MyMissionID[] { },
                (uint)EntityID.CaptainDummy,
                (uint)EntityID.Captain,
                50,
                0.25f,
                MyDialogueEnum.FORT_VALIANT_C_0100,
                null,
                false
                )
            {
                SaveOnSuccess = true, FollowMe = false, StartDialogId = MyDialogueEnum.FORT_VALIANT_C_0100_BEGIN, HudName = MyTextsWrapperEnum.HudCaptainCedric
            };
            speakCaptain.OnMissionSuccess += SpeakCaptainOnOnMissionSuccess;
            m_objectives.Add(speakCaptain);


            var reachUpperFloor = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_UPPER_FLOOR_Name),
                MyMissionID.FORT_VALIANT_C_UPPER_FLOOR,
                (MyTextsWrapperEnum.FORT_VALIANT_C_UPPER_FLOOR_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_CAPTAIN },
                new MyMissionLocation(baseSector, (uint)EntityID.UpperFloorDummy)
                )
            {
                HudName = MyTextsWrapperEnum.Nothing
            };
            m_objectives.Add(reachUpperFloor);



            var meetRoyal = new MyMeetObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_EQUIP_TALK_Name),
                MyMissionID.FORT_VALIANT_C_EQUIP_TALK,
                (MyTextsWrapperEnum.FORT_VALIANT_C_EQUIP_TALK_Description),
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_UPPER_FLOOR },
                (uint)EntityID.RoyalDummy,
                (uint)EntityID.BotRoyal,
                50,
                0.25f,
                MyDialogueEnum.FORT_VALIANT_C_0200,
                null,
                false
                )
            {
                SaveOnSuccess = true, FollowMe = false
            };
            m_objectives.Add(meetRoyal);


            var giveoutEquipment = new MyUseObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_EQUIP_Name),
                MyMissionID.FORT_VALIANT_C_EQUIP,
                (MyTextsWrapperEnum.FORT_VALIANT_C_EQUIP_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_EQUIP_TALK },
                new MyMissionLocation(baseSector, (uint)EntityID.RoyalCargoBoxDetector),
                MyTextsWrapperEnum.PressToGiveEquipment,
                MyTextsWrapperEnum.CargoBox,
                MyTextsWrapperEnum.TransferInProgress,
                3000,
                MyUseObjectiveType.Activating
                )
            {
                SaveOnSuccess = true
            };
            giveoutEquipment.OnMissionSuccess += GiveoutEquipmentOnOnMissionSuccess;
            m_objectives.Add(giveoutEquipment);



            var meetOfficers = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_MEET_OFFICIALS_Name),
                MyMissionID.FORT_VALIANT_C_MEET_OFFICIALS,
                (MyTextsWrapperEnum.FORT_VALIANT_C_MEET_OFFICIALS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_EQUIP },
                new MyMissionLocation(baseSector, (uint)EntityID.OfficalsDetector),
                null
                )
            {
                StartDialogId = MyDialogueEnum.FORT_VALIANT_C_0300, SuccessDialogId = MyDialogueEnum.FORT_VALIANT_C_0400, HudName = MyTextsWrapperEnum.HudChamber
            };
            m_objectives.Add(meetOfficers);


            var leaveOfficers = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_LEAVE_OFFICIALS_Name),
                MyMissionID.FORT_VALIANT_C_LEAVE_OFFICIALS,
                (MyTextsWrapperEnum.FORT_VALIANT_C_LEAVE_OFFICIALS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_MEET_OFFICIALS },
                new MyMissionLocation(baseSector, (uint)EntityID.OfficalsleaveDetector),
                null
                )
            {
                SuccessDialogId = MyDialogueEnum.FORT_VALIANT_C_0500, HudName = MyTextsWrapperEnum.Nothing
            };
            m_objectives.Add(leaveOfficers);

            var followPath = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_LEAVE_FOLLOW_Name),
                MyMissionID.FORT_VALIANT_C_LEAVE_FOLLOW,
                (MyTextsWrapperEnum.FORT_VALIANT_C_LEAVE_FOLLOW_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_LEAVE_OFFICIALS },
                new MyMissionLocation(baseSector, (uint)EntityID.FollowPathDetector),
                null,
                null)
            {
                HudName = MyTextsWrapperEnum.Nothing
            };
            m_objectives.Add(followPath);

            var speakWithSir = new MyMeetObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_SPEAK_SIR_Name),
                MyMissionID.FORT_VALIANT_C_SPEAK_SIR,
                (MyTextsWrapperEnum.FORT_VALIANT_C_SPEAK_SIR_Description),
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_LEAVE_FOLLOW },
                (uint)EntityID.SirBendivereDummy,
                (uint)EntityID.BotTemplar,
                50,
                0.25f,
                MyDialogueEnum.FORT_VALIANT_C_0600,
                null,
                false
                )
            {
                SaveOnSuccess = true, FollowMe = false, HudName = MyTextsWrapperEnum.HudSirGeraint
            };
            m_objectives.Add(speakWithSir);


            var getItemsFromCargoBoxes = new MyObjectiveGetItems(
                (MyTextsWrapperEnum.FORT_VALIANT_C_GET_EQUP_CARGO_Name),
                MyMissionID.FORT_VALIANT_C_GET_EQUP_CARGO,
                (MyTextsWrapperEnum.FORT_VALIANT_C_GET_EQUP_CARGO_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_SPEAK_SIR },
                new List <MyItemToGetDefinition>()
            {
                new MyItemToGetDefinition(MyMwcObjectBuilderTypeEnum.SmallShip_HackingTool, (int)MyMwcObjectBuilder_SmallShip_HackingTool_TypesEnum.Level_1)
            },
                new List <uint>()
            {
                (uint)EntityID.CargoBox
            }
                )
            {
                SaveOnSuccess = true
            };
            m_objectives.Add(getItemsFromCargoBoxes);



            var findEntrance = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_FOLLOW_FIND_VENTILATION_Name),
                MyMissionID.FORT_VALIANT_C_FOLLOW_FIND_VENTILATION,
                (MyTextsWrapperEnum.FORT_VALIANT_C_FOLLOW_FIND_VENTILATION_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_GET_EQUP_CARGO },
                new MyMissionLocation(baseSector, (uint)EntityID.Ventilation),
                null,
                null)
            {
                StartDialogId = MyDialogueEnum.FORT_VALIANT_C_0700, HudName = MyTextsWrapperEnum.HudEntrance
            };
            findEntrance.OnMissionLoaded += FindEntranceOnOnMissionLoaded;
            m_objectives.Add(findEntrance);


            var disableScanner = new MyObjectiveDisablePrefabs(
                (MyTextsWrapperEnum.FORT_VALIANT_C_FOLLOW_TURN_OFF_GATE_Name),
                MyMissionID.FORT_VALIANT_C_FOLLOW_TURN_OFF_GATE,
                (MyTextsWrapperEnum.FORT_VALIANT_C_FOLLOW_TURN_OFF_GATE_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_FOLLOW_FIND_VENTILATION },
                new List <uint> {
                (uint)EntityID.DisableScanner
            },
                new List <uint> {
                (uint)EntityID.DisableScannerHub
            },
                false,
                false
                )
            {
                SaveOnSuccess = true, StartDialogId = MyDialogueEnum.FORT_VALIANT_C_0800, HudName = MyTextsWrapperEnum.HudSecurityHub
            };
            disableScanner.OnMissionLoaded += DisableScannerOnOnMissionLoaded;
            m_objectives.Add(disableScanner);

            var scanners1 = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS1_Name),
                MyMissionID.FORT_VALIANT_C_SCANNERS1,
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS1_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_FOLLOW_TURN_OFF_GATE },
                new MyMissionLocation(baseSector, (uint)EntityID.ScannersLocation1))
            {
                SaveOnSuccess = true, StartDialogId = MyDialogueEnum.FORT_VALIANT_C_1000, HudName = MyTextsWrapperEnum.Nothing
            };
            //scanners1.Components.Add(new MyDetectorDialogue((uint)EntityID.DetectorGuardsDialogue, MyDialogueEnum.FORT_VALIANT_C_1100));
            scanners1.Components.Add(new MyDetectorDialogue((uint)EntityID.DetectorSensorsDialogue, MyDialogueEnum.FORT_VALIANT_C_1200));
            m_objectives.Add(scanners1);


            var scanners2 = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS2_Name),
                MyMissionID.FORT_VALIANT_C_SCANNERS2,
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS2_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_SCANNERS1 },
                new MyMissionLocation(baseSector, (uint)EntityID.ScannersLocation2))
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.Nothing
            };
            scanners2.OnMissionSuccess += Scanners2OnOnMissionSuccess;
            m_objectives.Add(scanners2);


            var scanners23 = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS23_Name),
                MyMissionID.FORT_VALIANT_C_SCANNERS23,
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS23_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_SCANNERS2 },
                new MyMissionLocation(baseSector, (uint)EntityID.ScannersLocation23))
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.Nothing
            };
            m_objectives.Add(scanners23);

            m_findArtifact = new MyUseObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_TAKE_ARTEFACT_Name),
                MyMissionID.FORT_VALIANT_C_TAKE_ARTEFACT,
                (MyTextsWrapperEnum.FORT_VALIANT_C_TAKE_ARTEFACT_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_SCANNERS23 },
                null,
                MyTextsWrapperEnum.NotificationTakeArtifact,
                MyTextsWrapperEnum.Artifact,
                MyTextsWrapperEnum.TakingInProgress,
                3000,
                MyUseObjectiveType.Taking,
                null,
                null,
                null,
                new List <uint>()
            {
                (uint)EntityID.Box1Marker, (uint)EntityID.Box2Marker, (uint)EntityID.Box3Marker, (uint)EntityID.Box4Marker
            },
                (uint)EntityID.ArtifactDummy
                )
            {
                SaveOnSuccess = true, StartDialogId = MyDialogueEnum.FORT_VALIANT_C_1400
            };
            m_findArtifact.OnMissionLoaded  += FindArtifactOnOnMissionLoaded;
            m_findArtifact.OnMissionSuccess += FindArtifactOnOnMissionSuccess;
            m_findArtifact.Components.Add(new MyTimedDialogue(new TimeSpan(0, 0, 10), MyDialogueEnum.FORT_VALIANT_C_1500));
            m_objectives.Add(m_findArtifact);


            var vault = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_VALUT_Name),
                MyMissionID.FORT_VALIANT_C_VALUT,
                (MyTextsWrapperEnum.FORT_VALIANT_C_VALUT_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_TAKE_ARTEFACT },
                new MyMissionLocation(baseSector, (uint)EntityID.ScannersLocation2))
            {
                HudName = MyTextsWrapperEnum.Nothing
            };
            vault.Components.Add(new MyDetectorDialogue((uint)EntityID.DetectorSecurityFields, MyDialogueEnum.FORT_VALIANT_C_1700));
            vault.Components.Add(new MyDetectorDialogue((uint)EntityID.DetectorOpenDoors, MyDialogueEnum.FORT_VALIANT_C_1800));
            vault.Components.Add(new MyDetectorDialogue((uint)EntityID.DetectorComputer, MyDialogueEnum.FORT_VALIANT_C_1900));
            m_objectives.Add(vault);

            m_disableScanner2 = new MyObjectiveDisablePrefabs(
                (MyTextsWrapperEnum.FORT_VALIANT_C_TURN_OFF_SCANNER_Name),
                MyMissionID.FORT_VALIANT_C_TURN_OFF_SCANNER,
                (MyTextsWrapperEnum.FORT_VALIANT_C_TURN_OFF_SCANNER_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_VALUT },
                new List <uint> {
                (uint)EntityID.DisableSnanners2
            },
                new List <uint> {
                (uint)EntityID.DisableScanner2Hub
            },
                false

                )
            {
                SaveOnSuccess = true, SuccessDialogId = MyDialogueEnum.FORT_VALIANT_C_2100, HudName = MyTextsWrapperEnum.HudSecurityHub
            };
            m_disableScanner2.OnMissionSuccess += DisableScanner2_Success;
            m_objectives.Add(m_disableScanner2);

            var scanners4 = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS4_Name),
                MyMissionID.FORT_VALIANT_C_SCANNERS4,
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS4_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_TURN_OFF_SCANNER },
                new MyMissionLocation(baseSector, (uint)EntityID.HigherFloors))
            {
                HudName = MyTextsWrapperEnum.Nothing
            };
            m_objectives.Add(scanners4);


            var elevator = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_TOP_ELEVATOR_Name),
                MyMissionID.FORT_VALIANT_C_TOP_ELEVATOR,
                (MyTextsWrapperEnum.FORT_VALIANT_C_TOP_ELEVATOR_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_SCANNERS4 },
                new MyMissionLocation(baseSector, (uint)EntityID.ElevatorDummy))
            {
                HudName = MyTextsWrapperEnum.Nothing
            };
            m_objectives.Add(elevator);


            var escape = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_VENT_SYSTEM_Name),
                MyMissionID.FORT_VALIANT_C_VENT_SYSTEM,
                (MyTextsWrapperEnum.FORT_VALIANT_C_VENT_SYSTEM_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_TOP_ELEVATOR },
                new MyMissionLocation(baseSector, (uint)EntityID.EscapeVentSystemDummy))
            {
                SuccessDialogId = MyDialogueEnum.FORT_VALIANT_C_2300, HudName = MyTextsWrapperEnum.Nothing
            };
            m_objectives.Add(escape);


            var useCatacombs = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_CATACOMBS_Name),
                MyMissionID.FORT_VALIANT_C_CATACOMBS,
                (MyTextsWrapperEnum.FORT_VALIANT_C_CATACOMBS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_VENT_SYSTEM },
                new MyMissionLocation(baseSector, (uint)EntityID.EscapeCatacombsDummy)
                //startDialogId: dialog9
                )
            {
                HudName = MyTextsWrapperEnum.Nothing
            };
            useCatacombs.OnMissionSuccess += UseCatacombsOnOnMissionSuccess;
            m_objectives.Add(useCatacombs);

            var getItemsFromCargoBoxes2 = new MyUseObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_PICK_UP_EQUIP_Name),
                MyMissionID.FORT_VALIANT_C_PICK_UP_EQUIP,
                (MyTextsWrapperEnum.FORT_VALIANT_C_PICK_UP_EQUIP_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_CATACOMBS },
                new MyMissionLocation(baseSector, (uint)EntityID.RoyalCargoBoxDetector),
                MyTextsWrapperEnum.PressToTakeCargo,
                MyTextsWrapperEnum.CargoBox,
                MyTextsWrapperEnum.TakingInProgress,
                3000,
                MyUseObjectiveType.Taking
                //startDialogId: dialog10
                )
            {
                SaveOnSuccess = true, StartDialogId = MyDialogueEnum.FORT_VALIANT_C_2400
            };
            getItemsFromCargoBoxes2.Components.Add(new MyDetectorDialogue((uint)EntityID.GetItemsWayBackDialogue, MyDialogueEnum.FORT_VALIANT_C_2500));
            getItemsFromCargoBoxes2.OnMissionSuccess += GetItemsFromCargoBoxesOnOnMissionSuccess;
            m_objectives.Add(getItemsFromCargoBoxes2);
            #endregion
        }
        public MyJunkyardEACAmbushMission()
        {
            ID             = MyMissionID.JUNKYARD_EAC_AMBUSH;    /* ID must be added to MyMissions.cs */
            DebugName      = new StringBuilder("13-EAC ambush"); // Name of mission
            Name           = MyTextsWrapperEnum.JUNKYARD_EAC_AMBUSH;
            Description    = MyTextsWrapperEnum.JUNKYARD_EAC_AMBUSH_Description;
            Flags          = MyMissionFlags.Story;
            RequiredActors = new MyActorEnum[] { MyActorEnum.MADELYN, MyActorEnum.MARCUS, MyActorEnum.TARJA, MyActorEnum.VALENTIN };
            MyMwcVector3Int baseSector = new MyMwcVector3Int(2567538, 0, -172727);          // Story sector of the script - i.e. (-2465,0,6541)

            Location = new MyMissionLocation(baseSector, (uint)EntityID.PlayerStart);       // Starting dummy point - must by typecasted to uint and referenced from EntityID enum

            RequiredMissions           = new MyMissionID[] { MyMissionID.RESEARCH_VESSEL }; // IDs of missions required to make this mission available
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_DEFEND_MADELYN };

            Components.Add(new MySpawnpointLimiter(m_spawns, 7));

            #region Objectives
            m_objectives = new List <MyObjective>(); // Creating of list of submissions
            var flyToManjeet = new MyMeetObjective(
                MyTextsWrapperEnum.EAC_AMBUSH_FLY_TO_MANJEET,
                MyMissionID.JUNKYARD_EAC_AMBUSH_FLY_MANJEET,
                MyTextsWrapperEnum.EAC_AMBUSH_FLY_TO_MANJEET_DESC,
                this,
                new MyMissionID[] { },
                null,
                (uint)EntityID.FlyToManjeet,
                100,
                0.25f,
                null,
                MyDialogueEnum.EAC_AMBUSH_0100_INTRO
                )
            {
                SaveOnSuccess = false, FollowMe = false
            };
            flyToManjeet.OnMissionLoaded += FlyToManjeet_Loaded;
            m_objectives.Add(flyToManjeet);

            var speakToManjeet = new MyObjectiveDialog(
                MyMissionID.JUNKYARD_EAC_AMBUSH_TALK_RANIJT,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_FLY_MANJEET },
                MyDialogueEnum.EAC_AMBUSH_0200_MANJEET
                )
            {
                SaveOnSuccess = false
            };
            speakToManjeet.OnMissionLoaded += SpeakToManjeet_Loaded;
            m_objectives.Add(speakToManjeet);

            m_backToMadelyn = new MyObjective(
                MyTextsWrapperEnum.EAC_AMBUSH_GO_BACK_TO_MADELYN,
                MyMissionID.JUNKYARD_EAC_AMBUSH_GO_BACK_TO_MADELYN,
                MyTextsWrapperEnum.EAC_AMBUSH_GO_BACK_TO_MADELYN_DESC,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_TALK_RANIJT },
                new MyMissionLocation(baseSector, (uint)EntityID.GoBackToMadelyn),
                startDialogId: MyDialogueEnum.EAC_AMBUSH_0300_GUYS_HURRY_UP
                )
            {
                HudName = MyTextsWrapperEnum.Nothing
            };
            m_backToMadelyn.OnMissionLoaded += BackToMadelyn_Loaded;
            m_objectives.Add(m_backToMadelyn);

            m_speakWithPolice = new MyObjective(
                MyTextsWrapperEnum.Null,
                MyMissionID.JUNKYARD_EAC_AMBUSH_SPEAK_POLICE,
                MyTextsWrapperEnum.Null,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_GO_BACK_TO_MADELYN },
                null
                );
            m_speakWithPolice.OnMissionLoaded += SpeakWithPolice_Loaded;
            m_objectives.Add(m_speakWithPolice);

            m_defendMadelyn = new MyObjectiveDialog(
                MyTextsWrapperEnum.EAC_AMBUSH_DEFEND_MADELYN1,
                MyMissionID.JUNKYARD_EAC_AMBUSH_DEFEND_MADELYN_1,
                MyTextsWrapperEnum.EAC_AMBUSH_DEFEND_MADELYN1_DESC,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_SPEAK_POLICE },
                MyDialogueEnum.EAC_AMBUSH_0500_ONE_LITTLE_ISSUE
                )
            {
                SaveOnSuccess = true
            };
            m_defendMadelyn.OnMissionLoaded += DefendMadelyn_Loaded;
            m_objectives.Add(m_defendMadelyn);

            var destroyGenerator = new MyObjectiveDestroy(
                MyTextsWrapperEnum.EAC_AMBUSH_DESTROY_GENERATOR,
                MyMissionID.JUNKYARD_EAC_AMBUSH_DESTROY_GENERATOR,
                MyTextsWrapperEnum.EAC_AMBUSH_DESTROY_GENERATOR_DESC,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_DEFEND_MADELYN_1 },
                new List <uint> {
                (uint)EntityID.DestroyGenerator
            }
                )
            {
                SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_AMBUSH_0700_SPLIT_TO_DESTROY_GENERATORS, HudName = MyTextsWrapperEnum.HudDisruptor
            };
            destroyGenerator.OnMissionLoaded  += DestroyGenerator_Loaded;
            destroyGenerator.OnMissionSuccess += DestroyGenerator_Success;
            m_objectives.Add(destroyGenerator);

            var returnToMadelyn = new MyTimedReachLocationObjective(
                MyTextsWrapperEnum.EAC_AMBUSH_RETURN_TO_MADELYN,
                MyMissionID.JUNKYARD_EAC_AMBUSH_RETUR_TO_MADELYN,
                MyTextsWrapperEnum.EAC_AMBUSH_RETURN_TO_MADELYN_DESC,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_DESTROY_GENERATOR },
                new TimeSpan(0, 0, 45),
                new MyMissionLocation(baseSector, (uint)EntityID.ReturnToMadelyn)
                )
            {
                SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_AMBUSH_1000, HudName = MyTextsWrapperEnum.HudMadelynsSapho
            };
            returnToMadelyn.OnMissionLoaded += ReturnToMadelyn_Loaded;
            m_objectives.Add(returnToMadelyn);

            m_defendMadelyn2 = new MyObjective(
                MyTextsWrapperEnum.EAC_AMBUSH_DEFEND_MADELYN2,
                MyMissionID.JUNKYARD_EAC_AMBUSH_DEFEND_MADELYN,
                MyTextsWrapperEnum.EAC_AMBUSH_DEFEND_MADELYN2_DESC,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_RETUR_TO_MADELYN },
                null
                )
            {
                StartDialogId = MyDialogueEnum.EAC_AMBUSH_1200_1300
            };
            m_defendMadelyn2.OnMissionLoaded += DefendMadelyn2_Loaded;
            m_defendMadelyn2.OnMissionUpdate += DefendMadelyn2_Update;
            m_objectives.Add(m_defendMadelyn2);

            #endregion
        }
        public MyJunkyardEACAmbushMission()
        {
            ID = MyMissionID.JUNKYARD_EAC_AMBUSH; /* ID must be added to MyMissions.cs */
            DebugName = new StringBuilder("13-EAC ambush"); // Name of mission
            Name = MyTextsWrapperEnum.JUNKYARD_EAC_AMBUSH;
            Description = MyTextsWrapperEnum.JUNKYARD_EAC_AMBUSH_Description;
            Flags = MyMissionFlags.Story;
            RequiredActors = new MyActorEnum[] { MyActorEnum.MADELYN, MyActorEnum.MARCUS, MyActorEnum.TARJA, MyActorEnum.VALENTIN };
            MyMwcVector3Int baseSector = new MyMwcVector3Int(2567538, 0, -172727); // Story sector of the script - i.e. (-2465,0,6541)

            Location = new MyMissionLocation(baseSector, (uint)EntityID.PlayerStart); // Starting dummy point - must by typecasted to uint and referenced from EntityID enum

            RequiredMissions = new MyMissionID[] { MyMissionID.RESEARCH_VESSEL }; // IDs of missions required to make this mission available
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_DEFEND_MADELYN };

            Components.Add(new MySpawnpointLimiter(m_spawns, 7));

            #region Objectives
            m_objectives = new List<MyObjective>(); // Creating of list of submissions
            var flyToManjeet = new MyMeetObjective(
                MyTextsWrapperEnum.EAC_AMBUSH_FLY_TO_MANJEET,
                MyMissionID.JUNKYARD_EAC_AMBUSH_FLY_MANJEET,
                MyTextsWrapperEnum.EAC_AMBUSH_FLY_TO_MANJEET_DESC,
                this,
                new MyMissionID[] { },
                null,
                (uint)EntityID.FlyToManjeet,
                100,
                0.25f,
                null,
                MyDialogueEnum.EAC_AMBUSH_0100_INTRO
                ) { SaveOnSuccess = false, FollowMe = false };
            flyToManjeet.OnMissionLoaded += FlyToManjeet_Loaded;
            m_objectives.Add(flyToManjeet);

            var speakToManjeet = new MyObjectiveDialog(
                MyMissionID.JUNKYARD_EAC_AMBUSH_TALK_RANIJT,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_FLY_MANJEET },
                MyDialogueEnum.EAC_AMBUSH_0200_MANJEET
                ) { SaveOnSuccess = false };
            speakToManjeet.OnMissionLoaded += SpeakToManjeet_Loaded;
            m_objectives.Add(speakToManjeet);

            m_backToMadelyn = new MyObjective(
                MyTextsWrapperEnum.EAC_AMBUSH_GO_BACK_TO_MADELYN,
                MyMissionID.JUNKYARD_EAC_AMBUSH_GO_BACK_TO_MADELYN,
                MyTextsWrapperEnum.EAC_AMBUSH_GO_BACK_TO_MADELYN_DESC,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_TALK_RANIJT },
                new MyMissionLocation(baseSector, (uint)EntityID.GoBackToMadelyn),
                startDialogId: MyDialogueEnum.EAC_AMBUSH_0300_GUYS_HURRY_UP
            ) { HudName = MyTextsWrapperEnum.Nothing };
            m_backToMadelyn.OnMissionLoaded += BackToMadelyn_Loaded;
            m_objectives.Add(m_backToMadelyn);

            m_speakWithPolice = new MyObjective(
                MyTextsWrapperEnum.Null,
                MyMissionID.JUNKYARD_EAC_AMBUSH_SPEAK_POLICE,
                MyTextsWrapperEnum.Null,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_GO_BACK_TO_MADELYN },
                null
            );
            m_speakWithPolice.OnMissionLoaded += SpeakWithPolice_Loaded;
            m_objectives.Add(m_speakWithPolice);

            m_defendMadelyn = new MyObjectiveDialog(
                MyTextsWrapperEnum.EAC_AMBUSH_DEFEND_MADELYN1,
                MyMissionID.JUNKYARD_EAC_AMBUSH_DEFEND_MADELYN_1,
                MyTextsWrapperEnum.EAC_AMBUSH_DEFEND_MADELYN1_DESC,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_SPEAK_POLICE },
                MyDialogueEnum.EAC_AMBUSH_0500_ONE_LITTLE_ISSUE
                ) { SaveOnSuccess = true };
            m_defendMadelyn.OnMissionLoaded += DefendMadelyn_Loaded;
            m_objectives.Add(m_defendMadelyn);

            var destroyGenerator  = new MyObjectiveDestroy(
                MyTextsWrapperEnum.EAC_AMBUSH_DESTROY_GENERATOR,
                MyMissionID.JUNKYARD_EAC_AMBUSH_DESTROY_GENERATOR,
                MyTextsWrapperEnum.EAC_AMBUSH_DESTROY_GENERATOR_DESC,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_DEFEND_MADELYN_1 },
                new List<uint> {  (uint)EntityID.DestroyGenerator}
                ) { SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_AMBUSH_0700_SPLIT_TO_DESTROY_GENERATORS, HudName = MyTextsWrapperEnum.HudDisruptor };
            destroyGenerator.OnMissionLoaded += DestroyGenerator_Loaded;
            destroyGenerator.OnMissionSuccess += DestroyGenerator_Success;
            m_objectives.Add(destroyGenerator);

            var returnToMadelyn = new MyTimedReachLocationObjective(
                MyTextsWrapperEnum.EAC_AMBUSH_RETURN_TO_MADELYN,
                MyMissionID.JUNKYARD_EAC_AMBUSH_RETUR_TO_MADELYN,
                MyTextsWrapperEnum.EAC_AMBUSH_RETURN_TO_MADELYN_DESC,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_DESTROY_GENERATOR },
                new TimeSpan(0, 0, 45),
                new MyMissionLocation(baseSector, (uint)EntityID.ReturnToMadelyn)
                ) { SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_AMBUSH_1000, HudName = MyTextsWrapperEnum.HudMadelynsSapho };
            returnToMadelyn.OnMissionLoaded += ReturnToMadelyn_Loaded;
            m_objectives.Add(returnToMadelyn);

            m_defendMadelyn2 = new MyObjective(
                MyTextsWrapperEnum.EAC_AMBUSH_DEFEND_MADELYN2,
                MyMissionID.JUNKYARD_EAC_AMBUSH_DEFEND_MADELYN,
                MyTextsWrapperEnum.EAC_AMBUSH_DEFEND_MADELYN2_DESC,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_EAC_AMBUSH_RETUR_TO_MADELYN },
                null
            ) { StartDialogId = MyDialogueEnum.EAC_AMBUSH_1200_1300 };
            m_defendMadelyn2.OnMissionLoaded += DefendMadelyn2_Loaded;
            m_defendMadelyn2.OnMissionUpdate += DefendMadelyn2_Update;
            m_objectives.Add(m_defendMadelyn2);

            #endregion
        }
        public MyFortValiantMission() : base()
        {
            ID                         = MyMissionID.FORT_VALIANT; /* ID must be added to MyMissions.cs */
            Name                       = MyTextsWrapperEnum.FORT_VALIANT;
            Description                = MyTextsWrapperEnum.FORT_VALIANT_Description;
            DebugName                  = new StringBuilder("09a-Fort Valiant A"); // Name of mission
            RequiredMissions           = new MyMissionID[] { MyMissionID.JUNKYARD_RETURN };
            RequiredActors             = new MyActorEnum[] { MyActorEnum.MADELYN, MyActorEnum.MARCUS, MyActorEnum.TARJA, MyActorEnum.VALENTIN };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.FORT_VALIANT_VISIT_VENDOR };

            #region Objectives
            m_objectives = new List <MyObjective>(); // Creating of list of submissions

            var flyOne = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_FLY_ONE_Name),
                MyMissionID.FORT_VALIANT_FLY_ONE,
                (MyTextsWrapperEnum.FORT_VALIANT_FLY_ONE_Description),
                null,
                this,
                new MyMissionID[] {},
                new MyMissionLocation(baseSector, (uint)EntityID.VendorSpeakDetector1),
                null,
                null,
                MyDialogueEnum.FORT_VALIANT_A_0100
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudFortValiant
            };
            m_objectives.Add(flyOne);


            var speakGateKeeper = new MyMeetObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_SPEAK_GATE_KEEPER_Name),
                MyMissionID.FORT_VALIANT_SPEAK_GATE_KEEPER,
                (MyTextsWrapperEnum.FORT_VALIANT_SPEAK_GATE_KEEPER_Description),
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_FLY_ONE },
                (uint)EntityID.DetecorGateKeeper,
                (uint)EntityID.GateKeeper,
                25,
                0.25f,

                MyDialogueEnum.FORT_VALIANT_A_0200,
                null,
                false
                )
            {
                SaveOnSuccess = true, FollowMe = false
            };
            m_objectives.Add(speakGateKeeper);


            var speakCaptain = new MyMeetObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_MEET_CAPTAIN_Name),
                MyMissionID.FORT_VALIANT_MEET_CAPTAIN,
                (MyTextsWrapperEnum.FORT_VALIANT_MEET_CAPTAIN_Description),
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_SPEAK_GATE_KEEPER },
                (uint)EntityID.DetectorCaptain,
                (uint)EntityID.Captain,
                50,
                0.25f,
                MyDialogueEnum.FORT_VALIANT_A_0300,
                null,
                false
                )
            {
                SaveOnSuccess = true, FollowMe = false
            };
            speakCaptain.OnMissionLoaded  += SpeakCaptainOnOnMissionLoaded;
            speakCaptain.OnMissionSuccess += SpeakCaptainOnOnMissionSuccess;
            m_objectives.Add(speakCaptain);

            m_visitVendor = new MyObjectiveEnterInventory(
                (MyTextsWrapperEnum.FORT_VALIANT_VISIT_VENDOR_Name),
                MyMissionID.FORT_VALIANT_VISIT_VENDOR,
                (MyTextsWrapperEnum.FORT_VALIANT_VISIT_VENDOR_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_MEET_CAPTAIN },
                (uint)EntityID.Vendor
                );
            m_visitVendor.OnMissionLoaded += MVisitVendorOnOnMissionLoaded;
            m_objectives.Add(m_visitVendor);
            #endregion
        }
        public MyBarthsMoonPlantMission()
            : base(MyMissionID.BARTHS_MOON_PLANT,
                   new StringBuilder("15-Barth's moon plant"),
                   MyTextsWrapperEnum.BARTHS_MOON_PLANT,
                   MyTextsWrapperEnum.BARTHS_MOON_PLANT_Description,
                   new MyMissionID[] { MyMissionID.RIFT },
                   new EntityID[] { EntityID.BuildContainer4 },
                   EntityID.PlayerStartLocationPlant)
        {
            m_objectives = new List<MyObjective>();
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.BARTHS_MOON_PLANT_TALK_BARTH };
            RequiredActors = new MyActorEnum[] { MyActorEnum.MADELYN, MyActorEnum.VALENTIN, MyActorEnum.TARJA };
            RequiredMissions = new MyMissionID[] { MyMissionID.RIFT };

            #region Objectives
            var saveThomas = new MyTimedMeetObjective(
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_SAVE_BARTH_Name),
                MyMissionID.BARTHS_MOON_PLANT_SAVE_BARTH,
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_SAVE_BARTH_Description),
                this,
                new MyMissionID[] { },
                (uint)EntityID._01Detector,
                (uint)EntityID._01SmallShipBarth,
                100,
                0.25f,
                new TimeSpan(0, 1, 30),
                startDialogueId: MyDialogueEnum.BARTHS_MOON_PLANT_0100,
                successDialogueId: MyDialogueEnum.BARTHS_MOON_PLANT_0200,
                stopFollow: false
                ) { SaveOnSuccess = true, PathName = "BarthEs" };
            saveThomas.Components.Add(new MyMovingEntity((uint)EntityID._01PirateShip, (uint)EntityID._01PirateShiptarget, (int)new TimeSpan(0, 1, 30).TotalMilliseconds));
            saveThomas.OnMissionLoaded += SaveThomas_Loaded;
            m_objectives.Add(saveThomas);

            var killAttackers = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_KILL_ATTACKERS_Name),
                MyMissionID.BARTHS_MOON_PLANT_KILL_ATTACKERS,
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_KILL_ATTACKERS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.BARTHS_MOON_PLANT_SAVE_BARTH },
                null,
                m_02SpawnPoints,
                false
                ) { SaveOnSuccess = true, };
            killAttackers.OnMissionLoaded += KillAttackers_Loaded;
            m_objectives.Add(killAttackers);


            var getTurrets = new MyUseObjective(
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_DEFENCE_Name),
                MyMissionID.BARTHS_MOON_PLANT_DEFENCE,
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_DEFENCE_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.BARTHS_MOON_PLANT_KILL_ATTACKERS },
                new MyMissionLocation(baseSector, (uint)EntityID._03Dummy),
                MyTextsWrapperEnum.PressToTakeTurrets,
                MyTextsWrapperEnum.Turrets,
                MyTextsWrapperEnum.TransferInProgress,
                3000,
                startDialogId: MyDialogueEnum.BARTHS_MOON_PLANT_0300) { SaveOnSuccess = true };
            getTurrets.OnMissionLoaded += GetTurrets_Loaded;
            getTurrets.OnMissionSuccess += GetTurrets_Success;
            m_objectives.Add(getTurrets);



            m_buildDefenses = new MyTimedObjective(
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_BUILD_DEFENCE_LINE_Name),
                MyMissionID.BARTHS_MOON_PLANT_BUILD_DEFENCE_LINE,
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_BUILD_DEFENCE_LINE_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.BARTHS_MOON_PLANT_DEFENCE },
                new TimeSpan(0, 0, minutes: 1, seconds: 30)

                ) { DisplayCounter = true, SaveOnSuccess = true };
            m_buildDefenses.OnMissionLoaded += BuildDefenses_Loaded;
            m_buildDefenses.OnMissionUpdate += BuildDefenses_Update;
            m_buildDefenses.OnMissionCleanUp += BuildDefenses_Unloaded;
            m_objectives.Add(m_buildDefenses);



            m_protectBarth = new MyTimedObjective(
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_PROTECT_BARTH_Name),
                MyMissionID.BARTHS_MOON_PLANT_PROTECT_BARTH,
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_PROTECT_BARTH_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.BARTHS_MOON_PLANT_BUILD_DEFENCE_LINE },
                new TimeSpan(0, minutes: 2, seconds: 0),
                true
                ) { DisplayCounter = false, SaveOnSuccess = true, StartDialogId = MyDialogueEnum.BARTHS_MOON_PLANT_0400, MakeEntityIndestructible = false };
            m_protectBarth.MissionEntityIDs.Add((uint)EntityID._01SmallShipBarth);
            m_protectBarth.Components.Add(new MyMovingEntity((uint)EntityID._05PirateShip, (uint)EntityID._01PirateShiptarget, (int)m_protectBarth.SubmissionDuration.TotalMilliseconds));
            m_protectBarth.Components.Add(new MyMovingEntity((uint)EntityID._05PirateBigShip, (uint)EntityID._05PirateBigShipTarget, (int)m_protectBarth.SubmissionDuration.TotalMilliseconds));
            m_protectBarth.OnMissionLoaded += ProtectBarth_Loaded;
            m_protectBarth.OnMissionCleanUp += ProtectBarth_Unloaded;
            m_protectBarth.OnMissionSuccess += ProtectBarth_Success;
            m_objectives.Add(m_protectBarth);


            m_protectMadelyn = new MyTimedObjective(
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_PROTECT_MADELYN_Name),
                MyMissionID.BARTHS_MOON_PLANT_PROTECT_MADELYN,
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_PROTECT_MADELYN_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.BARTHS_MOON_PLANT_PROTECT_BARTH },
                new TimeSpan(0, minutes: 3, seconds: 0),
                true) { SaveOnSuccess = true, DisplayCounter = false, HudName = MyTextsWrapperEnum.HudCommandCenter };
            m_protectMadelyn.OnMissionLoaded += ProtectMadelyn_Loaded;
            m_protectMadelyn.OnMissionSuccess += ProtectMadelyn_Success;
            m_protectMadelyn.OnMissionCleanUp += ProtectMadelyn_CleanUp;
            m_protectMadelyn.OnMissionUpdate += ProtectMadelyn_Update;
            m_protectMadelyn.Components.Add(new MyTimedDialogue(new TimeSpan(0, 0, 5), MyDialogueEnum.BARTHS_MOON_PLANT_0600));
            m_objectives.Add(m_protectMadelyn);


            m_lastStand = new MyTimedObjective(
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_ENEMY_Name),
                MyMissionID.BARTHS_MOON_PLANT_ENEMY,
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_ENEMY_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.BARTHS_MOON_PLANT_PROTECT_MADELYN },
                new TimeSpan(0, 0, 50),
                true
            ) { /*DisplayCounter = false, */ SaveOnSuccess = true, StartDialogId = MyDialogueEnum.BARTHS_MOON_PLANT_0800 };
            m_lastStand.Components.Add(new MyMovingEntity((uint)EntityID._05PirateShip, (uint)EntityID._07PirateShipTarget, (int)m_lastStand.SubmissionDuration.TotalMilliseconds));
            m_lastStand.Components.Add(new MyMovingEntity((uint)EntityID._05PirateBigShip, (uint)EntityID._07PirateBigShipTarget, (int)m_lastStand.SubmissionDuration.TotalMilliseconds));
            m_lastStand.OnMissionLoaded += LastStand_Loaded;
            m_lastStand.OnMissionCleanUp += LastStand_CleanUp;
            m_objectives.Add(m_lastStand);


            m_destroyGenerators = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_DESTROY_GENERATORS_Name),
                MyMissionID.BARTHS_MOON_PLANT_DESTROY_GENERATORS,
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_DESTROY_GENERATORS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.BARTHS_MOON_PLANT_ENEMY },
                new List<uint> { (uint)EntityID._08generator1, (uint)EntityID._08generator2 },         // entities needed to kill
                new List<uint> { },  // spawnpoint from which bots must be killed
                true,
                false // dont count 
            ) { SaveOnSuccess = true, StartDialogId = MyDialogueEnum.BARTHS_MOON_PLANT_0900, HudName = MyTextsWrapperEnum.HudGenerator };
            m_destroyGenerators.OnMissionSuccess += DestroyGenerators_Success;
            m_destroyGenerators.OnMissionLoaded += DestroyGenerators_Loaded;
            m_objectives.Add(m_destroyGenerators);



            var getComponents = new MyUseObjective(
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_GET_NEEDED_COMPONENTS_Name),
                MyMissionID.BARTHS_MOON_PLANT_GET_NEEDED_COMPONENTS,
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_GET_NEEDED_COMPONENTS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.BARTHS_MOON_PLANT_DESTROY_GENERATORS },
                new MyMissionLocation(baseSector, (uint)EntityID.GetNeededComponentsDummy),
                MyTextsWrapperEnum.PressToPickItems,
                MyTextsWrapperEnum.Items,
                MyTextsWrapperEnum.PickingInProgress,
                4000,
                MyUseObjectiveType.Taking,
                startDialogId: MyDialogueEnum.BARTHS_MOON_PLANT_1000) { SaveOnSuccess = true };
            getComponents.OnMissionLoaded += GetComponents_Loaded;
            getComponents.OnMissionSuccess += GetComponents_Success;
            m_objectives.Add(getComponents);

            var buildPlant = new MyUseObjective(
                    (MyTextsWrapperEnum.BARTHS_MOON_PLANT_BUILD_PLANT_Name),
                    MyMissionID.BARTHS_MOON_PLANT_BUILD_PLANT,
                    (MyTextsWrapperEnum.BARTHS_MOON_PLANT_BUILD_PLANT_Description),
                    null,
                    this,
                    new MyMissionID[] { MyMissionID.BARTHS_MOON_PLANT_GET_NEEDED_COMPONENTS },
                    new MyMissionLocation(baseSector, (uint)EntityID.ConstructDetector),
                    MyTextsWrapperEnum.PressToBuildTransmitter,
                    MyTextsWrapperEnum.Items,
                    MyTextsWrapperEnum.BuildingInProgress,
                    4000,
                    MyUseObjectiveType.Activating,
                    startDialogId: MyDialogueEnum.BARTHS_MOON_PLANT_1100) { SaveOnSuccess = true };
            buildPlant.OnMissionLoaded += new MissionHandler(BuildPlant_OnMissionLoaded);
            buildPlant.OnMissionSuccess += new MissionHandler(BuildPlant_OnMissionSuccess);
            m_objectives.Add(buildPlant);

            var constructDetectors = new MyUseObjective(
                    (MyTextsWrapperEnum.BARTHS_MOON_PLANT_CONSTRUCT_DETECTORS_Name),
                    MyMissionID.BARTHS_MOON_PLANT_CONSTRUCT_DETECTORS,
                    (MyTextsWrapperEnum.BARTHS_MOON_PLANT_CONSTRUCT_DETECTORS_Description),
                    null,
                    this,
                    new MyMissionID[] { MyMissionID.BARTHS_MOON_PLANT_BUILD_PLANT },
                    new MyMissionLocation(baseSector, (uint)EntityID.ConstructDetector),
                    MyTextsWrapperEnum.PressToBuildTransmitter,
                    MyTextsWrapperEnum.Items,
                    MyTextsWrapperEnum.BuildingInProgress,
                    4000,
                    MyUseObjectiveType.Activating) { SaveOnSuccess = true };
            constructDetectors.OnMissionLoaded +=new MissionHandler(ConstructDetectors_Loaded);
            constructDetectors.OnMissionSuccess += new MissionHandler(ConstructDetectors_Success);
            m_objectives.Add(constructDetectors);



            m_barthEndDialogue = new MyMeetObjective(
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_TALK_BARTH_Name),
                MyMissionID.BARTHS_MOON_PLANT_TALK_BARTH,
                (MyTextsWrapperEnum.BARTHS_MOON_PLANT_TALK_BARTH_Description),
                this,
                new MyMissionID[] { MyMissionID.BARTHS_MOON_PLANT_CONSTRUCT_DETECTORS },
                (uint)EntityID._01Detector,
                (uint)EntityID._01SmallShipBarth,
                50,
                0.25f,
                successDialogueId: MyDialogueEnum.BARTHS_MOON_PLANT_1200
            ) { SaveOnSuccess = true, FollowMe = false, PathName = "Group23", MakeEntityIndestructible = false };
            m_barthEndDialogue.OnMissionLoaded += BarthEndDialogue_Loaded;
            m_objectives.Add(m_barthEndDialogue);
            #endregion
        }
        public MyFortValiantMissionC()
            : base()
        {
            ID = MyMissionID.FORT_VALIANT_C; /* ID must be added to MyMissions.cs */
            DebugName = new StringBuilder("09e-Fort Valiant C"); // Name of mission
            Name = MyTextsWrapperEnum.FORT_VALIANT_C;
            Description = MyTextsWrapperEnum.FORT_VALIANT_C_Description;
            RequiredActors = new MyActorEnum[] { MyActorEnum.MADELYN, MyActorEnum.MARCUS, MyActorEnum.TARJA, MyActorEnum.VALENTIN };
            Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocationC); //StartLocationC Starting dummy point - must by typecasted to uint and referenced from EntityID enum
            RequiredMissions = new MyMissionID[] { MyMissionID.SLAVER_BASE_2 };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.FORT_VALIANT_C_PICK_UP_EQUIP };
            AchievementName = MySteamAchievementNames.Mission17_FortValiantDungeons;

            #region Objectives
            m_objectives = new List<MyObjective>();

            var speakCaptain = new MyMeetObjective(
                 (MyTextsWrapperEnum.FORT_VALIANT_C_CAPTAIN_Name),
                 MyMissionID.FORT_VALIANT_C_CAPTAIN,
                 (MyTextsWrapperEnum.FORT_VALIANT_C_CAPTAIN_Description),
                 this,
                 new MyMissionID[] { },
                 (uint)EntityID.CaptainDummy,
                 (uint)EntityID.Captain,
                 50,
                 0.25f,
                 MyDialogueEnum.FORT_VALIANT_C_0100,
                 null,
                 false
            ) { SaveOnSuccess = true, FollowMe = false, StartDialogId = MyDialogueEnum.FORT_VALIANT_C_0100_BEGIN, HudName = MyTextsWrapperEnum.HudCaptainCedric };
            speakCaptain.OnMissionSuccess += SpeakCaptainOnOnMissionSuccess;
            m_objectives.Add(speakCaptain);


            var reachUpperFloor = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_UPPER_FLOOR_Name),
                MyMissionID.FORT_VALIANT_C_UPPER_FLOOR,
                (MyTextsWrapperEnum.FORT_VALIANT_C_UPPER_FLOOR_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_CAPTAIN },
                new MyMissionLocation(baseSector, (uint)EntityID.UpperFloorDummy)
                ) { HudName = MyTextsWrapperEnum.Nothing };
            m_objectives.Add(reachUpperFloor);



            var meetRoyal = new MyMeetObjective(
                 (MyTextsWrapperEnum.FORT_VALIANT_C_EQUIP_TALK_Name),
                 MyMissionID.FORT_VALIANT_C_EQUIP_TALK,
                 (MyTextsWrapperEnum.FORT_VALIANT_C_EQUIP_TALK_Description),
                 this,
                 new MyMissionID[] { MyMissionID.FORT_VALIANT_C_UPPER_FLOOR },
                 (uint)EntityID.RoyalDummy,
                 (uint)EntityID.BotRoyal,
                 50,
                 0.25f,
                 MyDialogueEnum.FORT_VALIANT_C_0200,
                 null,
                 false
            ) { SaveOnSuccess = true, FollowMe = false };
            m_objectives.Add(meetRoyal);


            var giveoutEquipment = new MyUseObjective(
                   (MyTextsWrapperEnum.FORT_VALIANT_C_EQUIP_Name),
                   MyMissionID.FORT_VALIANT_C_EQUIP,
                   (MyTextsWrapperEnum.FORT_VALIANT_C_EQUIP_Description),
                   null,
                   this,
                   new MyMissionID[] { MyMissionID.FORT_VALIANT_C_EQUIP_TALK },
                   new MyMissionLocation(baseSector, (uint)EntityID.RoyalCargoBoxDetector),
                   MyTextsWrapperEnum.PressToGiveEquipment,
                   MyTextsWrapperEnum.CargoBox,
                   MyTextsWrapperEnum.TransferInProgress,
                   3000,
                   MyUseObjectiveType.Activating
            ) { SaveOnSuccess = true };
            giveoutEquipment.OnMissionSuccess += GiveoutEquipmentOnOnMissionSuccess;
            m_objectives.Add(giveoutEquipment);



            var meetOfficers = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_MEET_OFFICIALS_Name),
                MyMissionID.FORT_VALIANT_C_MEET_OFFICIALS,
                (MyTextsWrapperEnum.FORT_VALIANT_C_MEET_OFFICIALS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_EQUIP },
                new MyMissionLocation(baseSector, (uint)EntityID.OfficalsDetector),
                null
                ) { StartDialogId = MyDialogueEnum.FORT_VALIANT_C_0300, SuccessDialogId = MyDialogueEnum.FORT_VALIANT_C_0400, HudName = MyTextsWrapperEnum.HudChamber };
            m_objectives.Add(meetOfficers);


            var leaveOfficers = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_LEAVE_OFFICIALS_Name),
                MyMissionID.FORT_VALIANT_C_LEAVE_OFFICIALS,
                (MyTextsWrapperEnum.FORT_VALIANT_C_LEAVE_OFFICIALS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_MEET_OFFICIALS },
                new MyMissionLocation(baseSector, (uint)EntityID.OfficalsleaveDetector),
                null
                ) { SuccessDialogId = MyDialogueEnum.FORT_VALIANT_C_0500, HudName = MyTextsWrapperEnum.Nothing };
            m_objectives.Add(leaveOfficers);

            var followPath = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_LEAVE_FOLLOW_Name),
                MyMissionID.FORT_VALIANT_C_LEAVE_FOLLOW,
                (MyTextsWrapperEnum.FORT_VALIANT_C_LEAVE_FOLLOW_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_LEAVE_OFFICIALS },
                new MyMissionLocation(baseSector, (uint)EntityID.FollowPathDetector),
                null,
                null) { HudName = MyTextsWrapperEnum.Nothing };
            m_objectives.Add(followPath);

            var speakWithSir = new MyMeetObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_SPEAK_SIR_Name),
                MyMissionID.FORT_VALIANT_C_SPEAK_SIR,
                 (MyTextsWrapperEnum.FORT_VALIANT_C_SPEAK_SIR_Description),
                 this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_LEAVE_FOLLOW },
                 (uint)EntityID.SirBendivereDummy,
                 (uint)EntityID.BotTemplar,
                 50,
                 0.25f,
                 MyDialogueEnum.FORT_VALIANT_C_0600,
                 null,
                 false
            ) { SaveOnSuccess = true, FollowMe = false, HudName = MyTextsWrapperEnum.HudSirGeraint };
            m_objectives.Add(speakWithSir);


            var getItemsFromCargoBoxes = new MyObjectiveGetItems(
                (MyTextsWrapperEnum.FORT_VALIANT_C_GET_EQUP_CARGO_Name),
                MyMissionID.FORT_VALIANT_C_GET_EQUP_CARGO,
                (MyTextsWrapperEnum.FORT_VALIANT_C_GET_EQUP_CARGO_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_SPEAK_SIR },
                new List<MyItemToGetDefinition>() {
                            new MyItemToGetDefinition(MyMwcObjectBuilderTypeEnum.SmallShip_HackingTool, (int)MyMwcObjectBuilder_SmallShip_HackingTool_TypesEnum.Level_1)},
                new List<uint>() { (uint)EntityID.CargoBox }
            ) { SaveOnSuccess = true };
            m_objectives.Add(getItemsFromCargoBoxes);



            var findEntrance = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_FOLLOW_FIND_VENTILATION_Name),
                MyMissionID.FORT_VALIANT_C_FOLLOW_FIND_VENTILATION,
                (MyTextsWrapperEnum.FORT_VALIANT_C_FOLLOW_FIND_VENTILATION_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_GET_EQUP_CARGO },
                new MyMissionLocation(baseSector, (uint)EntityID.Ventilation),
                null,
                null) { StartDialogId = MyDialogueEnum.FORT_VALIANT_C_0700, HudName = MyTextsWrapperEnum.HudEntrance };
            findEntrance.OnMissionLoaded += FindEntranceOnOnMissionLoaded;
            m_objectives.Add(findEntrance);
            

            var disableScanner = new MyObjectiveDisablePrefabs(
                  (MyTextsWrapperEnum.FORT_VALIANT_C_FOLLOW_TURN_OFF_GATE_Name),
                  MyMissionID.FORT_VALIANT_C_FOLLOW_TURN_OFF_GATE,
                  (MyTextsWrapperEnum.FORT_VALIANT_C_FOLLOW_TURN_OFF_GATE_Description),
                    null,
                    this,
                    new MyMissionID[] { MyMissionID.FORT_VALIANT_C_FOLLOW_FIND_VENTILATION },
                    new List<uint> { (uint)EntityID.DisableScanner },
                    new List<uint> { (uint)EntityID.DisableScannerHub },
                    false,
                    false
                ) { SaveOnSuccess = true, StartDialogId = MyDialogueEnum.FORT_VALIANT_C_0800, HudName = MyTextsWrapperEnum.HudSecurityHub };
            disableScanner.OnMissionLoaded += DisableScannerOnOnMissionLoaded;
            m_objectives.Add(disableScanner);

            var scanners1 = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS1_Name),
                MyMissionID.FORT_VALIANT_C_SCANNERS1,
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS1_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_FOLLOW_TURN_OFF_GATE },
                new MyMissionLocation(baseSector, (uint)EntityID.ScannersLocation1)) { SaveOnSuccess = true, StartDialogId = MyDialogueEnum.FORT_VALIANT_C_1000, HudName = MyTextsWrapperEnum.Nothing };
            //scanners1.Components.Add(new MyDetectorDialogue((uint)EntityID.DetectorGuardsDialogue, MyDialogueEnum.FORT_VALIANT_C_1100));
            scanners1.Components.Add(new MyDetectorDialogue((uint)EntityID.DetectorSensorsDialogue, MyDialogueEnum.FORT_VALIANT_C_1200));
            m_objectives.Add(scanners1);


            var scanners2 = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS2_Name),
                MyMissionID.FORT_VALIANT_C_SCANNERS2,
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS2_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_SCANNERS1 },
                new MyMissionLocation(baseSector, (uint)EntityID.ScannersLocation2)) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.Nothing };
            scanners2.OnMissionSuccess += Scanners2OnOnMissionSuccess;
            m_objectives.Add(scanners2);

            
            var scanners23 = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS23_Name),
                MyMissionID.FORT_VALIANT_C_SCANNERS23,
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS23_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_SCANNERS2 },
                new MyMissionLocation(baseSector, (uint)EntityID.ScannersLocation23)) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.Nothing };
            m_objectives.Add(scanners23);
            
            m_findArtifact = new MyUseObjective(
               (MyTextsWrapperEnum.FORT_VALIANT_C_TAKE_ARTEFACT_Name),
               MyMissionID.FORT_VALIANT_C_TAKE_ARTEFACT,
               (MyTextsWrapperEnum.FORT_VALIANT_C_TAKE_ARTEFACT_Description),
               null,
               this,
               new MyMissionID[] { MyMissionID.FORT_VALIANT_C_SCANNERS23 },
               null,
               MyTextsWrapperEnum.NotificationTakeArtifact,
               MyTextsWrapperEnum.Artifact,
               MyTextsWrapperEnum.TakingInProgress,
               3000,
               MyUseObjectiveType.Taking,
               null,
               null,
               null,
               new List<uint>() { (uint)EntityID.Box1Marker, (uint)EntityID.Box2Marker, (uint)EntityID.Box3Marker, (uint)EntityID.Box4Marker },
               (uint)EntityID.ArtifactDummy
            ) { SaveOnSuccess = true, StartDialogId = MyDialogueEnum.FORT_VALIANT_C_1400 };
            m_findArtifact.OnMissionLoaded += FindArtifactOnOnMissionLoaded;
            m_findArtifact.OnMissionSuccess += FindArtifactOnOnMissionSuccess;
            m_findArtifact.Components.Add(new MyTimedDialogue(new TimeSpan(0,0,10),MyDialogueEnum.FORT_VALIANT_C_1500 ));
            m_objectives.Add(m_findArtifact);


            var vault = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_VALUT_Name),
                MyMissionID.FORT_VALIANT_C_VALUT,
                (MyTextsWrapperEnum.FORT_VALIANT_C_VALUT_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_TAKE_ARTEFACT },
                new MyMissionLocation(baseSector, (uint)EntityID.ScannersLocation2)) { HudName = MyTextsWrapperEnum.Nothing };
            vault.Components.Add(new MyDetectorDialogue((uint)EntityID.DetectorSecurityFields, MyDialogueEnum.FORT_VALIANT_C_1700));
            vault.Components.Add(new MyDetectorDialogue((uint)EntityID.DetectorOpenDoors, MyDialogueEnum.FORT_VALIANT_C_1800));
            vault.Components.Add(new MyDetectorDialogue((uint)EntityID.DetectorComputer, MyDialogueEnum.FORT_VALIANT_C_1900));
            m_objectives.Add(vault);

            m_disableScanner2 = new MyObjectiveDisablePrefabs(
                  (MyTextsWrapperEnum.FORT_VALIANT_C_TURN_OFF_SCANNER_Name),
                  MyMissionID.FORT_VALIANT_C_TURN_OFF_SCANNER,
                  (MyTextsWrapperEnum.FORT_VALIANT_C_TURN_OFF_SCANNER_Description),
                    null,
                    this,
                    new MyMissionID[] { MyMissionID.FORT_VALIANT_C_VALUT },
                    new List<uint> { (uint)EntityID.DisableSnanners2 },
                    new List<uint> { (uint)EntityID.DisableScanner2Hub },
                    false

                ) { SaveOnSuccess = true, SuccessDialogId = MyDialogueEnum.FORT_VALIANT_C_2100, HudName = MyTextsWrapperEnum.HudSecurityHub };
            m_disableScanner2.OnMissionSuccess += DisableScanner2_Success;
            m_objectives.Add(m_disableScanner2);

            var scanners4 = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS4_Name),
                MyMissionID.FORT_VALIANT_C_SCANNERS4,
                (MyTextsWrapperEnum.FORT_VALIANT_C_SCANNERS4_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_TURN_OFF_SCANNER },
                new MyMissionLocation(baseSector, (uint)EntityID.HigherFloors)) { HudName = MyTextsWrapperEnum.Nothing };
            m_objectives.Add(scanners4);


            var elevator = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_TOP_ELEVATOR_Name),
                MyMissionID.FORT_VALIANT_C_TOP_ELEVATOR,
                (MyTextsWrapperEnum.FORT_VALIANT_C_TOP_ELEVATOR_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_SCANNERS4 },
                new MyMissionLocation(baseSector, (uint)EntityID.ElevatorDummy)) { HudName = MyTextsWrapperEnum.Nothing };
            m_objectives.Add(elevator);


            var escape = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_VENT_SYSTEM_Name),
                MyMissionID.FORT_VALIANT_C_VENT_SYSTEM,
                (MyTextsWrapperEnum.FORT_VALIANT_C_VENT_SYSTEM_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_TOP_ELEVATOR },
                new MyMissionLocation(baseSector, (uint)EntityID.EscapeVentSystemDummy)) { SuccessDialogId = MyDialogueEnum.FORT_VALIANT_C_2300, HudName = MyTextsWrapperEnum.Nothing };
            m_objectives.Add(escape);


            var useCatacombs = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_CATACOMBS_Name),
                MyMissionID.FORT_VALIANT_C_CATACOMBS,
                (MyTextsWrapperEnum.FORT_VALIANT_C_CATACOMBS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_C_VENT_SYSTEM },
                new MyMissionLocation(baseSector, (uint)EntityID.EscapeCatacombsDummy)
                //startDialogId: dialog9
                ) { HudName = MyTextsWrapperEnum.Nothing };
            useCatacombs.OnMissionSuccess += UseCatacombsOnOnMissionSuccess;
            m_objectives.Add(useCatacombs);

            var getItemsFromCargoBoxes2 = new MyUseObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_C_PICK_UP_EQUIP_Name),
                MyMissionID.FORT_VALIANT_C_PICK_UP_EQUIP,
                (MyTextsWrapperEnum.FORT_VALIANT_C_PICK_UP_EQUIP_Description),
               null,
               this,
               new MyMissionID[] { MyMissionID.FORT_VALIANT_C_CATACOMBS },
               new MyMissionLocation(baseSector, (uint)EntityID.RoyalCargoBoxDetector),
               MyTextsWrapperEnum.PressToTakeCargo,
               MyTextsWrapperEnum.CargoBox,
               MyTextsWrapperEnum.TakingInProgress,
               3000,
               MyUseObjectiveType.Taking
               //startDialogId: dialog10
        ) { SaveOnSuccess = true,StartDialogId = MyDialogueEnum.FORT_VALIANT_C_2400};
            getItemsFromCargoBoxes2.Components.Add(new MyDetectorDialogue((uint)EntityID.GetItemsWayBackDialogue, MyDialogueEnum.FORT_VALIANT_C_2500));
            getItemsFromCargoBoxes2.OnMissionSuccess += GetItemsFromCargoBoxesOnOnMissionSuccess;
            m_objectives.Add(getItemsFromCargoBoxes2);
            #endregion
        }
        public MyPirateBaseMission()
        {
            ID = MyMissionID.PIRATE_BASE; /* ID must be added to MyMissions.cs */
            DebugName = new StringBuilder("04-Pirate base");
            Name = MyTextsWrapperEnum.PIRATE_BASE;
            Description = MyTextsWrapperEnum.PIRATE_BASE_Description;
            Flags = MyMissionFlags.Story;
            
            MyMwcVector3Int baseSector = new MyMwcVector3Int(190921, 0, 2152692);

            /* sector where the mission is located */
            Location = new MyMissionLocation(baseSector, 228782);

            RequiredMissions = new MyMissionID[] { MyMissionID.BARTHS_MOON_CONVINCE };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.PIRATE_BASE_ALLY_ARRIVED };
            RequiredActors = new MyActorEnum[] { MyActorEnum.MARCUS, MyActorEnum.MADELYN };

            m_objectives = new List<MyObjective>();

            // == Objective 01 ==
            var travel = new MyObjective(
                (MyTextsWrapperEnum.PIRATE_BASE_TRAVEL_TO_BASE_Name),
                MyMissionID.PIRATE_BASE_TRAVEL_TO_BASE,
                (MyTextsWrapperEnum.PIRATE_BASE_TRAVEL_TO_BASE_Description),
                null,
                this,
                new MyMissionID[] {  },
                new MyMissionLocation(baseSector, (uint)EntityID.FIND_PIRATE_BASE_LOCATION)
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.Nothing };

            travel.Components.Add(new MySpawnpointWaves((uint)EntityID.AMBUSH_1_DETECTOR, 0,
                new List<uint[]> { new uint[] { (uint)EntityID.AMBUSH_1_SPAWNPOINT_A }, new uint[] { (uint)EntityID.AMBUSH_1_SPAWNPOINT_B } }));

            travel.Components.Add(new MySpawnpointWaves((uint)EntityID.AMBUSH_2_DETECTOR, 0,
                new List<uint[]> { new uint[] { (uint)EntityID.AMBUSH_2_SPAWNPOINT_A }, new uint[] { (uint)EntityID.AMBUSH_2_SPAWNPOINT_B } }));

            travel.Components.Add(new MySpawnpointWaves((uint)EntityID.AMBUSH_3_DETECTOR, 0,
                new List<uint[]> { new uint[] { (uint)EntityID.AMBUSH_3_SPAWNPOINT_A }, new uint[] { (uint)EntityID.AMBUSH_3_SPAWNPOINT_B } }));

            travel.Components.Add(new MySpawnpointWaves((uint)EntityID.AMBUSH_4_DETECTOR, 0,
                new List<uint[]> { new uint[] { (uint)EntityID.AMBUSH_4_SPAWNPOINT_A }, new uint[] { (uint)EntityID.AMBUSH_4_SPAWNPOINT_B } }));

            travel.Components.Add(new MySpawnpointWaves((uint)EntityID.AMBUSH_5_DETECTOR, 0,
                new List<uint[]> { new uint[] { (uint)EntityID.AMBUSH_5_SPAWNPOINT_A }, new uint[] { (uint)EntityID.AMBUSH_5_SPAWNPOINT_B } }));

            travel.Components.Add(new MySpawnpointWaves((uint)EntityID.AMBUSH_6_DETECTOR, 0,
                new List<uint[]> { new uint[] { (uint)EntityID.AMBUSH_6_SPAWNPOINT_A }, new uint[] { (uint)EntityID.AMBUSH_6_SPAWNPOINT_B } }));

            //travel.OnMissionSuccess += ArrivedToBase;
            travel.OnMissionLoaded += Travel_OnMissionLoaded;
            travel.OnMissionCleanUp += Travel_OnMissionUnload;
            m_objectives.Add(travel);

            // == Objective 02 ==
            var speakWithPirates = new MyMeetObjective(
                (MyTextsWrapperEnum.PIRATE_BASE_SPEAK_WITH_PIRATES_Name),
                MyMissionID.PIRATE_BASE_SPEAK_WITH_PIRATES,
                (MyTextsWrapperEnum.PIRATE_BASE_SPEAK_WITH_PIRATES_Description),
                this,
                new MyMissionID[] { MyMissionID.PIRATE_BASE_TRAVEL_TO_BASE },
                null, (uint)EntityID.PIRATE_LEADER, 300) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudPirateCaptain };
            speakWithPirates.OnMissionLoaded += SpeakWithPirates_OnMissionLoaded;
            m_objectives.Add(speakWithPirates);

            // == Objective 03 ==
            var listenToCaptain = new MyObjectiveDialog(
                MyMissionID.PIRATE_BASE_LISTEN_TO_CAPTAIN,
                null,
                this,
                new MyMissionID[] { MyMissionID.PIRATE_BASE_SPEAK_WITH_PIRATES },
                MyDialogueEnum.PIRATE_BASE_0600);
            listenToCaptain.OnMissionLoaded += ListenToCaptain_OnMissionLoaded;
            listenToCaptain.OnMissionCleanUp += ListenToCaptain_OnMissionUnload;
            m_objectives.Add(listenToCaptain);

            // == Objective 04 ==
            var prepareForDefense = new MyObjective(
                (MyTextsWrapperEnum.PIRATE_BASE_PREPARE_FOR_DEFENSE_Name),
                MyMissionID.PIRATE_BASE_PREPARE_FOR_DEFENSE,
                (MyTextsWrapperEnum.PIRATE_BASE_PREPARE_FOR_DEFENSE_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.PIRATE_BASE_LISTEN_TO_CAPTAIN },
                new MyMissionLocation(baseSector, (uint)EntityID.PREPARE_FOR_DEFENSE_LOCATION),
                startDialogId: MyDialogueEnum.PIRATE_BASE_0800) { SaveOnSuccess = true };
            prepareForDefense.Components.Add(new MySpawnpointWaves((uint)EntityID.PREPARE_DETECTOR, 0, new List<uint[]> { new uint[] { (uint)EntityID.PREPARE_SPAWNPOINT0, (uint)EntityID.PREPARE_SPAWNPOINT1, (uint)EntityID.PREPARE_SPAWNPOINT2 } }));
            prepareForDefense.OnMissionLoaded += PrepareForDefense_OnMissionLoaded;
            m_objectives.Add(prepareForDefense);

            // == Objective 05 ==
            m_getTurrets = new MyUseObjective(
                (MyTextsWrapperEnum.PIRATE_BASE_GET_TURRETS_Name),
                MyMissionID.PIRATE_BASE_GET_TURRETS,
                (MyTextsWrapperEnum.PIRATE_BASE_GET_TURRETS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.PIRATE_BASE_PREPARE_FOR_DEFENSE },
                new MyMissionLocation(baseSector, (uint)EntityID.TURRET_PREFABS_DUMMY),
                MyTextsWrapperEnum.PressToTakeTurrets,
                MyTextsWrapperEnum.Turrets,
                MyTextsWrapperEnum.TransferInProgress,
                3000,
                objectiveType: MyUseObjectiveType.Taking) { SaveOnSuccess = true };
            m_getTurrets.OnMissionLoaded += GetTurrets_OnMissionLoaded;
            m_getTurrets.OnMissionSuccess += GetTurrets_OnMissionSuccess;
            m_objectives.Add(m_getTurrets);

            // == Objective 06 ==
            m_buildDefensesObjective = new MyTimedObjective(
                (MyTextsWrapperEnum.PIRATE_BASE_DEFENSE_SETUP_Name),
                MyMissionID.PIRATE_BASE_DEFENSE_SETUP,
                (MyTextsWrapperEnum.PIRATE_BASE_DEFENSE_SETUP_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.PIRATE_BASE_GET_TURRETS },
                new TimeSpan(0, 0, minutes: 5, seconds: 0)
                ) { SaveOnSuccess = true };
            
            m_buildDefensesObjective.OnMissionLoaded += BuildDefenses_OnMissionLoaded;
            m_buildDefensesObjective.OnMissionUpdate += BuildDefenses_OnMissionUpdate;
            m_buildDefensesObjective.OnMissionCleanUp += BuildDefenses_OnMissionUnloaded;
            m_buildDefensesObjective.OnMissionSuccess += BuildDefenses_OnMissionSuccess;
            m_objectives.Add(m_buildDefensesObjective);

            // == Objective 07 ==
            m_defendObjective = new MyTimedObjective(
                (MyTextsWrapperEnum.PIRATE_BASE_DEFEND_Name),
                MyMissionID.PIRATE_BASE_DEFEND,
                (MyTextsWrapperEnum.PIRATE_BASE_DEFEND_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.PIRATE_BASE_DEFENSE_SETUP },
                new TimeSpan(0, 0, minutes: 5, seconds: 0),
                startDialogId: MyDialogueEnum.PIRATE_BASE_0900
                ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudGenerator };
            
            m_defendObjective.OnMissionLoaded += Defend_OnMissionLoaded;
            m_defendObjective.OnMissionCleanUp += Defend_OnMissionUnloaded;
            m_defendObjective.OnMissionUpdate += Defend_OnMissionUpdate;
            m_defendObjective.OnMissionSuccess += Defend_OnMissionSuccess;

            m_defendObjective.Components.Add(new MyHeadshake((3*60)*1000, MyHeadshake.DefaultShaking));
            m_defendObjective.Components.Add(new MyHeadshake((6*60)*1000, MyHeadshake.DefaultShaking));
            m_defendObjective.Components.Add(new MyHeadshake((9*60)*1000, MyHeadshake.DefaultShaking));

            m_objectives.Add(m_defendObjective);

            // == Objective 08 ==
            m_allyArrivedObjective = new MyObjective(
                (MyTextsWrapperEnum.PIRATE_BASE_ALLY_ARRIVED_Name),
                MyMissionID.PIRATE_BASE_ALLY_ARRIVED,
                (MyTextsWrapperEnum.PIRATE_BASE_ALLY_ARRIVED_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.PIRATE_BASE_DEFEND },
                null,
                startDialogId: MyDialogueEnum.PIRATE_BASE_1100) { SaveOnSuccess = true };
            m_allyArrivedObjective.OnMissionLoaded += AllyArrived_OnMissionLoaded;
            m_allyArrivedObjective.OnMissionCleanUp += AllyArrived_OnMissionUnload;
            m_allyArrivedObjective.OnMissionUpdate += AllyArrived_OnMissionUpdate;
            m_allyArrivedObjective.OnMissionSuccess += AllyArrived_OnMissionSuccess;
            m_objectives.Add(m_allyArrivedObjective);

            /*
            var returnBackToMotherShip = new MyObjective(
                new StringBuilder("Return to your mothership"),
                MyMissionID.PIRATE_BASE_RETURN_BACK_TO_MOTHERSHIP,
                new StringBuilder(""),
                null,
                this,
                new MyMissionID[] { MyMissionID.PIRATE_BASE_ALLY_ARRIVED },
                new MyMissionLocation(baseSector, (uint)EntityID.MADELYN_DUMMY)
            ) { SaveOnSuccess = true };
            m_objectives.Add(returnBackToMotherShip);
             */
        }
Beispiel #11
0
        public MyJunkyardConvinceMission()
        {
            ID              = MyMissionID.JUNKYARD_CONVINCE;                    /* ID must be added to MyMissions.cs */
            Name            = MyTextsWrapperEnum.JUNKYARD_CONVINCE;
            Description     = MyTextsWrapperEnum.JUNKYARD_CONVINCE_Description; //"Convince the Smuggler to join you in your mission \n"
            DebugName       = new StringBuilder("08a-Junkyard");                // Name of mission
            Flags           = MyMissionFlags.Story;
            AchievementName = MySteamAchievementNames.Mission08_JunkyardDuncan;

            MyMwcVector3Int baseSector = new MyMwcVector3Int(2567538, 0, -172727);      // Story sector of the script - i.e. (-2465,0,6541)

            Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation); // Starting dummy point - must by typecasted to uint and referenced from EntityID enum

            RequiredMissions           = new MyMissionID[] { MyMissionID.LAST_HOPE };   // IDs of missions required to make this mission available
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_RETURN_TO_MS };
            RequiredActors             = new MyActorEnum[] { MyActorEnum.MARCUS, MyActorEnum.MADELYN, };

            #region Objectives
            m_objectives = new List <MyObjective>(); // Creating of list of submissions

            // ----- objectives -----

            m_objective01FindInformator = new MyMeetObjective(
                // One member of that list - its type defines the type of submission - MySubmission means fly to the dummypoint to success. Here it is var so you cannot call methods on it
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FIND_INFORMATOR_Name),
                // Name of the submission
                MyMissionID.JUNKYARD_CONVINCE_FIND_INFORMATOR,
                // ID of the submission - must be added to MyMissions.cs
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FIND_INFORMATOR_Description),
                // Description of the submission
                this,
                new MyMissionID[] { },
                // ID of submissions required to make this submission available - it is clear so this submission is the starting submission
                null,
                "RavenGirl",
                250,
                1.00f,
                startDialogueId: MyDialogueEnum.JUNKYARD_CONVINCE_0100_INTRODUCE
                )
            {
                // False means do not save game in that checkpoint
                SaveOnSuccess = false,
                FollowMe      = false
            };
            m_objective01FindInformator.OnMissionLoaded += O01FindInformatorLoaded;
            m_objectives.Add(m_objective01FindInformator);


            m_objective01BFindInformator = new MyObjectiveDialog(
                MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_FIND_INFORMATOR_Name,
                MyMissionID.JUNKYARD_CONVINCE_D_FIND_INFORMATOR,
                MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_FIND_INFORMATOR_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_FIND_INFORMATOR },
                dialogId: MyDialogueEnum.JUNKYARD_CONVINCE_0200_INFORMATOR
                )
            {
                SaveOnSuccess = false,
            };
            m_objective01BFindInformator.OnMissionLoaded  += O01BFindInformatorLoaded;
            m_objective01BFindInformator.OnMissionSuccess += O01BFindInformatorSuccess;
            m_objectives.Add(m_objective01BFindInformator);

            m_objective02FindSmuggler = new MyObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FIND_SMUGGLER_Name),
                MyMissionID.JUNKYARD_CONVINCE_FIND_SMUGGLER,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FIND_SMUGGLER_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_D_FIND_INFORMATOR },
                new MyMissionLocation(baseSector, (uint)EntityID.FindSmuggler)  // ID of dummy point of checkpoint
                )
            {
                SaveOnSuccess   = false,
                SuccessDialogId = MyDialogueEnum.JUNKYARD_CONVINCE_0300_RUN,
                HudName         = MyTextsWrapperEnum.HudManjeet
            };
            m_objective02FindSmuggler.OnMissionLoaded  += O02FindSmugglerLoaded;
            m_objective02FindSmuggler.OnMissionSuccess += O2FindSmugglerSuccess;
            m_objectives.Add(m_objective02FindSmuggler);

            m_objective04FollowSmuggler = new MyMeetObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FOLLOW_SMUGGLER_Name),
                MyMissionID.JUNKYARD_CONVINCE_FOLLOW_SMUGGLER,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FOLLOW_SMUGGLER_Description),
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_FIND_SMUGGLER },
                null,
                (uint)EntityID.Smuggler,
                300,
                1.00f
                )
            {
                SaveOnSuccess = false,
                FollowMe      = false
            };
            m_objective04FollowSmuggler.OnMissionLoaded  += O04FollowSmugglerLoaded;
            m_objective04FollowSmuggler.OnMissionSuccess += O04FollowSmugglerSuccess;
            m_objectives.Add(m_objective04FollowSmuggler);

            m_objective04DFollowSmuggler = new MyObjectiveDialog(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_FOLLOW_SMUGGLER_Name),
                MyMissionID.JUNKYARD_CONVINCE_D_FOLLOW_SMUGGLER,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_FOLLOW_SMUGGLER_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_FOLLOW_SMUGGLER },
                dialogId: MyDialogueEnum.JUNKYARD_CONVINCE_0500_CATCHED
                )
            {
                SaveOnSuccess = false,
            };
            m_objectives.Add(m_objective04DFollowSmuggler);
            m_objective04DFollowSmuggler.OnMissionLoaded  += O04DFollowSmugglerLoaded;
            m_objective04DFollowSmuggler.OnMissionSuccess += O04DFollowSmugglerSuccess;

            m_objective05GetCloserToEnemy = new MyObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FLY_TO_ENEMY_Name),
                MyMissionID.JUNKYARD_CONVINCE_FLY_TO_ENEMY,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FLY_TO_ENEMY_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_D_FOLLOW_SMUGGLER },
                new MyMissionLocation(baseSector, (uint)EntityID.FlyToEnemy),
                radiusOverride: 500f
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.Nothing
            };
            m_objective05GetCloserToEnemy.OnMissionLoaded += O05GetCloserToEnemyLoaded;
            m_objectives.Add(m_objective05GetCloserToEnemy);

            m_objective05MetZappasFirstGangman = new MyObjectiveDialog(
                MyMissionID.JUNKYARD_CONVINCE_MEET_GANGMAN,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_FLY_TO_ENEMY },
                dialogId: MyDialogueEnum.JUNKYARD_CONVINCE_0650_MET_ZAPPA_GUARD
                );
            m_objectives.Add(m_objective05MetZappasFirstGangman);
            m_objective05MetZappasFirstGangman.OnMissionLoaded  += O05MetZappasFirstGangmanLoaded;
            m_objective05MetZappasFirstGangman.OnMissionSuccess += O05MetZappasFirstGangmanSuccess;

            m_objective06KillWaves = new MyDestroyWavesObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_KILL_WAVES_Name),
                MyMissionID.JUNKYARD_CONVINCE_KILL_WAVES,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_KILL_WAVES_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_MEET_GANGMAN },
                null,
                null,
                null,
                null,
                4
                )
            {
                SaveOnSuccess = false
            };
            m_objective06KillWaves.AddWave(new List <uint> {
                (uint)EntityID.SP1_1, (uint)EntityID.SP1_2, (uint)EntityID.SP1_3, (uint)EntityID.SP1_4
            });
            m_objective06KillWaves.AddWave(new List <uint> {
                (uint)EntityID.SP2_1, (uint)EntityID.SP2_2
            });
            m_objective06KillWaves.AddWave(new List <uint> {
                (uint)EntityID.SP3_1, (uint)EntityID.SP3_2, (uint)EntityID.SP3_3
            });
            m_objective06KillWaves.OnMissionLoaded  += O06KillWavesLoaded;
            m_objective06KillWaves.OnMissionSuccess += O06KillWavesSuccess;
            m_objectives.Add(m_objective06KillWaves);

            m_objective07SpeakWithMomo = new MyMeetObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_SPEAK_WITH_MOMO_Name),
                MyMissionID.JUNKYARD_CONVINCE_SPEAK_WITH_MOMO,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_SPEAK_WITH_MOMO_Description),
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_KILL_WAVES },
                null,
                (uint?)null,
                500,
                1.00f
                )
            {
                SaveOnSuccess = false,
                FollowMe      = false
            };
            m_objectives.Add(m_objective07SpeakWithMomo);

            m_objective07DSpeakWithMomo = new MyObjectiveDialog(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_SPEAK_WITH_MOMO_Name),
                MyMissionID.JUNKYARD_CONVINCE_D_SPEAK_WITH_MOMO,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_SPEAK_WITH_MOMO_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_SPEAK_WITH_MOMO },
                dialogId: MyDialogueEnum.JUNKYARD_CONVINCE_0900_THE_MOMO
                )
            {
                SaveOnSuccess = false
            };
            m_objectives.Add(m_objective07DSpeakWithMomo);
            m_objective07DSpeakWithMomo.OnMissionLoaded  += O07DSpeakWithMomoLoaded;
            m_objective07DSpeakWithMomo.OnMissionSuccess += O07DSpeakWithMomoSuccess;

            m_objective08FightMomo = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FIGHT_MOMO_Name),
                MyMissionID.JUNKYARD_CONVINCE_FIGHT_MOMO,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FIGHT_MOMO_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_D_SPEAK_WITH_MOMO },
                null,
                new List <uint> {
                (uint)EntityID.SP4_1, (uint)EntityID.SP4_2, (uint)EntityID.MomoZappaSP
            },
                true
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.Nothing
            };
            m_objective08FightMomo.OnMissionLoaded += O08FightMomoLoaded;
            m_objectives.Add(m_objective08FightMomo);

            m_objective09ReturnToSmuggler = new MyMeetObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_RETURN_TO_SMUGGLER_Name),
                MyMissionID.JUNKYARD_CONVINCE_RETURN_TO_SMUGGLER,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_RETURN_TO_SMUGGLER_Description),
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_FIGHT_MOMO },
                null,
                (uint)EntityID.Smuggler,
                300,
                1.00f
                //startDialogueId: MyDialogueEnum.JUNKYARD_CONVINCE_1000_LAST_OF_THEM
                )
            {
                SaveOnSuccess = true, FollowMe = false
            };
            m_objective09ReturnToSmuggler.OnMissionLoaded += O09ReturnToSmugglerLoaded;
            m_objectives.Add(m_objective09ReturnToSmuggler);

            m_objective09DReturnToSmuggler = new MyObjectiveDialog(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_RETURN_TO_SMUGGLER_Name),
                MyMissionID.JUNKYARD_CONVINCE_D_RETURN_TO_SMUGGLER,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_RETURN_TO_SMUGGLER_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_RETURN_TO_SMUGGLER },
                dialogId: MyDialogueEnum.JUNKYARD_CONVINCE_1100_FIGHT_ENDS
                )
            {
                SaveOnSuccess = false
            };
            m_objectives.Add(m_objective09DReturnToSmuggler);
            m_objective09DReturnToSmuggler.OnMissionLoaded  += O09DReturnToSmugglerLoaded;
            m_objective09DReturnToSmuggler.OnMissionSuccess += O09DReturnToSmugglerSuccess;

            m_objective10FindBombDealer = new MyMeetObjective(
                // One member of that list - its type defines the type of submission - MySubmission means fly to the dummypoint to success. Here it is var so you cannot call methods on it
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_GO_TO_BOMB_DEALER_Name),
                // Name of the submission
                MyMissionID.JUNKYARD_CONVINCE_GO_TO_BOMB_DEALER,
                // ID of the submission - must be added to MyMissions.cs
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_GO_TO_BOMB_DEALER_Description),
                // Description of the submission
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_D_RETURN_TO_SMUGGLER },
                // ID of submissions required to make this submission available - it is clear so this submission is the starting submission
                null,
                (uint)EntityID.BombDealer,
                300,
                1.00f
                )
            {
                SaveOnSuccess  = false,
                RequiredActors = new MyActorEnum[] { MyActorEnum.TARJA, MyActorEnum.VALENTIN },
                FollowMe       = false
            };
            m_objective10FindBombDealer.OnMissionLoaded += O10FindBombDealerLoaded;
            m_objectives.Add(m_objective10FindBombDealer);

            m_objective10DFindBombDealer = new MyObjectiveDialog(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_GO_TO_BOMB_DEALER_Name),
                MyMissionID.JUNKYARD_CONVINCE_D_GO_TO_BOMB_DEALER,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_GO_TO_BOMB_DEALER_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_GO_TO_BOMB_DEALER },
                dialogId: MyDialogueEnum.JUNKYARD_CONVINCE_1300_BOMB_DEALER
                )
            {
                SaveOnSuccess = false
            };
            m_objectives.Add(m_objective10DFindBombDealer);
            m_objective10DFindBombDealer.OnMissionLoaded  += O10DFindBombDealerLoaded;
            m_objective10DFindBombDealer.OnMissionSuccess += O10DFindBombDealerSuccess;

            m_objective11GetToMarcus = new MyMeetObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_GO_TO_MARCUS_Name),
                MyMissionID.JUNKYARD_CONVINCE_GO_TO_MARCUS,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_GO_TO_MARCUS_Description),
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_D_GO_TO_BOMB_DEALER },
                null,
                "Marcus",
                300,
                1.00f
                )
            {
                SaveOnSuccess = true,
                FollowMe      = false,
            };
            m_objective11GetToMarcus.OnMissionLoaded  += O11GetToMarcusLoaded;
            m_objective11GetToMarcus.OnMissionSuccess += O11GetToMarcusSuccess;
            m_objectives.Add(m_objective11GetToMarcus);

            var objective11DGetToMarcus = new MyObjectiveDialog(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_GO_TO_MARCUS_Name),
                MyMissionID.JUNKYARD_CONVINCE_D_GO_TO_MARCUS,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_GO_TO_MARCUS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_GO_TO_MARCUS },
                dialogId: MyDialogueEnum.JUNKYARD_CONVINCE_1400_ARRIVED_AT_MARCUS
                )
            {
                SaveOnSuccess = false
            };
            m_objectives.Add(objective11DGetToMarcus);

            m_objective12BrFight = new MyDestroyWavesObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_BR_FIGHT_Name),
                MyMissionID.JUNKYARD_CONVINCE_BR_FIGHT,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_BR_FIGHT_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_D_GO_TO_MARCUS },
                new List <uint>
            {
                (uint)EntityID.BR_SP_1,
                (uint)EntityID.BR_SP_2,
                (uint)EntityID.BR_SP_3,
                (uint)EntityID.BR_SP_4,
                (uint)EntityID.BR_SP_Boss
            }
                )
            {
                SaveOnSuccess   = false,
                StartDialogId   = MyDialogueEnum.JUNKYARD_CONVINCE_1500_GANGSTER_FIGHT_STARTED,
                SuccessDialogId = MyDialogueEnum.JUNKYARD_CONVINCE_1600_GO_TO_MS
            };
            m_objective12BrFight.OnMissionLoaded  += O12BRFightLoaded;
            m_objective12BrFight.OnMissionSuccess += O12BRFightSuccess;
            m_objective12BrFight.AddWave(m_killWavesSecond1);
            m_objective12BrFight.AddWave(m_killWavesSecond2);
            m_objective12BrFight.AddWave(m_killWavesSecond3);
            m_objective12BrFight.AddWave(m_killWavesSecond4);
            m_objectives.Add(m_objective12BrFight);

            m_objective13FlyToMS = new MyObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_RETURN_TO_MS_Name),
                MyMissionID.JUNKYARD_CONVINCE_RETURN_TO_MS,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_RETURN_TO_MS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_BR_FIGHT },
                new MyMissionLocation(baseSector, MyMissionLocation.MADELYN_HANGAR),
                radiusOverride: 300f
                )
            {
                SaveOnSuccess   = true,
                SuccessDialogId = MyDialogueEnum.JUNKYARD_CONVINCE_1700_FINALE,
                HudName         = MyTextsWrapperEnum.HudMadelynsSapho
            };
            m_objectives.Add(m_objective13FlyToMS);
            #endregion

            m_spawns.AddRange(m_killWavesSecond1);
            m_spawns.AddRange(m_killWavesSecond2);
            m_spawns.AddRange(m_killWavesSecond3);
            m_spawns.AddRange(m_killWavesSecond4);
        }
        public MyFortValiantMission():base()
        {
            ID = MyMissionID.FORT_VALIANT; /* ID must be added to MyMissions.cs */
            Name = MyTextsWrapperEnum.FORT_VALIANT;
            Description = MyTextsWrapperEnum.FORT_VALIANT_Description;
            DebugName = new StringBuilder("09a-Fort Valiant A"); // Name of mission
            RequiredMissions = new MyMissionID[] { MyMissionID.JUNKYARD_RETURN };
            RequiredActors = new MyActorEnum[] { MyActorEnum.MADELYN, MyActorEnum.MARCUS, MyActorEnum.TARJA, MyActorEnum.VALENTIN };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.FORT_VALIANT_VISIT_VENDOR };

            #region Objectives
            m_objectives = new List<MyObjective>(); // Creating of list of submissions

            var flyOne = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_FLY_ONE_Name),
                MyMissionID.FORT_VALIANT_FLY_ONE,
                (MyTextsWrapperEnum.FORT_VALIANT_FLY_ONE_Description),
                null,
                this,
                new MyMissionID[] {},
                new MyMissionLocation(baseSector, (uint) EntityID.VendorSpeakDetector1),
                null,
                null,
                MyDialogueEnum.FORT_VALIANT_A_0100
            ){ SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudFortValiant };
            m_objectives.Add(flyOne);


            var speakGateKeeper = new MyMeetObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_SPEAK_GATE_KEEPER_Name),
                MyMissionID.FORT_VALIANT_SPEAK_GATE_KEEPER,
                (MyTextsWrapperEnum.FORT_VALIANT_SPEAK_GATE_KEEPER_Description),
                this,
                new MyMissionID[] {MyMissionID.FORT_VALIANT_FLY_ONE},
                (uint) EntityID.DetecorGateKeeper,
                (uint) EntityID.GateKeeper,
                25,
                0.25f,
                
                MyDialogueEnum.FORT_VALIANT_A_0200,
                null,
                false
            ){SaveOnSuccess =  true, FollowMe = false};
            m_objectives.Add(speakGateKeeper);
            
            
            var speakCaptain = new MyMeetObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_MEET_CAPTAIN_Name),
                MyMissionID.FORT_VALIANT_MEET_CAPTAIN,
                (MyTextsWrapperEnum.FORT_VALIANT_MEET_CAPTAIN_Description),
                this,
                new MyMissionID[] {MyMissionID.FORT_VALIANT_SPEAK_GATE_KEEPER},
                (uint) EntityID.DetectorCaptain,
                (uint) EntityID.Captain,
                50,
                0.25f,
                MyDialogueEnum.FORT_VALIANT_A_0300,
                null,
                false
                ){SaveOnSuccess = true, FollowMe = false};
            speakCaptain.OnMissionLoaded += SpeakCaptainOnOnMissionLoaded;
            speakCaptain.OnMissionSuccess += SpeakCaptainOnOnMissionSuccess;
            m_objectives.Add(speakCaptain);

            m_visitVendor = new MyObjectiveEnterInventory(
                (MyTextsWrapperEnum.FORT_VALIANT_VISIT_VENDOR_Name),
                MyMissionID.FORT_VALIANT_VISIT_VENDOR,
                (MyTextsWrapperEnum.FORT_VALIANT_VISIT_VENDOR_Description),
                null,
                this,
                new MyMissionID[] {MyMissionID.FORT_VALIANT_MEET_CAPTAIN},
                (uint)EntityID.Vendor
                );
            m_visitVendor.OnMissionLoaded += MVisitVendorOnOnMissionLoaded;
            m_objectives.Add(m_visitVendor);
            #endregion
        }
        public MyFortValiantMissionB()
            : base()
        {
            ID                         = MyMissionID.FORT_VALIANT_B;              /* ID must be added to MyMissions.cs */
            DebugName                  = new StringBuilder("09c-Fort Valiant B"); // Name of mission
            Name                       = MyTextsWrapperEnum.FORT_VALIANT_B;
            Description                = MyTextsWrapperEnum.FORT_VALIANT_B_Description;
            RequiredActors             = new MyActorEnum[] { MyActorEnum.MADELYN, MyActorEnum.MARCUS, MyActorEnum.TARJA, MyActorEnum.VALENTIN };
            RequiredMissions           = new MyMissionID[] { MyMissionID.SLAVER_BASE_1 };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.FORT_VALIANT_B_VISIT_VENDOR };
            m_objectives               = new List <MyObjective>(); // Creating of list of submissions


            var flyOne = new MyObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_B_FLY_ONE_Name),
                MyMissionID.FORT_VALIANT_B_FLY_ONE,
                (MyTextsWrapperEnum.FORT_VALIANT_B_FLY_ONE_Description),
                null,
                this,
                new MyMissionID[] { },
                new MyMissionLocation(baseSector, (uint)EntityID.DetecorGateKeeper),
                null,
                null,
                MyDialogueEnum.FORT_VALIANT_B_0100)
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudFortValiant
            };

            m_objectives.Add(flyOne);

            /*
             * var speakGateKeeper = new MyMeetObjective(
             *  new StringBuilder("Reach the gate of Fort Valiant"),
             *  MyMissionID.FORT_VALIANT_B_SPEAK_GATE_KEEPER,
             *  new StringBuilder(""),
             *  this,
             *  new MyMissionID[] { MyMissionID.FORT_VALIANT_FLY_ONE },
             *  (uint)EntityID.DetecorGateKeeper,
             *  (uint)EntityID.GateKeeper,
             *  25,
             *  0.25f,
             *  dialog3,
             *  dialog2
             *  ) { SaveOnSuccess = true };
             * m_objectives.Add(speakGateKeeper);
             *
             */

            var speakCaptain = new MyMeetObjective(
                (MyTextsWrapperEnum.FORT_VALIANT_B_MEET_CAPTAIN_Name),
                MyMissionID.FORT_VALIANT_B_MEET_CAPTAIN,
                (MyTextsWrapperEnum.FORT_VALIANT_B_MEET_CAPTAIN_Description),
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_B_FLY_ONE },
                (uint)EntityID.DetectorCaptain,
                (uint)EntityID.Captain,
                50,
                0.25f,
                MyDialogueEnum.FORT_VALIANT_B_0200,
                null,
                false
                )
            {
                SaveOnSuccess = true, FollowMe = false
            };

            m_objectives.Add(speakCaptain);
            speakCaptain.OnMissionSuccess += SpeakCaptainOnOnMissionSuccess;

            m_visitVendor = new MyObjectiveEnterInventory(
                (MyTextsWrapperEnum.FORT_VALIANT_B_VISIT_VENDOR_Name),
                MyMissionID.FORT_VALIANT_B_VISIT_VENDOR,
                (MyTextsWrapperEnum.FORT_VALIANT_B_VISIT_VENDOR_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.FORT_VALIANT_B_MEET_CAPTAIN },
                (uint)EntityID.VendorB,
                null,
                null
                );
            m_objectives.Add(m_visitVendor);
            m_visitVendor.OnMissionLoaded += MVisitVendorOnOnMissionLoaded;

            /*
             * var flyToMadelyn = new MyObjective(
             * new StringBuilder("Meet your mothership close to the Templar cargo bay"),
             * MyMissionID.FORT_VALIANT_B_FLY_BACK_MADELYN,
             * new StringBuilder(""),
             * null,
             * this,
             * new MyMissionID[] { MyMissionID.FORT_VALIANT_B_VISIT_VENDOR },
             * new MyMissionLocation(baseSector, MyMissionLocation.MADELYN_HANGAR)
             * );
             * m_objectives.Add(flyToMadelyn);
             */
        }
Beispiel #14
0
        public MyReichstagCMission()
        {
            ID              = MyMissionID.REICHSTAG_C; /* ID must be added to MyMissions.cs */
            DebugName       = new StringBuilder("18c-Reichstag C");
            Name            = MyTextsWrapperEnum.REICHSTAG_C;
            Description     = MyTextsWrapperEnum.REICHSTAG_C_Description;
            Flags           = MyMissionFlags.Story;
            AchievementName = MySteamAchievementNames.Mission27_Reichstag2;

            MyMwcVector3Int baseSector = new MyMwcVector3Int(-2325831, 0, -7186381);

            Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation);

            RequiredMissions           = new MyMissionID[] { MyMissionID.NAZI_BIO_LAB };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.REICHSTAG_C_MOTHERSHIP };
            RequiredActors             = new MyActorEnum[] { MyActorEnum.MADELYN, MyActorEnum.TARJA, MyActorEnum.VALENTIN };

            m_objectives = new List <MyObjective>();


            var MeetSubmission = new MyMeetObjective(
                (MyTextsWrapperEnum.REICHSTAG_C_FOR_Name),
                MyMissionID.REICHSTAG_C_FOR,
                (MyTextsWrapperEnum.REICHSTAG_C_FOR_Description),
                this,
                new MyMissionID[] { },
                null,
                (uint)EntityID.Bot_WaltherStauffenberg,
                100,
                0.25f,
                null
                )
            {
                SaveOnSuccess = true, FollowMe = false
            };

            /*  MeetSubmission.OnMissionSuccess += MeetSubmissionSuccess;
             * MeetSubmission.OnMissionLoaded += MeetSubmissionLoaded;*/
            m_objectives.Add(MeetSubmission);

            var colonelDialogue = new MyObjectiveDialog(
                MyMissionID.REICHSTAG_C_COLONEL_DIALOGUE,
                null,
                this,
                new MyMissionID[] { MyMissionID.REICHSTAG_C_FOR },
                dialogId: MyDialogueEnum.REICHSTAG_C_0100_OFFICER_TALK
                )
            {
                SaveOnSuccess = true
            };

            m_objectives.Add(colonelDialogue);

            var goToShipyard = new MyMeetObjective(
                (MyTextsWrapperEnum.REICHSTAG_C_GO_TO_SHIPYARD_Name),
                MyMissionID.REICHSTAG_C_GO_TO_SHIPYARD,
                (MyTextsWrapperEnum.REICHSTAG_C_GO_TO_SHIPYARD_Description),
                this,
                new MyMissionID[] { MyMissionID.REICHSTAG_C_COLONEL_DIALOGUE },
                null,
                (uint)EntityID.Bot_ShipyardOfficer,
                100,
                0.25f,
                null,
                startDialogueId: MyDialogueEnum.REICHSTAG_C_0200_ON_THE_WAY
                )
            {
                SaveOnSuccess = true, FollowMe = false
            };

            m_objectives.Add(goToShipyard);
            goToShipyard.OnMissionLoaded += GoToShipyardLoaded;

            var talkToSupplyOfficer = new MyObjectiveDialog(
                MyMissionID.REICHSTAG_C_TALK_TO_SUPPLY_OFFICER,
                null,
                this,
                new MyMissionID[] { MyMissionID.REICHSTAG_C_GO_TO_SHIPYARD },
                dialogId: MyDialogueEnum.REICHSTAG_C_0400_SUPPLY_OFFICER
                )
            {
                SaveOnSuccess = true
            };

            m_objectives.Add(talkToSupplyOfficer);

            var ChangeShip = new MyUseObjective(
                (MyTextsWrapperEnum.REICHSTAG_C_CHANGESHIP_Name),
                MyMissionID.REICHSTAG_C_CHANGESHIP,
                (MyTextsWrapperEnum.REICHSTAG_C_CHANGESHIP_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.REICHSTAG_C_TALK_TO_SUPPLY_OFFICER },
                new MyMissionLocation(baseSector, (uint)EntityID.Bot_Disabled_03),
                MyTextsWrapperEnum.PressToBoardShip,
                MyTextsWrapperEnum.Ship,
                MyTextsWrapperEnum.BoardingInProgress,
                3000,
                radiusOverride: 30,
                startDialogId: MyDialogueEnum.REICHSTAG_C_0500_REACHING_SHIPS
                );

            m_objectives.Add(ChangeShip);
            ChangeShip.OnMissionSuccess += ChangeShipOnOnMissionSuccess;

            var ShipChangedDialogue = new MyObjectiveDialog(
                MyMissionID.REICHSTAG_C_SHIP_CHANGED_DIALOGUE,
                null,
                this,
                new MyMissionID[] { MyMissionID.REICHSTAG_C_CHANGESHIP },
                dialogId: MyDialogueEnum.REICHSTAG_C_0600_SHIPS_PICKUPED
                )
            {
                SaveOnSuccess = true
            };

            m_objectives.Add(ShipChangedDialogue);

            var GetArmed = new MyObjectiveEnterInventory(
                (MyTextsWrapperEnum.REICHSTAG_C_WEAPONS_Name),
                MyMissionID.REICHSTAG_C_WEAPONS,
                (MyTextsWrapperEnum.REICHSTAG_C_WEAPONS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.REICHSTAG_C_SHIP_CHANGED_DIALOGUE },
                (uint)EntityID.Objective_Shipchange,
                successDialogId: MyDialogueEnum.REICHSTAG_C_0800_SHOPPING_FINISHED
                );

            m_objectives.Add(GetArmed);
            GetArmed.OnMissionLoaded += GetArmedLoaded;

            var MeetTransporterCaptain = new MyMeetObjective(
                (MyTextsWrapperEnum.REICHSTAG_C_GO_TO_HANGAR_Name),
                MyMissionID.REICHSTAG_C_GO_TO_HANGAR,
                (MyTextsWrapperEnum.REICHSTAG_C_GO_TO_HANGAR_Description),
                this,
                new MyMissionID[] { MyMissionID.REICHSTAG_C_WEAPONS },
                null,
                (uint)EntityID.Bot_TransporterCaptain,
                100,
                0.25f,
                null
                )
            {
                SaveOnSuccess = true, FollowMe = false
            };

            m_objectives.Add(MeetTransporterCaptain);

            var TalkToTransporterCaptain = new MyObjectiveDialog(
                MyMissionID.REICHSTAG_C_TRANSPORTER_CAPTAIN_DIALOGUE,
                null,
                this,
                new MyMissionID[] { MyMissionID.REICHSTAG_C_GO_TO_HANGAR },
                dialogId: MyDialogueEnum.REICHSTAG_C_0900_TRANSPORTER_REACHED
                )
            {
                SaveOnSuccess = true
            };

            m_objectives.Add(TalkToTransporterCaptain);

            var GetWWMothership = new MyObjective(
                (MyTextsWrapperEnum.REICHSTAG_C_MOTHERSHIP_Name),
                MyMissionID.REICHSTAG_C_MOTHERSHIP,
                (MyTextsWrapperEnum.REICHSTAG_C_MOTHERSHIP_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.REICHSTAG_C_TRANSPORTER_CAPTAIN_DIALOGUE },
                new MyMissionLocation(baseSector, (uint)EntityID.Objective_Mothership),
                radiusOverride: 30
                )
            {
                HudName = MyTextsWrapperEnum.HudMothership
            };

            m_objectives.Add(GetWWMothership);
        }
        public MyJunkyardConvinceMission()
        {
            ID = MyMissionID.JUNKYARD_CONVINCE; /* ID must be added to MyMissions.cs */
            Name = MyTextsWrapperEnum.JUNKYARD_CONVINCE;
            Description = MyTextsWrapperEnum.JUNKYARD_CONVINCE_Description; //"Convince the Smuggler to join you in your mission \n"
            DebugName = new StringBuilder("08a-Junkyard"); // Name of mission
            Flags = MyMissionFlags.Story;
            AchievementName = MySteamAchievementNames.Mission08_JunkyardDuncan;

            MyMwcVector3Int baseSector = new MyMwcVector3Int(2567538,0,-172727); // Story sector of the script - i.e. (-2465,0,6541)
            
            Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation); // Starting dummy point - must by typecasted to uint and referenced from EntityID enum

            RequiredMissions = new MyMissionID[] { MyMissionID.LAST_HOPE }; // IDs of missions required to make this mission available
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_RETURN_TO_MS };
            RequiredActors = new MyActorEnum[] { MyActorEnum.MARCUS, MyActorEnum.MADELYN, };

            #region Objectives
            m_objectives = new List<MyObjective>(); // Creating of list of submissions

            // ----- objectives -----

            m_objective01FindInformator = new MyMeetObjective(
                // One member of that list - its type defines the type of submission - MySubmission means fly to the dummypoint to success. Here it is var so you cannot call methods on it
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FIND_INFORMATOR_Name),
                // Name of the submission
                MyMissionID.JUNKYARD_CONVINCE_FIND_INFORMATOR,
                // ID of the submission - must be added to MyMissions.cs
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FIND_INFORMATOR_Description),
                // Description of the submission
                this,
                new MyMissionID[] { },
                // ID of submissions required to make this submission available - it is clear so this submission is the starting submission
                null,
                "RavenGirl",
                250,
                1.00f,
                startDialogueId:MyDialogueEnum.JUNKYARD_CONVINCE_0100_INTRODUCE
                )
                {
                    // False means do not save game in that checkpoint
                    SaveOnSuccess = false,
                    FollowMe = false
                };
            m_objective01FindInformator.OnMissionLoaded += O01FindInformatorLoaded;
            m_objectives.Add(m_objective01FindInformator);


            m_objective01BFindInformator = new MyObjectiveDialog(
                MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_FIND_INFORMATOR_Name,
                MyMissionID.JUNKYARD_CONVINCE_D_FIND_INFORMATOR,
                MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_FIND_INFORMATOR_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_FIND_INFORMATOR },
                dialogId: MyDialogueEnum.JUNKYARD_CONVINCE_0200_INFORMATOR
                )
                {
                    SaveOnSuccess = false,
                };
            m_objective01BFindInformator.OnMissionLoaded += O01BFindInformatorLoaded;
            m_objective01BFindInformator.OnMissionSuccess += O01BFindInformatorSuccess;
            m_objectives.Add(m_objective01BFindInformator);

            m_objective02FindSmuggler = new MyObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FIND_SMUGGLER_Name),
                MyMissionID.JUNKYARD_CONVINCE_FIND_SMUGGLER,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FIND_SMUGGLER_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_D_FIND_INFORMATOR },
                new MyMissionLocation(baseSector, (uint) EntityID.FindSmuggler) // ID of dummy point of checkpoint
                )
                {
                    SaveOnSuccess = false,
                    SuccessDialogId = MyDialogueEnum.JUNKYARD_CONVINCE_0300_RUN,
                    HudName = MyTextsWrapperEnum.HudManjeet
                };
            m_objective02FindSmuggler.OnMissionLoaded += O02FindSmugglerLoaded;
            m_objective02FindSmuggler.OnMissionSuccess += O2FindSmugglerSuccess;
            m_objectives.Add(m_objective02FindSmuggler);

            m_objective04FollowSmuggler = new MyMeetObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FOLLOW_SMUGGLER_Name),
                MyMissionID.JUNKYARD_CONVINCE_FOLLOW_SMUGGLER,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FOLLOW_SMUGGLER_Description),
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_FIND_SMUGGLER },
                null,
                (uint) EntityID.Smuggler,
                300,
                1.00f
                )
                {
                    SaveOnSuccess = false,
                    FollowMe = false
                };
            m_objective04FollowSmuggler.OnMissionLoaded += O04FollowSmugglerLoaded;
            m_objective04FollowSmuggler.OnMissionSuccess += O04FollowSmugglerSuccess;
            m_objectives.Add(m_objective04FollowSmuggler);

            m_objective04DFollowSmuggler = new MyObjectiveDialog(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_FOLLOW_SMUGGLER_Name),
                MyMissionID.JUNKYARD_CONVINCE_D_FOLLOW_SMUGGLER,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_FOLLOW_SMUGGLER_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_FOLLOW_SMUGGLER },
                dialogId: MyDialogueEnum.JUNKYARD_CONVINCE_0500_CATCHED
                ) { SaveOnSuccess = false, };
            m_objectives.Add(m_objective04DFollowSmuggler);
            m_objective04DFollowSmuggler.OnMissionLoaded += O04DFollowSmugglerLoaded;
            m_objective04DFollowSmuggler.OnMissionSuccess += O04DFollowSmugglerSuccess;

            m_objective05GetCloserToEnemy = new MyObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FLY_TO_ENEMY_Name),
                MyMissionID.JUNKYARD_CONVINCE_FLY_TO_ENEMY,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FLY_TO_ENEMY_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_D_FOLLOW_SMUGGLER },
                new MyMissionLocation(baseSector, (uint) EntityID.FlyToEnemy),
                radiusOverride: 500f
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.Nothing };
            m_objective05GetCloserToEnemy.OnMissionLoaded += O05GetCloserToEnemyLoaded;
            m_objectives.Add(m_objective05GetCloserToEnemy);

            m_objective05MetZappasFirstGangman = new MyObjectiveDialog(
                MyMissionID.JUNKYARD_CONVINCE_MEET_GANGMAN,
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_FLY_TO_ENEMY },
                dialogId: MyDialogueEnum.JUNKYARD_CONVINCE_0650_MET_ZAPPA_GUARD
            );
            m_objectives.Add(m_objective05MetZappasFirstGangman);
            m_objective05MetZappasFirstGangman.OnMissionLoaded += O05MetZappasFirstGangmanLoaded;
            m_objective05MetZappasFirstGangman.OnMissionSuccess += O05MetZappasFirstGangmanSuccess;

            m_objective06KillWaves = new MyDestroyWavesObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_KILL_WAVES_Name),
                MyMissionID.JUNKYARD_CONVINCE_KILL_WAVES,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_KILL_WAVES_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_MEET_GANGMAN },
                null,
                null,
                null,
                null,
                4
                ) { SaveOnSuccess = false };
            m_objective06KillWaves.AddWave(new List<uint> {(uint)EntityID.SP1_1, (uint)EntityID.SP1_2, (uint)EntityID.SP1_3, (uint)EntityID.SP1_4});
            m_objective06KillWaves.AddWave(new List<uint> {(uint)EntityID.SP2_1, (uint)EntityID.SP2_2});
            m_objective06KillWaves.AddWave(new List<uint> { (uint)EntityID.SP3_1, (uint)EntityID.SP3_2, (uint)EntityID.SP3_3 });
            m_objective06KillWaves.OnMissionLoaded += O06KillWavesLoaded;
            m_objective06KillWaves.OnMissionSuccess += O06KillWavesSuccess;
            m_objectives.Add(m_objective06KillWaves);

            m_objective07SpeakWithMomo = new MyMeetObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_SPEAK_WITH_MOMO_Name),
                MyMissionID.JUNKYARD_CONVINCE_SPEAK_WITH_MOMO,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_SPEAK_WITH_MOMO_Description),
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_KILL_WAVES },
                null,
                (uint?) null,
                500,
                1.00f
                )
                {
                    SaveOnSuccess = false,
                    FollowMe = false
                };
            m_objectives.Add(m_objective07SpeakWithMomo);

            m_objective07DSpeakWithMomo = new MyObjectiveDialog(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_SPEAK_WITH_MOMO_Name),
                MyMissionID.JUNKYARD_CONVINCE_D_SPEAK_WITH_MOMO,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_SPEAK_WITH_MOMO_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_SPEAK_WITH_MOMO },
                dialogId: MyDialogueEnum.JUNKYARD_CONVINCE_0900_THE_MOMO
                ) { SaveOnSuccess = false };
            m_objectives.Add(m_objective07DSpeakWithMomo);
            m_objective07DSpeakWithMomo.OnMissionLoaded += O07DSpeakWithMomoLoaded;
            m_objective07DSpeakWithMomo.OnMissionSuccess += O07DSpeakWithMomoSuccess;

            m_objective08FightMomo = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FIGHT_MOMO_Name),
                MyMissionID.JUNKYARD_CONVINCE_FIGHT_MOMO,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_FIGHT_MOMO_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_D_SPEAK_WITH_MOMO },
                null,
                new List<uint> { (uint) EntityID.SP4_1, (uint) EntityID.SP4_2, (uint) EntityID.MomoZappaSP },
                true
                ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.Nothing };
            m_objective08FightMomo.OnMissionLoaded += O08FightMomoLoaded;
            m_objectives.Add(m_objective08FightMomo);

            m_objective09ReturnToSmuggler = new MyMeetObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_RETURN_TO_SMUGGLER_Name),
                MyMissionID.JUNKYARD_CONVINCE_RETURN_TO_SMUGGLER,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_RETURN_TO_SMUGGLER_Description),
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_FIGHT_MOMO },
                null,
                (uint) EntityID.Smuggler,
                300,
                1.00f
                //startDialogueId: MyDialogueEnum.JUNKYARD_CONVINCE_1000_LAST_OF_THEM
                ) { SaveOnSuccess = true, FollowMe = false };
            m_objective09ReturnToSmuggler.OnMissionLoaded += O09ReturnToSmugglerLoaded;
            m_objectives.Add(m_objective09ReturnToSmuggler);

            m_objective09DReturnToSmuggler = new MyObjectiveDialog(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_RETURN_TO_SMUGGLER_Name),
                MyMissionID.JUNKYARD_CONVINCE_D_RETURN_TO_SMUGGLER,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_RETURN_TO_SMUGGLER_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_RETURN_TO_SMUGGLER },
                dialogId: MyDialogueEnum.JUNKYARD_CONVINCE_1100_FIGHT_ENDS
            ) { SaveOnSuccess = false };
            m_objectives.Add(m_objective09DReturnToSmuggler);
            m_objective09DReturnToSmuggler.OnMissionLoaded += O09DReturnToSmugglerLoaded;
            m_objective09DReturnToSmuggler.OnMissionSuccess += O09DReturnToSmugglerSuccess;

            m_objective10FindBombDealer = new MyMeetObjective(
                // One member of that list - its type defines the type of submission - MySubmission means fly to the dummypoint to success. Here it is var so you cannot call methods on it
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_GO_TO_BOMB_DEALER_Name),
                // Name of the submission
                MyMissionID.JUNKYARD_CONVINCE_GO_TO_BOMB_DEALER,
                // ID of the submission - must be added to MyMissions.cs
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_GO_TO_BOMB_DEALER_Description),
                // Description of the submission
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_D_RETURN_TO_SMUGGLER },
                // ID of submissions required to make this submission available - it is clear so this submission is the starting submission
                null,
                (uint) EntityID.BombDealer,
                300,
                1.00f
                )
                {
                    SaveOnSuccess = false,
                    RequiredActors = new MyActorEnum[] { MyActorEnum.TARJA, MyActorEnum.VALENTIN },
                    FollowMe = false
                };
            m_objective10FindBombDealer.OnMissionLoaded += O10FindBombDealerLoaded;
            m_objectives.Add(m_objective10FindBombDealer);

            m_objective10DFindBombDealer = new MyObjectiveDialog(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_GO_TO_BOMB_DEALER_Name),
                MyMissionID.JUNKYARD_CONVINCE_D_GO_TO_BOMB_DEALER,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_GO_TO_BOMB_DEALER_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_GO_TO_BOMB_DEALER},
                dialogId: MyDialogueEnum.JUNKYARD_CONVINCE_1300_BOMB_DEALER
            ) { SaveOnSuccess = false };
            m_objectives.Add(m_objective10DFindBombDealer);
            m_objective10DFindBombDealer.OnMissionLoaded += O10DFindBombDealerLoaded;
            m_objective10DFindBombDealer.OnMissionSuccess += O10DFindBombDealerSuccess;

            m_objective11GetToMarcus = new MyMeetObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_GO_TO_MARCUS_Name),
                MyMissionID.JUNKYARD_CONVINCE_GO_TO_MARCUS,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_GO_TO_MARCUS_Description),
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_D_GO_TO_BOMB_DEALER },
                null,
                "Marcus",
                300,
                1.00f
                )
                {
                    SaveOnSuccess = true,
                    FollowMe = false,
                };
            m_objective11GetToMarcus.OnMissionLoaded += O11GetToMarcusLoaded;
            m_objective11GetToMarcus.OnMissionSuccess += O11GetToMarcusSuccess;
            m_objectives.Add(m_objective11GetToMarcus);

            var objective11DGetToMarcus = new MyObjectiveDialog(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_GO_TO_MARCUS_Name),
                MyMissionID.JUNKYARD_CONVINCE_D_GO_TO_MARCUS,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_D_GO_TO_MARCUS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_GO_TO_MARCUS },
                dialogId: MyDialogueEnum.JUNKYARD_CONVINCE_1400_ARRIVED_AT_MARCUS
                ) { SaveOnSuccess = false };
            m_objectives.Add(objective11DGetToMarcus);

            m_objective12BrFight = new MyDestroyWavesObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_BR_FIGHT_Name),
                MyMissionID.JUNKYARD_CONVINCE_BR_FIGHT,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_BR_FIGHT_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_D_GO_TO_MARCUS },
                new List<uint>
                    {
                        (uint) EntityID.BR_SP_1,
                        (uint) EntityID.BR_SP_2,
                        (uint) EntityID.BR_SP_3,
                        (uint) EntityID.BR_SP_4,
                        (uint) EntityID.BR_SP_Boss
                    }
                )
                {
                    SaveOnSuccess = false,
                    StartDialogId = MyDialogueEnum.JUNKYARD_CONVINCE_1500_GANGSTER_FIGHT_STARTED,
                    SuccessDialogId = MyDialogueEnum.JUNKYARD_CONVINCE_1600_GO_TO_MS
                };
            m_objective12BrFight.OnMissionLoaded += O12BRFightLoaded;
            m_objective12BrFight.OnMissionSuccess += O12BRFightSuccess;
            m_objective12BrFight.AddWave(m_killWavesSecond1);
            m_objective12BrFight.AddWave(m_killWavesSecond2);
            m_objective12BrFight.AddWave(m_killWavesSecond3);
            m_objective12BrFight.AddWave(m_killWavesSecond4);
            m_objectives.Add(m_objective12BrFight);

            m_objective13FlyToMS = new MyObjective(
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_RETURN_TO_MS_Name),
                MyMissionID.JUNKYARD_CONVINCE_RETURN_TO_MS,
                (MyTextsWrapperEnum.JUNKYARD_CONVINCE_RETURN_TO_MS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.JUNKYARD_CONVINCE_BR_FIGHT },
                new MyMissionLocation(baseSector, MyMissionLocation.MADELYN_HANGAR),
                radiusOverride: 300f
                )
                {
                    SaveOnSuccess = true,
                    SuccessDialogId = MyDialogueEnum.JUNKYARD_CONVINCE_1700_FINALE,
                    HudName = MyTextsWrapperEnum.HudMadelynsSapho
                };
            m_objectives.Add(m_objective13FlyToMS);
            #endregion      

            m_spawns.AddRange(m_killWavesSecond1);
            m_spawns.AddRange(m_killWavesSecond2);
            m_spawns.AddRange(m_killWavesSecond3);
            m_spawns.AddRange(m_killWavesSecond4);
        }