public MyEACTransmitterMission()
        {
            ID = MyMissionID.EAC_TRANSMITTER;
            DebugName = new StringBuilder("21-EAC transmitter");
            Name = MyTextsWrapperEnum.EAC_TRANSMITTER;
            Description = MyTextsWrapperEnum.EAC_TRANSMITTER_Description; // "Set all 3 satellites to your needs.\n"
            Flags = MyMissionFlags.Story;

            MyMwcVector3Int baseSector = new MyMwcVector3Int(3818505, 0, -4273800);
            Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation);



            RequiredMissions = new MyMissionID[] { MyMissionID.EAC_PRISON };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_MEETMS };
            RequiredActors = new MyActorEnum[] { MyActorEnum.MARCUS, MyActorEnum.MADELYN, MyActorEnum.TARJA, MyActorEnum.VALENTIN };
            
            m_objectives = new List<MyObjective>();

            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeEnteringCargoWithRavens, 0, (uint)EntityID.SpawnpointAtInnerCargo));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeEnteringCargoWithRavens, 0, (uint)EntityID.SpawnpointAtOuterControlRoom1));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeEnteringControlRoomFromOutside, 0, (uint)EntityID.SpawnpointAtControlRoom1));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeEnteringControlRoomFromOutside, 0, (uint)EntityID.SpawnpointAtControlRoom2));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeEnteringSatelitteA, 0, (uint)EntityID.SpawnpointAtSatelitteA));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorWhenEscapingSatAThruDestroyedPanel, 0, (uint)EntityID.SpawnpointAtOuterSatelitteA));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorWhenEscapingSatAThruDestroyedPanel, 0, (uint)EntityID.SpawnpointAtControlRoom3));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorWhenEscapingSatAThruDestroyedPanel, 0, (uint)EntityID.SpawnpointAtControlRoom4));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeAgregat1, 0, (uint)EntityID.SpawnpointAtAgregat1));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeAgregat2, 0, (uint)EntityID.SpawnpointAtAgregat2));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeAgregat3, 0, (uint)EntityID.SpawnpointAtAgregat3));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeHackingSatelitteBandC, 0, (uint)EntityID.SpawnpointAtSatelitteB));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeHackingSatelitteBandC, 0, (uint)EntityID.SpawnpointAtSatelitteC));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeStartingTransmission, 0, (uint)EntityID.SpawnpointAtControlRoom5));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeStartingTransmission, 0, (uint)EntityID.SpawnpointAtControlRoom6));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeOpeningDoorToArm, 0, (uint)EntityID.SpawnpointAtArmEntrance));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeEnteringCargoThruArm, 0, (uint)EntityID.SpawnpointAtCargoInnerEntrance));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeFixingGenerator, 0, (uint)EntityID.SpawnpointAtGenerator));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeTurnBackOnSolars, 0, (uint)EntityID.SpawnpointAtSolarStarting));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeTurnBackOnSolars, 0, (uint)EntityID.SpawnpointAtControlRoom7));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeTurnBackOnSolars, 0, (uint)EntityID.SpawnpointAtControlRoom8));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeTurnBackOnSolars, 0, (uint)EntityID.SpawnpointAtOuterControlRoom2));

            var openCargoDoor = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_OPEN_CARGO_DOOR),
                MyMissionID.EAC_TRANSMITTER_OPEN_CARGO,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_OPEN_CARGO_DOOR_Description),
                null,
                this,
                new MyMissionID[] { },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyCargoBomb),
                MyTextsWrapperEnum.PressToPlaceBomb,
                MyTextsWrapperEnum.Blank,
                MyTextsWrapperEnum.PlacingBomb,
                1000,
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_0100
            ) { SaveOnSuccess = true };
            m_objectives.Add(openCargoDoor);
            openCargoDoor.OnMissionLoaded += new MissionHandler(openCargoDoor_OnMissionLoaded);
            openCargoDoor.OnMissionSuccess += new MissionHandler(openCargoDoor_OnMissionSuccess);


            var enterControlRoom = new MyObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_CENTRAL_ROOM),
                MyMissionID.EAC_TRANSMITTER_CENTRAL_ROOM,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_CENTRAL_ROOM_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_OPEN_CARGO },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyControlRoom),
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_0200
            ) { HudName = MyTextsWrapperEnum.HudControlRoom,
               SaveOnSuccess = true };
            enterControlRoom.OnMissionLoaded += new MissionHandler(enterControlRoom_OnMissionLoaded);
            enterControlRoom.OnMissionSuccess += new MissionHandler(enterControlRoom_OnMissionSuccess);
            m_objectives.Add(enterControlRoom);


            var unlockWayToSatelliteA = new MyObjectiveEnablePrefabs(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITES),
                MyMissionID.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITE_A,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITES_Descrption),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_CENTRAL_ROOM },
                null,
                new List<uint> { (int)EntityID.HubA },
                new List<uint> { (int)EntityID.DoorHubA }
            ) { HudName = MyTextsWrapperEnum.HudHub,
                SaveOnSuccess = true };
            m_objectives.Add(unlockWayToSatelliteA);

            var unlockWayToSatelliteB = new MyObjectiveEnablePrefabs(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITES),
                MyMissionID.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITE_B,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITES_Descrption),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITE_A },
                null,
                new List<uint> { (int)EntityID.HubB },
                new List<uint> { (int)EntityID.DoorHubB1, (int)EntityID.DoorHubB2, (int)EntityID.DoorHubB3, (int)EntityID.DoorHubB4}
            ) { HudName = MyTextsWrapperEnum.HudHub,
                SaveOnSuccess = true };
            m_objectives.Add(unlockWayToSatelliteB);

            var unlockWayToSatelliteC = new MyObjectiveEnablePrefabs(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITES),
                MyMissionID.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITE_C,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITES_Descrption),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITE_B },
                null,
                new List<uint> { (int)EntityID.HubC },
                new List<uint> { (int)EntityID.DoorHubC1, (int)EntityID.DoorHubC2, (int)EntityID.DoorHubC3, (int)EntityID.DoorHubC4}
            ) { HudName = MyTextsWrapperEnum.HudHub,
                SaveOnSuccess = true };
            m_objectives.Add(unlockWayToSatelliteC);


            var hackSatelliteA = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_HACK_SATELLITE_A),
                MyMissionID.EAC_TRANSMITTER_HACK_SATELLITE_A,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_HACK_SATELLITE_A_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITE_C },
                new MyMissionLocation(baseSector, (uint)EntityID.DummySatelliteA),
                MyTextsWrapperEnum.PressToHack,
                MyTextsWrapperEnum.HackingProgress,
                MyTextsWrapperEnum.Hacking,
                2000,
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_0300
            );
            m_objectives.Add(hackSatelliteA);


            var autodestructEscape = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_ESCAPE),
                MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_ESCAPE,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_ESCAPE_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_HACK_SATELLITE_A },
                new List<uint> { (uint)EntityID.PanelAutodestruct },
                startDialogID: MyDialogueEnum.EAC_TRANSMITTER_0400
            ) { HudName = MyTextsWrapperEnum.HudPanel};
            autodestructEscape.OnMissionLoaded += new MissionHandler(autodestructEscape_OnMissionLoaded);
            m_objectives.Add(autodestructEscape);


            var autodestructHack = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HACK),
                MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HACK,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HACK_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_ESCAPE },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyAutodestructHack),
                MyTextsWrapperEnum.PressToHack,
                MyTextsWrapperEnum.Hacking,
                MyTextsWrapperEnum.HackingProgress,
                2000
            );
            m_objectives.Add(autodestructHack);

            //Escape by destroying panel upon your head
            var autodestructDestroy = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_DESTROY),
                MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_DESTROY,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_DESTROY_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HACK },
                new List<uint> { (uint)EntityID.PrefabAutodestruct1, (uint)EntityID.PrefabAutodestruct2 },
                startDialogID: MyDialogueEnum.EAC_TRANSMITTER_0500
            ) { SaveOnSuccess = true };
            autodestructDestroy.OnMissionLoaded += new MissionHandler(autodestructDestroy_OnMissionLoaded);
            autodestructDestroy.OnMissionSuccess += new MissionHandler(autodestructDestroy_OnMissionSuccess);
            m_objectives.Add(autodestructDestroy);

            var autodestructHelp = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HELP),
                MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HELP,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HELP_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_DESTROY },
                null,
                new List<uint> { (uint)EntityID.SpawnAutodestruct },
                true,
                true,
                startDialogID: MyDialogueEnum.EAC_TRANSMITTER_0600,
                successDialogID: MyDialogueEnum.EAC_TRANSMITTER_0700
            ) { SaveOnSuccess = true };
            autodestructHelp.OnMissionSuccess += new MissionHandler(autodestructHelp_OnMissionSuccess);
            m_objectives.Add(autodestructHelp);


            var hackSatelliteB = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_HACK_SATELLITE_B),
                MyMissionID.EAC_TRANSMITTER_HACK_SATELLITE_B,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_HACK_SATELLITE_B_Descrption),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HELP },
                new MyMissionLocation(baseSector, (uint)EntityID.DummySatelliteB),
                MyTextsWrapperEnum.PressToHack,
                MyTextsWrapperEnum.HackingProgress,
                MyTextsWrapperEnum.Hacking,
                2000
            ) { SaveOnSuccess = true };
            m_objectives.Add(hackSatelliteB);


            var hackSatelliteC = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_HACK_SATELLITE_C),
                MyMissionID.EAC_TRANSMITTER_HACK_SATELLITE_C,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_HACK_SATELLITE_C_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_HACK_SATELLITE_B },
                new MyMissionLocation(baseSector, (uint)EntityID.DummySatelliteC),
                MyTextsWrapperEnum.PressToHack,
                MyTextsWrapperEnum.HackingProgress,
                MyTextsWrapperEnum.Hacking,
                2000,
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_0800
            ) { SaveOnSuccess = true };
            m_objectives.Add(hackSatelliteC);

            var startTransmittion = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_START_TRANSMISSION),
                MyMissionID.EAC_TRANSMITTER_START_TRANSMISSION,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_START_TRANSMISSION_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_HACK_SATELLITE_C },
                new MyMissionLocation(baseSector, (uint)EntityID.DummySatelliteD),
                MyTextsWrapperEnum.PressToStartTransmission,
                MyTextsWrapperEnum.StartingTransmission,
                MyTextsWrapperEnum.Transmission,
                1000,
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_0900
            );
            m_objectives.Add(startTransmittion);

            var openSolarArm = new MyObjectiveEnablePrefabs(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_OPEN_SOLAR_ARM),
                MyMissionID.EAC_TRANSMITTER_OPEN_SOLAR_ARM,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_OPEN_SOLAR_ARM_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_START_TRANSMISSION },
                null,
                new List<uint> { (int)EntityID.HubSolarArm },
                new List<uint> { (int)EntityID.DoorSolarArm },
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_1000
            ) { HudName = MyTextsWrapperEnum.HudHub,
                SaveOnSuccess = true };
            openSolarArm.OnMissionLoaded += new MissionHandler(openSolarArm_OnMissionLoaded);
            m_objectives.Add(openSolarArm);



            var findRepairKit = new MyUseObjective(
                  (MyTextsWrapperEnum.EAC_TRANSMITTER_FIND_REPAIR),
                  MyMissionID.EAC_TRANSMITTER_FIND_REPAIR,
                  (MyTextsWrapperEnum.EAC_TRANSMITTER_FIND_REPAIR_Description),
                  null,
                  this,
                  new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_OPEN_SOLAR_ARM },
                  new MyMissionLocation(baseSector, (uint)EntityID.CargoRepair),
                  MyTextsWrapperEnum.PressToTakeCargo,
                  MyTextsWrapperEnum.TakeAll,
                  MyTextsWrapperEnum.TakingInProgress,
                  2000,
                  radiusOverride: 50
              ) { HudName = MyTextsWrapperEnum.HudGeneratorRepairKit,
                  SaveOnSuccess = true };
            findRepairKit.OnMissionLoaded += new MissionHandler(findRepairKit_OnMissionLoaded);
            findRepairKit.OnMissionSuccess += new MissionHandler(findRepairKit_OnMissionSuccess);
            m_objectives.Add(findRepairKit);


            var fixGenerator = new MyUseObjective(
                  (MyTextsWrapperEnum.EAC_TRANSMITTER_FIX_GENERATOR),
                  MyMissionID.EAC_TRANSMITTER_FIX_GENERATOR,
                  (MyTextsWrapperEnum.EAC_TRANSMITTER_FIX_GENERATOR_Descrpition),
                  null,
                  this,
                  new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_FIND_REPAIR },
                  new MyMissionLocation(baseSector, (uint)EntityID.DummyGeneratorFix),
                  MyTextsWrapperEnum.PressToStartGenerator,
                  MyTextsWrapperEnum.StartingProgress,
                  MyTextsWrapperEnum.StartingProgress,
                  2000,
                  startDialogId: MyDialogueEnum.EAC_TRANSMITTER_1100
              ) { SaveOnSuccess = true };
            fixGenerator.OnMissionSuccess += new MissionHandler(fixGenerator_OnMissionSuccess);
            m_objectives.Add(fixGenerator);

            var activateSolarpanels = new MyUseObjective(
                  (MyTextsWrapperEnum.EAC_TRANSMITTER_ACTIVATE_SOLARPANELS),
                  MyMissionID.EAC_TRANSMITTER_ACTIVATE_SOLARPANELS,
                  (MyTextsWrapperEnum.EAC_TRANSMITTER_ACTIVATE_SOLARPANELS_Description),
                  null,
                  this,
                  new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_FIX_GENERATOR },
                  new MyMissionLocation(baseSector, (uint)EntityID.DummySolarCircuit),
                  MyTextsWrapperEnum.PressToRedirectEnergy,
                  MyTextsWrapperEnum.RedirectEnergy,
                  MyTextsWrapperEnum.RedirectionInProgress,
                  2000,
                  startDialogId: MyDialogueEnum.EAC_TRANSMITTER_1200
              );
            m_objectives.Add(activateSolarpanels);

            var restartTransmition = new MyUseObjective(
                  (MyTextsWrapperEnum.EAC_TRANSMITTER_RESTART_TRANSMISSION),
                  MyMissionID.EAC_TRANSMITTER_RESTART_TRANSMISSION,
                  (MyTextsWrapperEnum.EAC_TRANSMITTER_RESTART_TRANSMISSION_Description),
                  null,
                  this,
                  new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_ACTIVATE_SOLARPANELS },
                  new MyMissionLocation(baseSector, (uint)EntityID.DummySatelliteD),
                  MyTextsWrapperEnum.PressToStartTransmission,
                  MyTextsWrapperEnum.StartingTransmission,
                  MyTextsWrapperEnum.Transmission,
                  2000,
                  startDialogId: MyDialogueEnum.EAC_TRANSMITTER_1300
              ) { SaveOnSuccess = true };
            m_objectives.Add(restartTransmition);


            var meetms = new MyObjective(
                  (MyTextsWrapperEnum.EAC_TRANSMITTER_MEETMS),
                  MyMissionID.EAC_TRANSMITTER_MEETMS,
                  (MyTextsWrapperEnum.EAC_TRANSMITTER_MEETMS_Description),
                  null,
                  this,
                  new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_RESTART_TRANSMISSION },
                  new MyMissionLocation(baseSector, MyMissionLocation.MADELYN_HANGAR),
                  startDialogId: MyDialogueEnum.EAC_TRANSMITTER_1400,
                  radiusOverride: MyMissionLocation.MADELYN_HANGAR_RADIUS
              ) { HudName = MyTextsWrapperEnum.HudMadelynsSapho };
            m_objectives.Add(meetms);


  
        }
        public MyAlienGateMission()
        {
            ID = MyMissionID.ALIEN_GATE;
            DebugName = new StringBuilder("22-Alien artifact");
            Name = MyTextsWrapperEnum.ALIEN_GATE;
            Description = MyTextsWrapperEnum.ALIEN_GATE_Description;
            Flags = MyMissionFlags.Story;
            AchievementName = MySteamAchievementNames.Mission31_AlienGate;

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

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

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

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


            var keepFormation = new MyObjective(
                (MyTextsWrapperEnum.ALIEN_GATE_RIGHT_WING_Name),
                MyMissionID.ALIEN_GATE_RIGHT_WING,
                (MyTextsWrapperEnum.ALIEN_GATE_RIGHT_WING_Description),
                null,
                this,
                new MyMissionID[] { },
                new MyMissionLocation(baseSector, (uint)EntityID.MadelynSRightWingPosition)) { HudName = MyTextsWrapperEnum.HudLeftWing };
            m_objectives.Add(keepFormation);


            m_followCords = new MyDestroyWavesObjective(
                (MyTextsWrapperEnum.ALIEN_GATE_FOLLOW_COORDINATES_Name),
                MyMissionID.ALIEN_GATE_FOLLOW_COORDINATES,
                (MyTextsWrapperEnum.ALIEN_GATE_FOLLOW_COORDINATES_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.ALIEN_GATE_RIGHT_WING, },
                new List<uint>() { },
                new MyMissionLocation(baseSector, (uint)EntityID.FollowCoordinatesDummy),
                radiusOverride: 150) { StartDialogId = MyDialogueEnum.ALIEN_GATE_0100, SuccessDialogId = MyDialogueEnum.ALIEN_GATE_0300 };
            m_followCords.AddWave(new List<uint>() { (uint)EntityID.FollowCoordinatesSpawnPoint });
            m_followCords.OnMissionLoaded += M01FollowCordsOnOnMissionLoaded;
            m_followCords.OnMissionSuccess += M01FollowCordsOnOnMissionSuccess;
            m_followCords.Components.Add(new MyMovingEntity("Madelyn", (uint)EntityID.FollowCoordinatesDummy, FollowCoordinatesMadelynTime));
            m_objectives.Add(m_followCords);


            var continueSearching = new MyObjective(
                (MyTextsWrapperEnum.ALIEN_GATE_CONTINUE_SEARCHING_Name),
                MyMissionID.ALIEN_GATE_CONTINUE_SEARCHING,
                (MyTextsWrapperEnum.ALIEN_GATE_CONTINUE_SEARCHING_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.ALIEN_GATE_FOLLOW_COORDINATES },
                new MyMissionLocation(baseSector, (uint)EntityID.ContinueSearchingDummy)
                ) { SaveOnSuccess = false, SuccessDialogId = MyDialogueEnum.ALIEN_GATE_0400, HudName = MyTextsWrapperEnum.HudSearch };
            continueSearching.Components.Add(new MyMovingEntity("Madelyn", (uint)EntityID.ContinueSearchingDummy, ContinueSearchingMadelynTime));
            m_objectives.Add(continueSearching);


            var followDirection = new MyObjective(
                (MyTextsWrapperEnum.ALIEN_GATE_FOLLOW_DIRECTION_Name),
                MyMissionID.ALIEN_GATE_FOLLOW_DIRECTION,
                (MyTextsWrapperEnum.ALIEN_GATE_FOLLOW_DIRECTION_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.ALIEN_GATE_CONTINUE_SEARCHING },
                new MyMissionLocation(baseSector, (uint)EntityID.FollowDirectionDummy)) { HudName = MyTextsWrapperEnum.HudFollow };
            followDirection.OnMissionLoaded += M03FollowDirectionOnOnMissionLoaded;
            followDirection.OnMissionCleanUp += M03FollowDirectionOnOnMissionCleanUp;
            m_objectives.Add(followDirection);


            m_coughtInTrap = new MyObjectiveDialog
                (MyTextsWrapperEnum.ALIEN_GATE_COUGHT_IN_TRAP_Name,
                 MyMissionID.ALIEN_GATE_COUGHT_IN_TRAP,
                 MyTextsWrapperEnum.ALIEN_GATE_COUGHT_IN_TRAP_Description,
                 null,
                 this,
                 new MyMissionID[] { MyMissionID.ALIEN_GATE_FOLLOW_DIRECTION },
                 MyDialogueEnum.ALIEN_GATE_0500
                 ) { Location = new MyMissionLocation(baseSector, (uint)EntityID.CoughtInTrapDummy), SaveOnSuccess = true };
            m_coughtInTrap.OnMissionLoaded += M04CoughtInTrapOnOnMissionLoaded;
            m_coughtInTrap.Components.Add(new MyMovingEntity((uint)EntityID.CoughtInTrapShip1, (uint)EntityID.CoughtInTrapShip1Target, CoughtInTrapMoveTime));
            m_coughtInTrap.Components.Add(new MyMovingEntity((uint)EntityID.CoughtInTrapShip2, (uint)EntityID.CoughtInTrapShip2Target, CoughtInTrapMoveTime));
            m_coughtInTrap.Components.Add(new MyMovingEntity((uint)EntityID.CoughtInTrapShip3, (uint)EntityID.CoughtInTrapShip3Target, CoughtInTrapMoveTime));
            m_objectives.Add(m_coughtInTrap);
            



            m_runForYourLife = new MyTimedObjective
                ((MyTextsWrapperEnum.ALIEN_GATE_RUN_FOR_LIFE_Name),
                 MyMissionID.ALIEN_GATE_RUN_FOR_LIFE,
                 (MyTextsWrapperEnum.ALIEN_GATE_RUN_FOR_LIFE_Description),
                 null,
                 this,
                 new MyMissionID[] { MyMissionID.ALIEN_GATE_COUGHT_IN_TRAP },
                 TimeSpan.FromMilliseconds(RunForYourLifeObjectiveTime),
                 startDialogId: MyDialogueEnum.ALIEN_GATE_0600
                ) { DisplayCounter = false, Location = new MyMissionLocation(baseSector, (uint)EntityID.RunForYourLifeDummy), HudName = MyTextsWrapperEnum.HudRun };
            m_runForYourLife.OnMissionLoaded += M05RunForYourLifeOnOnMissionLoaded;
            m_runForYourLife.Components.Add(new MyMovingEntity(MyActorConstants.GetActorName(MyActorEnum.MADELYN), (uint)EntityID.RunForYourLifeShipTarget, RunForYourLifeShipMoveTime));
            m_objectives.Add(m_runForYourLife);
            
            m_regroupWithMadelyn = new MyTimedObjective(
                (MyTextsWrapperEnum.ALIEN_GATE_REGROUP_WITH_MADELYN_Name),
                MyMissionID.ALIEN_GATE_REGROUP_WITH_MADELYN,
                (MyTextsWrapperEnum.ALIEN_GATE_REGROUP_WITH_MADELYN_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.ALIEN_GATE_RUN_FOR_LIFE, },
                TimeSpan.FromMilliseconds(RegroupWithMadelynMissionTime)
            ) { DisplayCounter = false, Location = new MyMissionLocation(baseSector, (uint)EntityID.RegroupWithMadelynShip1Target), HudName = MyTextsWrapperEnum.HudRegroup, SaveOnSuccess = true };
            m_regroupWithMadelyn.OnMissionLoaded += M06RegroupWithMadelynOnOnMissionLoaded;
            m_regroupWithMadelyn.Components.Add(new MySpawnpointWaves((uint)EntityID.RegroupWithMadelynDetector, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.RegroupWithMadelynSpawn1},
                                                                                                             new uint[]{(uint)EntityID.RegroupWithMadelynSpawn2}
                                                                                                         }));
            m_regroupWithMadelyn.Components.Add(new MySpawnpointWaves((uint)EntityID.RegroupWithMadelynDetector2, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.RegroupWithMadelynSpawn3, (uint)EntityID.RegroupWithMadelynSpawn4}
                                                                                                         }));

            m_regroupWithMadelyn.Components.Add(new MyMovingEntity(MyActorConstants.GetActorName(MyActorEnum.MADELYN), (uint)EntityID.RegroupWithMadelynShip1Target, RegroupWithMadelynMissionTime));
            m_regroupWithMadelyn.Components.Add(new MyMovingEntity((uint)EntityID.CoughtInTrapShip1, (uint)EntityID.RegroupWithMadelynShip2Target, RegroupWithMadelynMissionTime));
            m_regroupWithMadelyn.Components.Add(new MyMovingEntity((uint)EntityID.CoughtInTrapShip2, (uint)EntityID.RegroupWithMadelynShip3Target, RegroupWithMadelynMissionTime));
            m_regroupWithMadelyn.Components.Add(new MyMovingEntity((uint)EntityID.CoughtInTrapShip3, (uint)EntityID.RegroupWithMadelynShip4Target, RegroupWithMadelynMissionTime));
            m_regroupWithMadelyn.Components.Add(new MyTimedDialogue(new TimeSpan(0, 0, 50), MyDialogueEnum.ALIEN_GATE_0900));
            m_regroupWithMadelyn.Components.Add(new MyDetectorDialogue((uint)EntityID.RegroupWithMadelynShip1Target, MyDialogueEnum.ALIEN_GATE_0800B));
            m_objectives.Add(m_regroupWithMadelyn);
            


            m_boardMotherShip = new MyObjective
                ((MyTextsWrapperEnum.ALIEN_GATE_BOARD_MOTHER_SHIP_Name),
                 MyMissionID.ALIEN_GATE_BOARD_MOTHER_SHIP,
                 (MyTextsWrapperEnum.ALIEN_GATE_BOARD_MOTHER_SHIP_Description),
                 null,
                 this,
                 new MyMissionID[] { MyMissionID.ALIEN_GATE_REGROUP_WITH_MADELYN, },
                 new MyMissionLocation(baseSector, (uint)EntityID.BoardmotherShipDummy)
                ) { SuccessDialogId = MyDialogueEnum.ALIEN_GATE_1100, HudName = MyTextsWrapperEnum.HudMothership };
            m_boardMotherShip.Components.Add(new MySpawnpointWaves((uint)EntityID.BoardmotherShipDetector1, 1, (uint)EntityID.BoardmotherShipSpawn1));
            m_boardMotherShip.Components.Add(new MySpawnpointWaves((uint)EntityID.BoardmotherShipDetector2, 1, (uint)EntityID.BoardmotherShipSpawn2));
            m_boardMotherShip.Components.Add(new MySpawnpointWaves((uint)EntityID.BoardmotherShipDetector3, 1, (uint)EntityID.BoardmotherShipSpawn3));
            m_boardMotherShip.Components.Add(new MyDetectorDialogue((uint)EntityID.RussianGeneralSpeak, MyDialogueEnum.ALIEN_GATE_1000));
            m_boardMotherShip.OnMissionLoaded += BoardMotherShipOnOnMissionLoaded;
            m_objectives.Add(m_boardMotherShip);

            m_hackGenerator = new MyUseObjective
                ((MyTextsWrapperEnum.ALIEN_GATE_HACK_GENERATOR_Name),
                 MyMissionID.ALIEN_GATE_HACK_GENERATOR,
                 (MyTextsWrapperEnum.ALIEN_GATE_HACK_GENERATOR_Description),
                 null,
                 this,
                 new MyMissionID[] { MyMissionID.ALIEN_GATE_BOARD_MOTHER_SHIP },
                 new MyMissionLocation(baseSector, (uint)EntityID.HackGeneratorDummy),
                 MyTextsWrapperEnum.PressToHack,
                 MyTextsWrapperEnum.Generator,
                 MyTextsWrapperEnum.StartingProgress,
                 5000
                );
            m_hackGenerator.SaveOnSuccess = true;
            m_hackGenerator.OnMissionLoaded += M08HackGeneratorOnOnMissionLoaded;
            m_hackGenerator.Components.Add(new MyTimedDialogue(new TimeSpan(0, 0, 2), MyDialogueEnum.ALIEN_GATE_1200));
            m_hackGenerator.Components.Add(new MySpawnpointWaves((uint)EntityID.HackGeneratorDetector1, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.HackGeneratorSpawn11},
                                                                                                             new uint[]{(uint)EntityID.HackGeneratorSpawn12}
                                                                                                         }));
            m_hackGenerator.Components.Add(new MySpawnpointWaves((uint)EntityID.HackGeneratorDetector2, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.HackGeneratorSpawn21},
                                                                                                             new uint[]{(uint)EntityID.HackGeneratorSpawn22}
                                                                                                         }));
            m_hackGenerator.Components.Add(new MySpawnpointWaves((uint)EntityID.HackGeneratorDetector3, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.HackGeneratorSpawn31,(uint)EntityID.HackGeneratorSpawn32,(uint)EntityID.HackGeneratorSpawn33},
                                                                                                         }));
            m_hackGenerator.Components.Add(new MySpawnpointWaves((uint)EntityID.HackGeneratorDetector4, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.HackGeneratorSpawn41,(uint)EntityID.HackGeneratorSpawn42},
                                                                                                         }));
            m_hackGenerator.Components.Add(new MySpawnpointWaves((uint)EntityID.HackGeneratorDetector5, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.HackGeneratorSpawn5},
                                                                                                         }));
            m_objectives.Add(m_hackGenerator);


            m_hackEngine = new MyUseObjective
                ((MyTextsWrapperEnum.ALIEN_GATE_HACK_ENGINE_Name),
                 MyMissionID.ALIEN_GATE_HACK_ENGINE,
                 (MyTextsWrapperEnum.ALIEN_GATE_HACK_ENGINE_Description),
                 null,
                 this,
                 new MyMissionID[] { MyMissionID.ALIEN_GATE_HACK_GENERATOR },
                 new MyMissionLocation(baseSector, (uint)EntityID.HackEngineDummy),
                 MyTextsWrapperEnum.PressToHack,
                 MyTextsWrapperEnum.Generator,
                 MyTextsWrapperEnum.StartingProgress,
                 5000,
                 MyUseObjectiveType.Hacking,
                 startDialogId: MyDialogueEnum.ALIEN_GATE_1300
                ) { SuccessDialogId = MyDialogueEnum.ALIEN_GATE_1500, SaveOnSuccess = true };
            m_hackEngine.OnMissionLoaded += M09HackEngineOnOnMissionLoaded;
            m_hackEngine.Components.Add(new MyDetectorDialogue((uint)EntityID.HackEngineDummy, MyDialogueEnum.ALIEN_GATE_1400));
            m_hackEngine.Components.Add(new MySpawnpointWaves((uint)EntityID.HackGeneratorDetector5, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.HackGeneratorSpawn5},
                                                                                                        }));

            m_hackEngine.Components.Add(new MySpawnpointWaves((uint)EntityID.HackGeneratorDetector4, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.HackEngineSpawn2},
                                                                                                         }));
            m_hackEngine.Components.Add(new MySpawnpointWaves((uint)EntityID.HackEngineDetector3, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.HackEngineSpawn3},
                                                                                                         }));
            m_hackEngine.Components.Add(new MySpawnpointWaves((uint)EntityID.HackEngineDetector4, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.HackEngineSpawn4},
                                                                                                         }));
            m_hackEngine.Components.Add(new MySpawnpointWaves((uint)EntityID.HackEngineDetector5, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.HackEngineSpawn51},
                                                                                                             new uint[]{(uint)EntityID.HackEngineSpawn52},
                                                                                                         }));
            m_hackEngine.Components.Add(new MySpawnpointWaves((uint)EntityID.HackEngineDetector6, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.HackEngineSpawn6},
                                                                                                         }));
            m_objectives.Add(m_hackEngine);


            m_leaveShip1 = new MyTimedReachLocationObjective
                ((MyTextsWrapperEnum.ALIEN_GATE_LEAVE_SHIP_Name),
                 MyMissionID.ALIEN_GATE_LEAVE_SHIP,
                 (MyTextsWrapperEnum.ALIEN_GATE_LEAVE_SHIP_Description),
                 null,
                 this,
                 new MyMissionID[] { MyMissionID.ALIEN_GATE_HACK_ENGINE, },
                 TimeSpan.FromMilliseconds((double)m_10ObjectiveTime),
                 new MyMissionLocation(baseSector, (uint)EntityID._10Dummy)
                ) { HudName = MyTextsWrapperEnum.Nothing };

            m_leaveShip1.OnMissionLoaded += M10LeaveShip1OnOnMissionLoaded;
            m_leaveShip1.OnMissionFailed += M10LeaveShip1OnOnMissionFailed;
            m_leaveShip1.Components.Add(new MySpawnpointWaves((uint)EntityID.HackEngineDetector4, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.HackEngineSpawn4},
                                                                                                        }));

            m_leaveShip1.Components.Add(new MySpawnpointWaves((uint)EntityID.HackGeneratorDetector3, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID._10Spawn2},
                                                                                                         }));
            m_objectives.Add(m_leaveShip1);


            m_regroupWithMadelyn2 = new MyObjective(
                (MyTextsWrapperEnum.ALIEN_GATE_REGROPUP_WITH_MADELYN_Name),
                MyMissionID.ALIEN_GATE_REGROPUP_WITH_MADELYN,
                (MyTextsWrapperEnum.ALIEN_GATE_REGROPUP_WITH_MADELYN_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.ALIEN_GATE_LEAVE_SHIP, },
                new MyMissionLocation(baseSector, (uint)EntityID.RegroupWithMadelynShip1Target),
                startDialogId: MyDialogueEnum.ALIEN_GATE_1700
            ) { HudName = MyTextsWrapperEnum.HudRegroup, SaveOnSuccess = true };
            m_regroupWithMadelyn2.OnMissionLoaded += M11RegroupWithMadelyn2OnOnMissionLoaded;
            m_objectives.Add(m_regroupWithMadelyn2);

            m_shipbBoard2 = new MyObjective(
                (MyTextsWrapperEnum.ALIEN_GATE_BOARD_SECOND_Name),
                MyMissionID.ALIEN_GATE_BOARD_SECOND,
                (MyTextsWrapperEnum.ALIEN_GATE_BOARD_SECOND_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.ALIEN_GATE_REGROPUP_WITH_MADELYN, },
                new MyMissionLocation(baseSector, (uint)EntityID.BoardSecondShipbDummy)
                ) { StartDialogId = MyDialogueEnum.ALIEN_GATE_1900, HudName = MyTextsWrapperEnum.HudMothership };
            m_shipbBoard2.Components.Add(new MySpawnpointWaves((uint)EntityID.RegroupWithMadelynDetector, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.BoardSecondShipbSpawn1, (uint)EntityID.BoardSecondShipbSpawn2},
                                                                                                        }));
            m_shipbBoard2.OnMissionLoaded += M11BBoard2OnOnMissionLoaded;
            m_objectives.Add(m_shipbBoard2);


            m_hackGenerator2 = new MyUseObjective
                ((MyTextsWrapperEnum.ALIEN_GATE_HACK_GENERATOR2_Name),
                 MyMissionID.ALIEN_GATE_HACK_GENERATOR2,
                 (MyTextsWrapperEnum.ALIEN_GATE_HACK_GENERATOR2_Description),
                 null,
                 this,
                 new MyMissionID[] { MyMissionID.ALIEN_GATE_BOARD_SECOND },
                 new MyMissionLocation(baseSector, (uint)EntityID.HackGenerator2Dummy),
                 MyTextsWrapperEnum.PressToHack,
                 MyTextsWrapperEnum.Generator,
                 MyTextsWrapperEnum.StartingProgress,
                 5000,
                 MyUseObjectiveType.Hacking
                ) { StartDialogId = MyDialogueEnum.ALIEN_GATE_2000, SaveOnSuccess = true };
            m_hackGenerator2.OnMissionLoaded += M12HackGenerator2OnOnMissionLoaded;

            m_hackGenerator2.Components.Add(new MySpawnpointWaves((uint)EntityID.HackGenerator2Detector1, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.HackGenerator2Spawn11, (uint)EntityID.HackGenerator2Spawn12},
                                                                                                        }));
            m_hackGenerator2.Components.Add(new MySpawnpointWaves((uint)EntityID.HackGenerator2Detector2, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.HackGenerator2Spawn2},
                                                                                                        }));
            m_objectives.Add(m_hackGenerator2);


            m_hackEngine2 = new MyObjective(
                (MyTextsWrapperEnum.ALIEN_GATE_HACK_ENGINE_2_Name),
                MyMissionID.ALIEN_GATE_HACK_ENGINE_2,
                (MyTextsWrapperEnum.ALIEN_GATE_HACK_ENGINE_2_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.ALIEN_GATE_HACK_GENERATOR2 },
                new MyMissionLocation(baseSector, (uint)EntityID._13Dummy)/*,
                startDialogId: MyDialogueEnum.ALIEN_GATE_2100*/
                );
            m_hackEngine2.OnMissionLoaded += M13HackEngine2OnOnMissionLoaded;
            m_hackEngine2.Components.Add(new MySpawnpointWaves((uint)EntityID._13Detector1, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID._13Spawn11, (uint)EntityID._13Spawn12,(uint)EntityID._13Spawn13},
                                                                                                        }));
            m_hackEngine2.Components.Add(new MySpawnpointWaves((uint)EntityID._13Detector2, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID._13Spawn2}
                                                                                                        }));
            m_hackEngine2.Components.Add(new MySpawnpointWaves((uint)EntityID._13Detector3, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID._13Spawn3}
                                                                                                        }));
            m_hackEngine2.Components.Add(new MySpawnpointWaves((uint)EntityID._13Detector4, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID._13Spawn41},
                                                                                                            new uint[]{(uint)EntityID._13Spawn42}
                                                                                                        }));
            m_hackEngine2.Components.Add(new MySpawnpointWaves((uint)EntityID._13Detector5, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID._13Spawn51},
                                                                                                            new uint[]{(uint)EntityID._13Spawn52}
                                                                                                        }));
            m_objectives.Add(m_hackEngine2);


            m_enableDoors = new MyObjectiveEnablePrefabs(
                (MyTextsWrapperEnum.ALIEN_GATE_ENABLE_DOORS_Name),
                MyMissionID.ALIEN_GATE_ENABLE_DOORS,
                (MyTextsWrapperEnum.ALIEN_GATE_ENABLE_DOORS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.ALIEN_GATE_HACK_ENGINE_2 },
                null,
                new List<uint> { (uint)EntityID.EnableDoorsHUB },
                new List<uint> { (uint)EntityID.EnableDoorsDoors, }


                ) { HudName = MyTextsWrapperEnum.HudHub };
            m_enableDoors.Components.Add(new MySpawnpointWaves((uint)EntityID.EnableDoorsDetector, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.EnableDoorsSpawnPoint}
                                                                                                        }));

            m_enableDoors.Components.Add(new MyDetectorDialogue((uint)EntityID.DoorsDialogue, MyDialogueEnum.ALIEN_GATE_2200));
            m_objectives.Add(m_enableDoors);

            m_enterlaboratory = new MyObjective(
                (MyTextsWrapperEnum.ALIEN_GATE_ENTER_LAB_Name),
                MyMissionID.ALIEN_GATE_ENTER_LAB,
                (MyTextsWrapperEnum.ALIEN_GATE_ENTER_LAB_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.ALIEN_GATE_ENABLE_DOORS },
                new MyMissionLocation(baseSector, (uint)EntityID.EnterLaboratoryDummy)
                // startDialogId: m_dialog12
                ) { StartDialogId = MyDialogueEnum.ALIEN_GATE_2300, HudName = MyTextsWrapperEnum.HudLab };
            m_enterlaboratory.Components.Add(new MySpawnpointWaves((uint)EntityID.EnterLaboratoryDetector, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID.EnterLaboratorySpawn}
                                                                                                        }));
            m_objectives.Add(m_enterlaboratory);

            m_downloadData = new MyUseObjective
                ((MyTextsWrapperEnum.ALIEN_GATE_16_Name),
                 MyMissionID.ALIEN_GATE_16,
                 (MyTextsWrapperEnum.ALIEN_GATE_16_Description),
                 null,
                 this,
                 new MyMissionID[] { MyMissionID.ALIEN_GATE_ENTER_LAB },
                 new MyMissionLocation(baseSector, (uint)EntityID._16Dummy),
                 MyTextsWrapperEnum.PressToDownloadData,
                 MyTextsWrapperEnum.DataTransfer,
                 MyTextsWrapperEnum.DownloadingData,
                 3000,
                 MyUseObjectiveType.Taking
                ) { StartDialogId = MyDialogueEnum.ALIEN_GATE_2400, SaveOnSuccess = true };
            m_objectives.Add(m_downloadData);


            m_hackGenerator3 = new MyUseObjective
                ((MyTextsWrapperEnum.ALIEN_GATE_17_Name),
                 MyMissionID.ALIEN_GATE_17,
                 (MyTextsWrapperEnum.ALIEN_GATE_17_Description),
                 null,
                 this,
                 new MyMissionID[] { MyMissionID.ALIEN_GATE_16 },
                 new MyMissionLocation(baseSector, (uint)EntityID._17Dummy),
                 MyTextsWrapperEnum.PressToHack,
                 MyTextsWrapperEnum.Generator,
                 MyTextsWrapperEnum.StartingProgress,
                 5000,
                 MyUseObjectiveType.Hacking,
                 startDialogId: MyDialogueEnum.ALIEN_GATE_2500
                );
            m_objectives.Add(m_hackGenerator3);
            m_hackGenerator3.OnMissionLoaded += M17HackGenerator3OnOnMissionLoaded;

            m_hackGenerator3.Components.Add(new MySpawnpointWaves((uint)EntityID._17Detector, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID._17Spawn1,(uint)EntityID.EnterLaboratorySpawn}
                                                                                                        }));

            m_leaveShip = new MyTimedReachLocationObjective
                ((MyTextsWrapperEnum.ALIEN_GATE_18_Name),
                 MyMissionID.ALIEN_GATE_18,
                 (MyTextsWrapperEnum.ALIEN_GATE_18_Description),
                 null,
                 this,
                 new MyMissionID[] { MyMissionID.ALIEN_GATE_17, },
                 TimeSpan.FromMilliseconds((double)m_18ObjectiveTime),
                 new MyMissionLocation(baseSector, (uint)EntityID._18Dummy)

                ) { StartDialogId = MyDialogueEnum.ALIEN_GATE_2600, HudName = MyTextsWrapperEnum.Nothing, SaveOnSuccess = true };
            m_leaveShip.OnMissionLoaded += M18LeaveShipOnOnMissionLoaded;
            m_leaveShip.OnMissionFailed += M18LeaveShipOnOnMissionFailed;
            m_leaveShip.Components.Add(new MySpawnpointWaves((uint)EntityID._13Detector5, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID._18Spawn1}
                                                                                                        }));
            m_objectives.Add(m_leaveShip);

            m_killReef = new MyObjective(
                (MyTextsWrapperEnum.ALIEN_GATE_19_Name),
                MyMissionID.ALIEN_GATE_19,
                (MyTextsWrapperEnum.ALIEN_GATE_19_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.ALIEN_GATE_18 },
                new MyMissionLocation(baseSector, (uint)EntityID._19Dummy)

                ) { StartDialogId = MyDialogueEnum.ALIEN_GATE_2800 };
            m_killReef.OnMissionLoaded += M19KilReefOnOnMissionLoaded;
            m_objectives.Add(m_killReef);


            m_20ReefEscape = new MyTimedObjective
                ((MyTextsWrapperEnum.ALIEN_GATE_20_Name),
                 MyMissionID.ALIEN_GATE_20,
                 (MyTextsWrapperEnum.ALIEN_GATE_20_Description),
                 null,
                 this,
                 new MyMissionID[] { MyMissionID.ALIEN_GATE_19, },
                 TimeSpan.FromMilliseconds(m_20ObjectiveTime)
                ) { HudName = MyTextsWrapperEnum.HudFrancisReef };
            m_20ReefEscape.Location = new MyMissionLocation(baseSector, (uint)EntityID._20Prefab);
            m_20ReefEscape.Components.Add(new MyMovingEntity((uint)EntityID._19Ship, (uint)EntityID._20ShipTarget, m_20ObjectiveTime));
            m_20ReefEscape.OnMissionLoaded += M20ReefEscapeOnOnMissionLoaded;
            m_20ReefEscape.OnMissionSuccess += ReefEscapeOnOnMissionSuccess;
            m_objectives.Add(m_20ReefEscape);

            m_21DestroyReef = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.ALIEN_GATE_21_Name),
                MyMissionID.ALIEN_GATE_21,
                (MyTextsWrapperEnum.ALIEN_GATE_21_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.ALIEN_GATE_20 },
                new List<uint>() { (uint)EntityID._21ToDesroy }) { StartDialogId = MyDialogueEnum.ALIEN_GATE_2900, HudName = MyTextsWrapperEnum.HudFrancisReef, SaveOnSuccess = true };
            m_21DestroyReef.OnMissionLoaded += M21DestroyReefOnOnMissionLoaded;
            m_21DestroyReef.OnMissionSuccess += M21DestroyReefOnOnMissionSuccess;
            m_21DestroyReef.Components.Add(new MySpawnpointWaves((uint)EntityID._21Detector1, 1, new List<uint[]>()
                                                                                                         {
                                                                                                             new uint[]{(uint)EntityID._21SpawnPoint11},
                                                                                                             new uint[]{(uint)EntityID._21SpawnPoint12}
                                                                                                        }));
            m_21DestroyReef.Components.Add(new MyMovingEntity((uint)EntityID._21Ship2, (uint)EntityID._21Ship2Target, m_21ObjectiveMovingTime));
            m_21DestroyReef.Components.Add(new MyMovingEntity((uint)EntityID._21Particle1, (uint)EntityID._21Particle1Target, m_21ObjectiveMovingTime, false));
            m_21DestroyReef.Components.Add(new MyMovingEntity((uint)EntityID._21Particle2, (uint)EntityID._21Particle2Target, m_21ObjectiveMovingTime, false));
            //m_21DestroyReef.Components.Add(new MyTimedDialogue(TimeSpan.FromMilliseconds(m_21ObjectiveMovingTime), MyDialogueEnum.ALIEN_GATE_3100));
            m_21DestroyReef.Components.Add(new MyTimedDialogue(TimeSpan.FromMilliseconds(5000), MyDialogueEnum.ALIEN_GATE_3000));
            m_objectives.Add(m_21DestroyReef);


            m_22FlyBackTomadelyn = new MyObjective(
                (MyTextsWrapperEnum.ALIEN_GATE_22_Name),
                MyMissionID.ALIEN_GATE_22,
                (MyTextsWrapperEnum.ALIEN_GATE_22_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.ALIEN_GATE_21 },
                new MyMissionLocation(baseSector, (uint)EntityID._22Dummy),
                startDialogId: MyDialogueEnum.ALIEN_GATE_3200
                ) { HudName = MyTextsWrapperEnum.HudMeetingPoint };
            m_22FlyBackTomadelyn.OnMissionLoaded += M22FlyBackTomadelynOnOnMissionLoaded;
            m_objectives.Add(m_22FlyBackTomadelyn);

            m_23ExploreAliengate = new MyObjective(
                (MyTextsWrapperEnum.ALIEN_GATE_23_Name),
                MyMissionID.ALIEN_GATE_23,
                (MyTextsWrapperEnum.ALIEN_GATE_23_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.ALIEN_GATE_22 },
                new MyMissionLocation(baseSector, (uint)EntityID._23Dummy),
                startDialogId: MyDialogueEnum.ALIEN_GATE_3300
                ) { HudName = MyTextsWrapperEnum.Nothing };
            m_23ExploreAliengate.Components.Add(new MyMovingEntity(MyActorConstants.GetActorName(MyActorEnum.MADELYN), (uint)EntityID._23Shiptarget, 50000));
            m_23ExploreAliengate.OnMissionLoaded += M23ExploreAliengateOnOnMissionLoaded;
            m_objectives.Add(m_23ExploreAliengate);
            #endregion
        }
        public MyRussianTransmitterMission()
        {
            ID = MyMissionID.RUSSIAN_TRANSMITTER; /* ID must be added to MyMissions.cs */
            DebugName = new StringBuilder("17-RUF transmitter");
            Name = MyTextsWrapperEnum.RUSSIAN_TRANSMITTER;
            Description = MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_Description;
            Flags = MyMissionFlags.Story;

            MyMwcVector3Int baseSector = new MyMwcVector3Int(-4988032, 0, -865747); // 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.CHINESE_TRANSMITTER }; // IDs of missions required to make this mission available
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_BACK_TO_MADELYN };
            RequiredActors = new MyActorEnum[] { MyActorEnum.MADELYN, MyActorEnum.TARJA, MyActorEnum.VALENTIN };

            #region Objectives

            m_objectives = new List<MyObjective>(); // Creating of list of submissions
            
            var introDialogue = new MyObjectiveDialog(
                MyMissionID.RUSSIAN_TRANSMITTER_INTRO_DIALOGUE,
                null,
                this,
                new MyMissionID[] { },
                MyDialogueEnum.RUSSIAN_TRANSMITTER_0100_INTRO);
            m_objectives.Add(introDialogue);

            // START OF REACH OBJECTIVE SUBMISSION DEFINITION
            var reachSideEntrance = new MyObjective( // 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.RUSSIAN_TRANSMITTER_REACH_SIDE_ENTRANCE, // Name of the submission
                MyMissionID.RUSSIAN_TRANSMITTER_REACH_SIDE_ENTRANCE, // ID of the submission - must be added to MyMissions.cs
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_REACH_SIDE_ENTRANCE_Description, // Description of the submission
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_INTRO_DIALOGUE }, // ID of submissions required to make this submission available - it is clear so this submission is the starting submission
                new MyMissionLocation(baseSector, (uint)EntityID.OutpostSideEntrance) // ID of dummy point of checkpoint
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudEntrance }; // False means do not save game in that checkpoint
            m_objectives.Add(reachSideEntrance); // Adding this submission to the list of submissions of current mission
            // END OF REACH OBJECTIVE SUBMISSION DEFINITION


            var enterTheBase = new MyObjective(
                  MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_ENTER_THE_BASE,
                  MyMissionID.RUSSIAN_TRANSMITTER_ENTER_THE_BASE,
                  MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_ENTER_THE_BASE_Description,
                  null,
                  this,
                  new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_REACH_SIDE_ENTRANCE },
                  new MyMissionLocation(baseSector, (uint)EntityID.EnterTheBase)
              ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudEntrance };
            enterTheBase.OnMissionLoaded += new MissionHandler(enterTheBase_OnMissionLoaded);
            enterTheBase.OnMissionSuccess += new MissionHandler(enterTheBase_OnMissionSuccess);
            m_objectives.Add(enterTheBase);


            var findFrequency = new MyUseObjective(
                  MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_FIND_FREQUENCY,
                  MyMissionID.RUSSIAN_TRANSMITTER_FIND_FREQUENCY,
                  MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_FIND_FREQUENCY_Description,
                  null,
                  this,
                  new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_ENTER_THE_BASE },
                  new MyMissionLocation(baseSector, (uint)EntityID.SabotageTurrets_1),
                  MyTextsWrapperEnum.PressToDownloadData,
                  MyTextsWrapperEnum.SecurityControlHUB,
                  MyTextsWrapperEnum.DownloadingData,
                  10000,
                  MyUseObjectiveType.Hacking
              ) { SaveOnSuccess = false };
            findFrequency.OnMissionLoaded += new MissionHandler(findFrequency_OnMissionLoaded);
            findFrequency.OnMissionSuccess += FindFrequency_Success;
            m_objectives.Add(findFrequency);

            m_strangerContact = new MyObjectiveDialog(
                MyTextsWrapperEnum.Null,
                MyMissionID.RUSSIAN_TRANSMITTER_STRANGER_CONTACT,
                MyTextsWrapperEnum.Null,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_FIND_FREQUENCY },
                MyDialogueEnum.RUSSIAN_TRANSMITTER_0500_0600_HACKPROBLEM_STRANGERCALLS
            );
            m_objectives.Add(m_strangerContact);

            var meetStranger = new MyObjective(
                 MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_MEET_STRANGER,
                 MyMissionID.RUSSIAN_TRANSMITTER_MEET_STRANGER,
                 MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_MEET_STRANGER_Description,
                 null,
                 this,
                 new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_STRANGER_CONTACT },
                 new MyMissionLocation(baseSector, (uint)EntityID.ShipVolodia),
                 radiusOverride: 90f
             ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudStranger };
            meetStranger.OnMissionLoaded += MeetStranger_Loaded;
            meetStranger.OnMissionSuccess += MeetStranger_Success;
            m_objectives.Add(meetStranger);



            var reachWarehouse = new MyObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_REACH_WAREHOUSE,
               MyMissionID.RUSSIAN_TRANSMITTER_REACH_WAREHOUSE,
               MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_REACH_WAREHOUSE_Description,
               null,
               this,
               new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_MEET_STRANGER },
               new MyMissionLocation(baseSector, (uint)EntityID.ReachWarehouse)
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudWarehouse };
            reachWarehouse.OnMissionLoaded += new MissionHandler(ReachWarehouse_Loaded);
            m_objectives.Add(reachWarehouse);


            var stealMilitarySupply = new MyUseObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_STEAL_MILITARY_SUPPLY,
                MyMissionID.RUSSIAN_TRANSMITTER_STEAL_MILITARY_SUPPLY,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_STEAL_MILITARY_SUPPLY_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_REACH_WAREHOUSE },
                new MyMissionLocation(baseSector, (uint)EntityID.StealMilitarySupply),
                MyTextsWrapperEnum.PressToTakeCargo,
                MyTextsWrapperEnum.CargoBox,
                MyTextsWrapperEnum.TakingInProgress,
                1000,
                MyUseObjectiveType.Activating
            ) { SaveOnSuccess = false };
            stealMilitarySupply.OnMissionSuccess += new MissionHandler(StealMilitarySupply_Success);
            m_objectives.Add(stealMilitarySupply);


            m_tradeWithVolodia = new MyObjective(
               MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_TRADE_WITH_VOLODIA,
               MyMissionID.RUSSIAN_TRANSMITTER_TRADE_WITH_VOLODIA,
               MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_TRADE_WITH_VOLODIA_Description,
               null,
               this,
               new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_STEAL_MILITARY_SUPPLY },
               new MyMissionLocation(baseSector, (uint)EntityID.ShipVolodia),
               radiusOverride: 90
            ) { SaveOnSuccess = true, SuccessDialogId = MyDialogueEnum.RUSSIAN_TRANSMITTER_1000_VOLODIA_FOUND, HudName = MyTextsWrapperEnum.Volodia };
            m_tradeWithVolodia.OnMissionSuccess += TradeWithVolodia_Success;
            m_objectives.Add(m_tradeWithVolodia);


            m_fightRussianCommando = new MyObjectiveDestroy(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_FIGHT_RUSSIAN_COMMANDO,
               MyMissionID.RUSSIAN_TRANSMITTER_FIGHT_RUSSIAN_COMMANDO,
               MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_FIGHT_RUSSIAN_COMMANDO_Description,
               null,
               this,
               new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_TRADE_WITH_VOLODIA },
               //new List<uint> { (uint)EntityID.MothershipEntity },
               new List<uint> { },
               new List<uint> { (uint)EntityID.CommandoSpawnPoint },
               false
            ) { SaveOnSuccess = false, SuccessDialogId = MyDialogueEnum.RUSSIAN_TRANSMITTER_1400_RETREAT, HudName = MyTextsWrapperEnum.Nothing };
            m_fightRussianCommando.OnMissionLoaded += RussianCommandoLoaded;
            m_fightRussianCommando.OnMissionSuccess += new MissionHandler(FightRussianCommando_Success);
            m_objectives.Add(m_fightRussianCommando);


            var backToTransmitter = new MyObjective(
                    MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_BACK_TO_TRANSMITTER,
                   MyMissionID.RUSSIAN_TRANSMITTER_BACK_TO_TRANSMITTER,
                   MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_BACK_TO_TRANSMITTER_Description,
                   null,
                   this,
                   new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_FIGHT_RUSSIAN_COMMANDO }, // prerekvizita - OPRAVIT na survive!!!
                   new MyMissionLocation(baseSector, (uint)EntityID.BackToTransmitter)
               ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudTransmitter };
            backToTransmitter.OnMissionLoaded += new MissionHandler(BackToTransmitter_Loaded);
            m_objectives.Add(backToTransmitter);


            var decryptFrequency = new MyUseObjective(
                  MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_DECRYPT_FREQUENCY,
                  MyMissionID.RUSSIAN_TRANSMITTER_DECRYPT_FREQUENCY,
                  MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_DECRYPT_FREQUENCY_Description,
                  null,
                  this,
                  new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_BACK_TO_TRANSMITTER },
                  new MyMissionLocation(baseSector, (uint)EntityID.SabotageTurrets_1),
                  MyTextsWrapperEnum.PressToHack,
                  MyTextsWrapperEnum.SecurityControlHUB,
                  MyTextsWrapperEnum.HackingProgress,
                  5000,
                  MyUseObjectiveType.Hacking
              ) { SaveOnSuccess = false, SuccessDialogId = MyDialogueEnum.RUSSIAN_TRANSMITTER_1600_ITSWORKING };
            m_objectives.Add(decryptFrequency);


            var uploadData = new MyUseObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_UPLOAD_DATA,
                 MyMissionID.RUSSIAN_TRANSMITTER_UPLOAD_DATA,
                 MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_UPLOAD_DATA_Description,
                 null,
                 this,
                 new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_DECRYPT_FREQUENCY },
                 new MyMissionLocation(baseSector, (uint)EntityID.SabotageTurrets_3),
                 MyTextsWrapperEnum.PressToHack,
                 MyTextsWrapperEnum.SecurityControlHUB,
                 MyTextsWrapperEnum.HackingProgress,
                 5000
             ) { SaveOnSuccess = false, SuccessDialogId = MyDialogueEnum.RUSSIAN_TRANSMITTER_1700_UPLOADINGSIGNAL };
            m_objectives.Add(uploadData);


            var findMainRoomEntrance = new MyObjective(
                 MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_FIND_MAIN_ROOM_ENTRANCE,
                 MyMissionID.RUSSIAN_TRANSMITTER_FIND_MAIN_ROOM_ENTRANCE,
                 MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_FIND_MAIN_ROOM_ENTRANCE_Description,
                 null,
                 this,
                 new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_UPLOAD_DATA },
                 new MyMissionLocation(baseSector, (uint)EntityID.FindMainRoomEntrance)
             ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudEntrance };
            findMainRoomEntrance.OnMissionLoaded += new MissionHandler(findMainRoomEntrance_Loaded);
            m_objectives.Add(findMainRoomEntrance);


            var placeDeviceOnTransmitter = new MyUseObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_PLACE_DEVICE_ON_TRANSMITTER,
                MyMissionID.RUSSIAN_TRANSMITTER_PLACE_DEVICE_ON_TRANSMITTER,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_PLACE_DEVICE_ON_TRANSMITTER_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_FIND_MAIN_ROOM_ENTRANCE },
                new MyMissionLocation(baseSector, (uint)EntityID.PlaceDeviceOnTransmitter),
                MyTextsWrapperEnum.PressToPlaceDevice,
                MyTextsWrapperEnum.Transmitter,
                MyTextsWrapperEnum.PlacementInProgress,
                10000,
                MyUseObjectiveType.Building
              ) { SaveOnSuccess = false };
            placeDeviceOnTransmitter.OnMissionSuccess += new MissionHandler(PlaceDeviceOnTransmitter_Success);
            m_objectives.Add(placeDeviceOnTransmitter);


            var openDoors = new MyObjectiveEnablePrefabs(
              MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_OPEN_DOORS,
              MyMissionID.RUSSIAN_TRANSMITTER_OPEN_DOORS,
              MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_OPEN_DOORS_Description,
              null,
              this,
              new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_PLACE_DEVICE_ON_TRANSMITTER },
              null,
              new List<uint> { (uint)EntityID.Hub3 },
              new List<uint> { (uint)EntityID.Door1, (uint)EntityID.Door2, (uint)EntityID.Door3, (uint)EntityID.Door4, }
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudHub };
            openDoors.OnMissionSuccess += new MissionHandler(OpenDoors_Success);
            m_objectives.Add(openDoors);


            var backToMadelyn = new MyObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_BACK_TO_MADELYN,
                MyMissionID.RUSSIAN_TRANSMITTER_BACK_TO_MADELYN,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_BACK_TO_MADELYN_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_OPEN_DOORS },
                new MyMissionLocation(baseSector, MyMissionLocation.MADELYN_HANGAR),
                radiusOverride: MyMissionLocation.MADELYN_HANGAR_RADIUS
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudMadelynsSapho };
            backToMadelyn.OnMissionSuccess += new MissionHandler(BackToMadelyn_Success);
            m_objectives.Add(backToMadelyn);

            #endregion

        }
        public MyTradeStationEACMission()
        {
            ID          = MyMissionID.TRADE_STATION_EAC;            /* ID must be added to MyMissions.cs */
            DebugName   = new StringBuilder("Trade station - EAC"); // Nazev mise
            Name        = MyTextsWrapperEnum.TRADE_STATION_EAC;
            Description = MyTextsWrapperEnum.EmptyDescription;

            MyMwcVector3Int baseSector = new MyMwcVector3Int(5944222, 0, -3414281);     // Story sector of the script

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

            RequiredMissions           = new MyMissionID[] { };                         // mise ktere musi byt splneny pred prijetim teto mise
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.TRADE_STATION_EAC_RETURN };
            RequiredActors             = new MyActorEnum[] { MyActorEnum.MARCUS, MyActorEnum.MADELYN, MyActorEnum.TARJA, MyActorEnum.VALENTIN };

            m_objectives = new List <MyObjective>(); // Creating of list of submissions
            // START DEFINICE SUBMISE



            m_casino = new MyObjective(                    // One member of that list - je to MySubmission takze cilem je doletet do checkpointu
                new StringBuilder("Get into the station"), // nazev submise
                MyMissionID.TRADE_STATION_EAC_CASINO,      // id submise
                new StringBuilder(""),                     // popis submise
                null,
                this,
                new MyMissionID[] { },                                         // ID submisi ktere musi byt splneny - je to prazdne takze je to prvni submise
                new MyMissionLocation(baseSector, (uint)EntityID.Casino_Dummy) // ID of dummy point of checkpoint
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudStation
            };                          // nastaveni save na checkpointu nebo ne
            m_objectives.Add(m_casino); // pridani do seznamu submisi



            var talkWith = new MyObjectiveDialog(
                (MyTextsWrapperEnum.TRADE_STATION_EAC_DIALOGUE_Name),
                MyMissionID.TRADE_STATION_EAC_DIALOGUE,
                (MyTextsWrapperEnum.TRADE_STATION_EAC_DIALOGUE_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.TRADE_STATION_EAC_CASINO }
                )
            {
                SaveOnSuccess = false
            };

            m_objectives.Add(talkWith);

            m_hospital = new MyObjectiveEnablePrefabs(
                new StringBuilder("Activate the central defense system"),
                MyMissionID.TRADE_STATION_EAC_HOSPITAL,
                new StringBuilder(""),
                null,
                this,
                new MyMissionID[] { MyMissionID.TRADE_STATION_EAC_DIALOGUE },
                null,
                new List <uint> {
                (uint)EntityID.PC_Red
            },
                new List <uint> {
                (uint)EntityID.Central_Defense_System
            }
                )
            {
                HudName = MyTextsWrapperEnum.HudSecurityHub
            };
            m_objectives.Add(m_hospital);


            /* m_hospital = new MyObjective( // One member of that list - je to MySubmission takze cilem je doletet do checkpointu
             *  new StringBuilder("Reset station central defense system"), // nazev submise
             *  MyMissionID.TRADE_STATION_EAC_HOSPITAL, // id submise
             *  new StringBuilder("Reset station central defense system"), // popis submise
             *  null,
             *  this,
             *  new MyMissionID[] { MyMissionID.TRADE_STATION_EAC_DIALOGUE }, // ID submisi ktere musi byt splneny - je to prazdne takze je to prvni submise
             *  new MyMissionLocation(baseSector, (uint)EntityID.PC_Red) // ID of dummy point of checkpoint
             *  ) { SaveOnSuccess = false }; // nastaveni save na checkpointu nebo ne
             * m_objectives.Add(m_hospital); // pridani do seznamu submisi*/

            var Return = new MyObjective(               // One member of that list - je to MySubmission takze cilem je doletet do checkpointu
                new StringBuilder("Return to Madelyn"), // nazev submise
                MyMissionID.TRADE_STATION_EAC_RETURN,   // id submise
                new StringBuilder(""),                  // popis submise
                null,
                this,
                new MyMissionID[] { MyMissionID.TRADE_STATION_EAC_HOSPITAL },        // ID submisi ktere musi byt splneny - je to prazdne takze je to prvni submise
                new MyMissionLocation(baseSector, MyMissionLocation.MADELYN_HANGAR), // ID of dummy point of checkpoint
                radiusOverride: MyMissionLocation.MADELYN_HANGAR_RADIUS
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudMadelynsSapho
            };                        // nastaveni save na checkpointu nebo ne

            m_objectives.Add(Return); // pridani do seznamu submisi

            m_hospital.OnMissionSuccess += DefenseON;
            m_casino.OnMissionSuccess   += AttackBegin;
        }
        public MyRussianWarehouseMission()
        {
            MyMwcVector3Int baseSector = new MyMwcVector3Int(-7420630, 0, 388170);

            ID = MyMissionID.RUSSIAN_WAREHOUSE;
            DebugName = new StringBuilder("05-Russian warehouse");
            Name = MyTextsWrapperEnum.RUSSIAN_WAREHOUSE;
            Description = MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_Description;
            Flags = MyMissionFlags.Story;
            Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation);

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

            m_objectives = new List<MyObjective>();
            m_sneakInsideMainBaseSubmission = new MyObjective(
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_SNEAKINMAINBASE_Name),
                MyMissionID.RUSSIAN_WAREHOUSE_SNEAKINMAINBASE,
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_SNEAKINMAINBASE_Description),
                null,
                this,
                new MyMissionID[] { },
                new MyMissionLocation(baseSector, (uint)EntityID.SneakInsideSubmissionLocation),
                startDialogId: MyDialogueEnum.RUSSIAN_WAREHOUSE_0100
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudEntrance };
            m_sneakInsideMainBaseSubmission.OnMissionLoaded += SneakInsideMainBaseSubmission_OnMissionLoaded;
            m_objectives.Add(m_sneakInsideMainBaseSubmission);
            
            var TurnOffSecurityCams = new MyObjectiveDisablePrefabs(
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_TURNOFFCAMS_Name),
                MyMissionID.RUSSIAN_WAREHOUSE_TURNOFFCAMS,
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_TURNOFFCAMS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_WAREHOUSE_SNEAKINMAINBASE },
                new List<uint>() { (uint)EntityID.TurnOffCamera0, (uint)EntityID.TurnOffCamera1, (uint)EntityID.TurnOffCamera2 },
                new List<uint>() { (uint)EntityID.TurnOffHUB },
                markObjectsToDisable: false,
                startDialogId: MyDialogueEnum.RUSSIAN_WAREHOUSE_0200
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudSecurityHub };
            m_objectives.Add(TurnOffSecurityCams);
            TurnOffSecurityCams.OnMissionLoaded += TurnOffSecurityCams_OnMissionLoaded;

            var ControlTurret = new MyObjectiveDisablePrefabs(
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_CTRLTURRET_Name),
                MyMissionID.RUSSIAN_WAREHOUSE_CTRLTURRET,
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_CTRLTURRET_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_WAREHOUSE_TURNOFFCAMS },
                new List<uint>() { (uint)EntityID.SecurityTower1, (uint)EntityID.SecurityTower2, (uint)EntityID.SecurityTower3, (uint)EntityID.SecurityTower4, (uint)EntityID.SecurityTower5 },
                new List<uint>() { (uint)EntityID.SecurityTowersHUB },
                markObjectsToDisable: false
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudSecurityHub };
            ControlTurret.OnMissionLoaded += ControlTurretOnLoaded;
            ControlTurret.OnMissionSuccess += ControlTurretOnSuccess;
            m_objectives.Add(ControlTurret);

            var OpenDoor = new MyObjectiveEnablePrefabs(
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_OPEN_DOORS_Name),
                MyMissionID.RUSSIAN_WAREHOUSE_OPEN_DOORS,
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_OPEN_DOORS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_WAREHOUSE_CTRLTURRET },
                null,
                new List<uint> { (uint)EntityID.OpenDoorHUB},
                new List<uint> { (uint)EntityID.GetOutsideDoors },
                startDialogId: MyDialogueEnum.RUSSIAN_WAREHOUSE_0300
                ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudHub };
            m_objectives.Add(OpenDoor);

            var GetOutsideMainBase = new MyObjective(
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_GETOUTMAINBASE_Name),
                MyMissionID.RUSSIAN_WAREHOUSE_GETOUTMAINBASE,
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_GETOUTMAINBASE_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_WAREHOUSE_OPEN_DOORS },
                new MyMissionLocation(baseSector, (uint)EntityID.GetOutsideSubmissionLocation),
                startDialogId: MyDialogueEnum.RUSSIAN_WAREHOUSE_0400
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.Nothing };
            GetOutsideMainBase.OnMissionLoaded += new MissionHandler(GetOutsideMainBase_OnMissionLoaded);
            m_objectives.Add(GetOutsideMainBase);

            var BreakThruOldEntrance = new MyObjective(
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_BREAKOLDENTRANCE_Name),
                MyMissionID.RUSSIAN_WAREHOUSE_BREAKOLDENTRANCE,
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_BREAKOLDENTRANCE_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_WAREHOUSE_GETOUTMAINBASE },
                new MyMissionLocation(baseSector, (uint)EntityID.BreakThroughSubmissionLocation),
                startDialogId: MyDialogueEnum.RUSSIAN_WAREHOUSE_1100
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.Nothing };
            BreakThruOldEntrance.OnMissionLoaded += BreakThruOldEntrance_OnMissionLoaded;
            BreakThruOldEntrance.OnMissionUpdate += UpdateRussianMothershipMovement;
            m_objectives.Add(BreakThruOldEntrance);

            var LocateWarehouse = new MyObjective(
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_LOCATEWAREHOUSE_Name),
                MyMissionID.RUSSIAN_WAREHOUSE_LOCATEWAREHOUSE,
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_LOCATEWAREHOUSE_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_WAREHOUSE_BREAKOLDENTRANCE },
                new MyMissionLocation(baseSector, (uint)EntityID.LocateWarehouseSubmissionLocation),
                startDialogId: MyDialogueEnum.RUSSIAN_WAREHOUSE_0500
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.Nothing };
            LocateWarehouse.OnMissionUpdate += UpdateRussianMothershipMovement;
            LocateWarehouse.OnMissionLoaded += LocateWarehouse_OnMissionLoaded;
            LocateWarehouse.OnMissionCleanUp += LocateWarehouse_OnMissionUnload;
            m_objectives.Add(LocateWarehouse);

            var FindTransmitter = new MyUseObjective(
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_FINDTRANSMITTER_Name),
                MyMissionID.RUSSIAN_WAREHOUSE_FINDTRANSMITTER,
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_FINDTRANSMITTER_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_WAREHOUSE_LOCATEWAREHOUSE },
                new MyMissionLocation(baseSector, (uint)EntityID.TransmitterCargoBox),
                Localization.MyTextsWrapperEnum.PressToTakeCargo,
                Localization.MyTextsWrapperEnum.TakeAll,
                Localization.MyTextsWrapperEnum.TakeAll,
                1000,
                radiusOverride: 50,
                startDialogId: MyDialogueEnum.RUSSIAN_WAREHOUSE_0700
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudTransmitter };
            FindTransmitter.OnMissionUpdate += UpdateRussianMothershipMovement;
            FindTransmitter.OnMissionLoaded += new MissionHandler(FindTransmitter_OnMissionLoaded);
            FindTransmitter.OnMissionSuccess += new MissionHandler(FindTransmitter_OnMissionSuccess);
            m_objectives.Add(FindTransmitter);

            var downDataDlgSubmission = new MyObjectiveDialog(
                    MyMissionID.RUSSIAN_WAREHOUSE_DOWNDATADIALOGUE,
                    null,
                    this,
                    new MyMissionID[] { MyMissionID.RUSSIAN_WAREHOUSE_FINDTRANSMITTER },
                    MyDialogueEnum.RUSSIAN_WAREHOUSE_0800
                );
            downDataDlgSubmission.OnMissionUpdate += UpdateRussianMothershipMovement;
            m_objectives.Add(downDataDlgSubmission);

            var DownData = new MyUseObjective(
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_DOWNLOAD_DATA_Name),
                MyMissionID.RUSSIAN_WAREHOUSE_DOWNLOAD_DATA,
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_DOWNLOAD_DATA_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_WAREHOUSE_DOWNDATADIALOGUE },
                new MyMissionLocation(baseSector, (uint)EntityID.DownloadDataDummy),
                Localization.MyTextsWrapperEnum.PressToDownloadData,
                Localization.MyTextsWrapperEnum.Console,
                Localization.MyTextsWrapperEnum.DownloadingData,
                3000) { SaveOnSuccess = true };
            DownData.OnMissionUpdate += UpdateRussianMothershipMovement;
            DownData.OnMissionLoaded += DownDataOnLoaded;
            m_objectives.Add(DownData);

            var TurnOffMainDefense1 = new MyObjectiveDisablePrefabs(
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_TURNOFFMAINDEF_PART1_Name),
                MyMissionID.RUSSIAN_WAREHOUSE_TURNOFFMAINDEF_PART1,
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_TURNOFFMAINDEF_PART1_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_WAREHOUSE_DOWNLOAD_DATA },
                new List<uint>() { (uint)EntityID.CargoTurret0, (uint)EntityID.CargoTurret1, (uint)EntityID.CargoTurret2, (uint)EntityID.CargoTurret3, (uint)EntityID.CargoTurret4 },
                new List<uint>() { (uint)EntityID.CargoTurretHUB0 },
                markObjectsToDisable: false,
                startDialogId: MyDialogueEnum.RUSSIAN_WAREHOUSE_0900
            ) { HudName = MyTextsWrapperEnum.HudHubA };
            TurnOffMainDefense1.OnMissionUpdate += UpdateRussianMothershipMovement;
            m_objectives.Add(TurnOffMainDefense1);

            var TurnOffMainDefense2 = new MyObjectiveDisablePrefabs(
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_TURNOFFMAINDEF_PART2_Name),
                MyMissionID.RUSSIAN_WAREHOUSE_TURNOFFMAINDEF_PART2,
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_TURNOFFMAINDEF_PART2_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_WAREHOUSE_TURNOFFMAINDEF_PART1 },
                new List<uint>() { (uint)EntityID.CargoTurret5, (uint)EntityID.CargoTurret6, (uint)EntityID.CargoTurret7, (uint)EntityID.CargoTurret8, (uint)EntityID.CargoTurret9 },
                new List<uint>() { (uint)EntityID.CargoTurretHUB1 },
                markObjectsToDisable: false
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudHubB };
            TurnOffMainDefense2.OnMissionUpdate += UpdateRussianMothershipMovement;
            m_objectives.Add(TurnOffMainDefense2);

            var GetOutsideWarehouse = new MyObjective(
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_GETOUTWAREHOUSE_Name),
                MyMissionID.RUSSIAN_WAREHOUSE_GETOUTWAREHOUSE,
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_GETOUTWAREHOUSE_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_WAREHOUSE_TURNOFFMAINDEF_PART1, MyMissionID.RUSSIAN_WAREHOUSE_TURNOFFMAINDEF_PART2 },
                new MyMissionLocation(baseSector, (uint)EntityID.GetOutsideThruCargoSubmissionLocation)
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.Nothing };
            GetOutsideWarehouse.OnMissionUpdate += UpdateRussianMothershipMovement;
            GetOutsideWarehouse.OnMissionLoaded += GetOutsideWarehouseOnLoad;
            GetOutsideWarehouse.OnMissionCleanUp += GetOutsideWarehouseOnCleanUp;
            m_objectives.Add(GetOutsideWarehouse);

            var CrushRemainingShips = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_CRUSHREMAINGSHIPS_Name),
                MyMissionID.RUSSIAN_WAREHOUSE_CRUSHREMAINGSHIPS,
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_CRUSHREMAINGSHIPS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_WAREHOUSE_GETOUTWAREHOUSE },
                new List<uint> { },
                new List<uint> { (uint)EntityID.CrushRussiansSpawnpoint },
                false
            ) { SaveOnSuccess = true };
            CrushRemainingShips.OnMissionUpdate += UpdateRussianMothershipMovement;
            CrushRemainingShips.OnMissionLoaded += CrushRemainingShipsOnLoad;
            m_objectives.Add(CrushRemainingShips);

            m_returnToMeetingPointSubmission = new MyObjective(
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_MEETINGPOINT_Name),
                MyMissionID.RUSSIAN_WAREHOUSE_MEETINGPOINT,
                (MyTextsWrapperEnum.RUSSIAN_WAREHOUSE_MEETINGPOINT_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_WAREHOUSE_CRUSHREMAINGSHIPS },
                new MyMissionLocation(baseSector, MyMissionLocation.MADELYN_HANGAR),
                successDialogId: MyDialogueEnum.RUSSIAN_WAREHOUSE_1000,
                radiusOverride: MyMissionLocation.MADELYN_HANGAR_RADIUS
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudMadelynsSapho };
            m_returnToMeetingPointSubmission.OnMissionUpdate += UpdateRussianMothershipMovement;
            m_returnToMeetingPointSubmission.OnMissionUpdate += new MissionHandler(ReturnToMeetingPointSubmissionOnUpdate);
            m_objectives.Add(m_returnToMeetingPointSubmission);

            Components.Add(new MySpawnpointWaves((uint)EntityID.RaidDetector, 0, (uint)EntityID.RaidSpawnpoint));
        }
        public MyEACPrisonMission()
        {
            ID              = MyMissionID.EAC_PRISON; /* ID must be added to MyMissions.cs */
            DebugName       = new StringBuilder("20-EAC prison");
            Name            = MyTextsWrapperEnum.EAC_PRISON;
            Description     = MyTextsWrapperEnum.EAC_PRISON_Description;
            Flags           = MyMissionFlags.Story;
            AchievementName = MySteamAchievementNames.Mission29_EacPrison;

            MyMwcVector3Int baseSector = new MyMwcVector3Int(5480055, 0, -5077310);

            /* sector where the mission is located */
            Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation); //posledne cislo - ID dummy pointu kde prijimam misiu

            RequiredMissions           = new MyMissionID[] { MyMissionID.TWIN_TOWERS };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.EAC_PRISON_MEETINGPOINT };
            RequiredActors             = new MyActorEnum[] { MyActorEnum.TARJA, MyActorEnum.VALENTIN, MyActorEnum.MADELYN, MyActorEnum.MARCUS };

            m_objectives = new List <MyObjective>();

            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeStorage, 0, (uint)EntityID.SpawnpointAtStorage));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeIndustry, 0, (uint)EntityID.SpawnpointAtIndustry1));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeIndustry, 0, (uint)EntityID.SpawnpointAtIndustry2));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeParking, 0, (uint)EntityID.SpawnpointAtParking));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeMines, 0, (uint)EntityID.SpawnpointAtMines));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeMinesEntrance, 0, (uint)EntityID.SpawnpointAtMinesEntrance));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeMarcusCell, 0, (uint)EntityID.SpawnpointAtMarcusCell));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeSecurityCheck7, 0, (uint)EntityID.SpawnpointAtSecurityCheck7));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeSecurityCheck6, 0, (uint)EntityID.SpawnpointAtSecurityCheck6));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeSecurityCheck8, 0, (uint)EntityID.SpawnpointAtSecurityCheck8));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeSecurityCheck4, 0, (uint)EntityID.SpawnpointAtSecurityCheck4));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeCellAfterSecurityCheck4, 0, (uint)EntityID.SpawnpointAtCellAfterSecurityCheck4));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeSecurityCheck5, 0, (uint)EntityID.SpawnpointAtSecurityCheck5));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeCell1AfterSecurityCheck5, 0, (uint)EntityID.SpawnpointAtCell1AfterSecurityCheck5));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeCell2AfterSecurityCheck5, 0, (uint)EntityID.SpawnpointAtCell2AfterSecurityCheck5));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeCell3AfterSecurityCheck5, 0, (uint)EntityID.SpawnpointAtCell3AfterSecurityCheck5));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeSecurityCheck3, 0, (uint)EntityID.SpawnpointAtSecurityCheck3));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeCell1AfterSecurityCheck3, 0, (uint)EntityID.SpawnpointAtCell1AfterSecurityCheck3));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeCell2AfterSecurityCheck3, 0, (uint)EntityID.SpawnpointAtCell2AfterSecurityCheck3));

            //Components.Add(new MySpawnpointWaves(detectorId, 3, new List<uint[]> {
            //    new uint[] { spawnpointId1, spawnpointId2, spawnpointId3 },
            //    new uint[] { spawnpointId4, spawnpointId5 }}));

            //01
            var mothershipBattle = new MyObjective(
                (MyTextsWrapperEnum.EAC_PRISON_THRUSWARM_Name),
                MyMissionID.EAC_PRISON_THRUSWARM,
                (MyTextsWrapperEnum.EAC_PRISON_THRUSWARM_Description),
                null,
                this,
                new MyMissionID[] {},
                new MyMissionLocation(baseSector, (uint)EntityID.MotherShiBattleLocationDummy)
                )
            {
                SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_PRISON_0100, SuccessDialogId = MyDialogueEnum.EAC_PRISON_0200
            };

            m_objectives.Add(mothershipBattle);
            //mothershipBattle.Components.Add(new MySpawnpointWaves(77073, 0, 76625));
            mothershipBattle.OnMissionLoaded += mothershipBattle_OnMissionLoaded;

            //02

            var destroySolarDefence = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.EAC_PRISON_SOLARDEF_Name),
                MyMissionID.EAC_PRISON_SOLARDEF,
                (MyTextsWrapperEnum.EAC_PRISON_SOLARDEF_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_THRUSWARM },
                m_02toKill
                )
            {
                SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_PRISON_0300
            };

            destroySolarDefence.OnMissionSuccess += DestroySolarDefenceOnOnMissionSuccess;
            m_objectives.Add(destroySolarDefence);
            destroySolarDefence.OnMissionLoaded += destroySolarDefence_OnMissionLoaded;

            //03
            m_destroySolarPanelsFirst = new MyObjective(
                (MyTextsWrapperEnum.EAC_PRISON_SOLAROFF1_Name),
                MyMissionID.EAC_PRISON_SOLAROFF1,
                (MyTextsWrapperEnum.EAC_PRISON_SOLAROFF1_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_SOLARDEF },
                null
                )
            {
                SaveOnSuccess = false
            };
            m_destroySolarPanelsFirst.OnMissionLoaded  += DestroySolarPanelsFirstSubmissionLoaded;
            m_destroySolarPanelsFirst.OnMissionSuccess += DestroySolarPanelsFirstSubmissionSuccess;
            m_objectives.Add(m_destroySolarPanelsFirst);
            m_destroySolarPanelsFirst.SaveOnSuccess = true;

            //04
            var motherShipHelp = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.EAC_PRISON_MOTHERSHIPHELP_Name),
                MyMissionID.EAC_PRISON_MOTHERSHIPHELP,
                (MyTextsWrapperEnum.EAC_PRISON_MOTHERSHIPHELP_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_SOLAROFF1 },
                m_04toKill
                )
            {
                SaveOnSuccess = false, StartDialogId = MyDialogueEnum.EAC_PRISON_0400, SuccessDialogId = MyDialogueEnum.EAC_PRISON_0500
            };

            m_objectives.Add(motherShipHelp);
            motherShipHelp.OnMissionLoaded += new MissionHandler(motherShipHelp_OnMissionLoaded);

            //05
            m_destroySolarPanelsSecond = new MyObjective(
                (MyTextsWrapperEnum.EAC_PRISON_SOLAROFF2_Name),
                MyMissionID.EAC_PRISON_SOLAROFF2,
                (MyTextsWrapperEnum.EAC_PRISON_SOLAROFF2_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_MOTHERSHIPHELP },
                null
                )
            {
                SaveOnSuccess = true,
            };
            m_destroySolarPanelsSecond.OnMissionLoaded  += DestroySolarPanelsSecondSubmissionLoaded;
            m_destroySolarPanelsSecond.OnMissionSuccess += DestroySolarPanelsSecondSubmissionSuccess;
            m_objectives.Add(m_destroySolarPanelsSecond);

            //06
            var breakInsideStation = new MyTimedReachLocationObjective(
                (MyTextsWrapperEnum.EAC_PRISON_BREAKIN_Name),
                MyMissionID.EAC_PRISON_BREAKIN,
                (MyTextsWrapperEnum.EAC_PRISON_BREAKIN_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_SOLAROFF2 },
                new System.TimeSpan(0, 1, 0),
                new MyMissionLocation(baseSector, (uint)EntityID.BreakInsideStationLocationDummy)
                )
            {
                SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_PRISON_0600, HudName = MyTextsWrapperEnum.HudCargoBay
            };

            breakInsideStation.OnMissionSuccess += BreakInsideStationSubmissionSuccess;
            breakInsideStation.OnMissionLoaded  += BreakInsideStationOnOnMissionLoaded;
            m_objectives.Add(breakInsideStation);

            //07
            var marcusLocationIntel = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_PRISON_LOCINTEL_Name),
                MyMissionID.EAC_PRISON_LOCINTEL,
                (MyTextsWrapperEnum.EAC_PRISON_LOCINTEL_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_BREAKIN },
                new MyMissionLocation(baseSector, (uint)EntityID._MarcusIntelLocation),
                MyTextsWrapperEnum.PressToDownloadData,
                MyTextsWrapperEnum.Console,
                MyTextsWrapperEnum.DownloadingData,
                5000,
                MyUseObjectiveType.Hacking
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudSecurityHub
            };

            m_objectives.Add(marcusLocationIntel);
            marcusLocationIntel.OnMissionLoaded  += new MissionHandler(marcusLocationIntel_OnMissionLoaded);
            marcusLocationIntel.OnMissionSuccess += MarcusLocationIntelOnOnMissionSuccess;
            marcusLocationIntel.Components.Add(new MySpawnpointLimiter(m_spawns, 6));

            //08
            m_findCircoutPart = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_PRISON_ACQUIREIDCARD_Name),
                MyMissionID.EAC_PRISON_ACQUIREIDCARD,
                (MyTextsWrapperEnum.EAC_PRISON_ACQUIREIDCARD_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_LOCINTEL },
                new MyMissionLocation(baseSector, (uint)EntityID.CargoIDCard),
                MyTextsWrapperEnum.PressToTakeCargo,
                MyTextsWrapperEnum.TakeAll,
                MyTextsWrapperEnum.TakeAll,
                2000,
                MyUseObjectiveType.Taking,
                radiusOverride: 50
                )
            {
                SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_PRISON_0700, HudName = MyTextsWrapperEnum.HudIdCard
            };

            m_findCircoutPart.OnMissionLoaded  += OnFindCircuitLoaded;
            m_findCircoutPart.OnMissionSuccess += new MissionHandler(m_findCircoutPart_OnMissionSuccess);
            m_objectives.Add(m_findCircoutPart);


            var marcusLocationIntel2 = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_PRISON_LOCINTEL2_Name),
                MyMissionID.EAC_PRISON_LOCINTEL2,
                (MyTextsWrapperEnum.EAC_PRISON_LOCINTEL2_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_ACQUIREIDCARD },
                new MyMissionLocation(baseSector, (uint)EntityID._MarcusIntelLocation),
                MyTextsWrapperEnum.PressToDownloadData,
                MyTextsWrapperEnum.Console,
                MyTextsWrapperEnum.DownloadingData,
                5000,
                MyUseObjectiveType.Hacking
                )
            {
                SaveOnSuccess = true, SuccessDialogId = MyDialogueEnum.EAC_PRISON_0900, StartDialogId = MyDialogueEnum.EAC_PRISON_0800, HudName = MyTextsWrapperEnum.HudSecurityHub
            };

            m_objectives.Add(marcusLocationIntel2);

            //09
            var openDoors = new MyObjectiveEnablePrefabs(
                (MyTextsWrapperEnum.EAC_PRISON_OPENACCESS_Name),
                MyMissionID.EAC_PRISON_OPENACCESS,
                (MyTextsWrapperEnum.EAC_PRISON_OPENACCESS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_LOCINTEL2 },
                null,
                new List <uint> {
                (int)EntityID.SecurityHub
            },
                m_09toEnablePrefabs
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudSecurityHub
            };

            m_objectives.Add(openDoors);

            openDoors.OnMissionLoaded += OnOpenDoorsLoaded;

            //10
            var takeOffSecurityCircuit = new MyObjectiveDisablePrefabs(
                (MyTextsWrapperEnum.EAC_PRISON_SECURITYOFF_Name),
                MyMissionID.EAC_PRISON_SECURITYOFF,
                (MyTextsWrapperEnum.EAC_PRISON_SECURITYOFF_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_OPENACCESS },
                new List <uint> {
                (uint)EntityID.HubHack
            },
                new List <uint> {
                (uint)EntityID.HubHackGenerator
            },
                false,
                false
                )
            {
                SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_PRISON_1000, HudName = MyTextsWrapperEnum.HudHub
            };

            takeOffSecurityCircuit.OnMissionLoaded += OntakeOffSecuritypartLoaded;//zapne svetlo
            m_objectives.Add(takeOffSecurityCircuit);

            //11
            var approachMarcusCell = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_PRISON_MARCUSCELL_Name),
                MyMissionID.EAC_PRISON_MARCUSCELL,
                (MyTextsWrapperEnum.EAC_PRISON_MARCUSCELL_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_SECURITYOFF },
                new MyMissionLocation(baseSector, (uint)EntityID.MarcusCellLocation),
                MyTextsWrapperEnum.HoldToMoveMarcus,
                MyTextsWrapperEnum.Actor_Marcus,
                MyTextsWrapperEnum.Moving,
                4000,
                MyUseObjectiveType.Taking
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudMarcus
            };

            approachMarcusCell.OnMissionLoaded += OnapproachMarcusLoaded;
            m_objectives.Add(approachMarcusCell);

            var marcusLoaded = new MyObjectiveDialog(
                MyMissionID.EAC_PRISON_MARCUSDIALOG,
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_MARCUSCELL },
                MyDialogueEnum.EAC_PRISON_1200
                )
            {
                SaveOnSuccess = true
            };

            marcusLoaded.OnMissionLoaded += OnMarcusLoadedLoaded;
            m_objectives.Add(marcusLoaded);

            var weHaveCompany = new MyObjectiveDialog(
                MyMissionID.EAC_PRISON_WE_HAVE_COMPANY,
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_MARCUSDIALOG },
                MyDialogueEnum.EAC_PRISON_1250
                )
            {
                SaveOnSuccess = false
            };

            weHaveCompany.OnMissionLoaded += OnWeHaveCompanyLoaded;
            m_objectives.Add(weHaveCompany);

            //12
            var findMarcusSmallShip = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_PRISON_COVERMARCUS_Name),
                MyMissionID.EAC_PRISON_COVERMARCUS,
                (MyTextsWrapperEnum.EAC_PRISON_COVERMARCUS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_WE_HAVE_COMPANY },
                new MyMissionLocation(baseSector, (uint)EntityID.MarcusShipDetector),
                MyTextsWrapperEnum.HoldToMoveMarcus,
                MyTextsWrapperEnum.Actor_Marcus,
                MyTextsWrapperEnum.Moving,
                4000,
                MyUseObjectiveType.Putting
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudShip
            };

            // destroySolarDefence.OnMissionSuccess += ToHangarSubmissionSuccess;
            m_objectives.Add(findMarcusSmallShip);
            findMarcusSmallShip.OnMissionSuccess += OnSuccesfindMarcusSmallShip;

            //13
            var equipMarcus = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_PRISON_GETARMS_Name),
                MyMissionID.EAC_PRISON_GETARMS,
                (MyTextsWrapperEnum.EAC_PRISON_GETARMS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_COVERMARCUS },
                new MyMissionLocation(baseSector, (uint)EntityID.CargoForMarcus),
                MyTextsWrapperEnum.HoldToMoveWeapons,
                MyTextsWrapperEnum.Actor_Marcus,
                MyTextsWrapperEnum.Moving,
                4000
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudEquipment
            };

            // destroySolarDefence.OnMissionSuccess += ToHangarSubmissionSuccess;
            m_objectives.Add(equipMarcus);
            equipMarcus.OnMissionSuccess += OnEquipMarcussSucces;
            equipMarcus.OnMissionLoaded  += EquipMarcusOnOnMissionLoaded;

            //14
            var fightOutStation = new MyObjective(
                (MyTextsWrapperEnum.EAC_PRISON_FIGHTOUT_Name),
                MyMissionID.EAC_PRISON_FIGHTOUT,
                (MyTextsWrapperEnum.EAC_PRISON_FIGHTOUT_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_GETARMS },
                new MyMissionLocation(baseSector, (uint)EntityID.StationDummy)
                )
            {
                SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_PRISON_1300, SuccessDialogId = MyDialogueEnum.EAC_PRISON_1400, HudName = MyTextsWrapperEnum.Nothing
            };

            fightOutStation.OnMissionLoaded  += fightOutStation_OnMissionLoaded;
            fightOutStation.OnMissionSuccess += fightOutStation_OnMissionSuccess;
            m_objectives.Add(fightOutStation);

            //15
            var CrushRemainingShips = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.EAC_PRISON_CRUSHREINFORCEMENTS_Name),
                MyMissionID.EAC_PRISON_CRUSHREINFORCEMENTS,
                (MyTextsWrapperEnum.EAC_PRISON_CRUSHREINFORCEMENTS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_FIGHTOUT },
                new List <uint> {
            },                          // entities needed to kill
                m_15toKillSpawnpoints,  // spawnpoint from which bots must be killed
                false                   // don't show marks on entities (not from spawnpoint)
                )
            {
                SaveOnSuccess = true,
            };

            m_objectives.Add(CrushRemainingShips);

            //16
            var GetToMeetingPoint = new MyObjective(
                (MyTextsWrapperEnum.EAC_PRISON_MEETINGPOINT_Name),
                MyMissionID.EAC_PRISON_MEETINGPOINT,
                (MyTextsWrapperEnum.EAC_PRISON_MEETINGPOINT_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_CRUSHREINFORCEMENTS },
                new MyMissionLocation(baseSector, MyMissionLocation.MADELYN_HANGAR),
                radiusOverride: MyMissionLocation.MADELYN_HANGAR_RADIUS
                )
            {
                SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_PRISON_1500, SuccessDialogId = MyDialogueEnum.EAC_PRISON_1600, HudName = MyTextsWrapperEnum.HudMeetingPoint
            };

            m_objectives.Add(GetToMeetingPoint);
        }
        public MyResearchVesselMission()
        {
            ID          = MyMissionID.RESEARCH_VESSEL;
            DebugName   = new StringBuilder("12-Eurydice/Osaka");
            Name        = MyTextsWrapperEnum.RESEARCH_VESSEL;
            Description = MyTextsWrapperEnum.RESEARCH_VESSEL_Description;
            Flags       = MyMissionFlags.Story;

            MyMwcVector3Int baseSector = new MyMwcVector3Int(4189723, 0, -2201402);

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

            RequiredMissions           = new MyMissionID[] { MyMissionID.RIME_CONVINCE };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_TAKE_FOURTH };
            RequiredActors             = new MyActorEnum[] { MyActorEnum.MARCUS, MyActorEnum.MADELYN, MyActorEnum.TARJA, MyActorEnum.VALENTIN };


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

            var introDialogue = new MyObjectiveDialog(
                MyMissionID.RESEARCH_VESSEL_INTRO,
                null,
                this,
                new MyMissionID[] { },
                MyDialogueEnum.RESEARCH_VESSEL_0100_INTRO
                )
            {
                SaveOnSuccess = true
            };
            m_objectives.Add(introDialogue);


            var reachShip = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_REACH_SHIP,
                MyMissionID.RESEARCH_VESSEL_REACH_SHIP,
                MyTextsWrapperEnum.RESEARCH_VESSEL_REACH_SHIP_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_INTRO },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyReachShip)
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudEurydice
            };
            reachShip.OnMissionSuccess += new MissionHandler(ReachShip_Success);
            m_objectives.Add(reachShip);


            var checkCargo = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_CARGO,
                MyMissionID.RESEARCH_VESSEL_CHECK_CARGO,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_CARGO_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_REACH_SHIP },
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_1)
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudContainer
            };
            m_objectives.Add(checkCargo);


            var checkCommandRoom = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_COMMAND_ROOM,
                MyMissionID.RESEARCH_VESSEL_CHECK_COMMAND_ROOM,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_COMMAND_ROOM_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_CARGO },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyNearHub1)
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudCommandRoom
            };
            checkCommandRoom.OnMissionLoaded += new MissionHandler(checkCommandRoom_OnMissionLoaded);
            m_objectives.Add(checkCommandRoom);


            var unlockFirstCargo = new MyObjectiveEnablePrefabs(
                MyTextsWrapperEnum.RESEARCH_VESSEL_USE_HUB_1,
                MyMissionID.RESEARCH_VESSEL_USE_HUB_1,
                MyTextsWrapperEnum.RESEARCH_VESSEL_USE_HUB_1_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_COMMAND_ROOM },
                null,
                new List <uint> {
                (uint)EntityID.Hub1
            },
                new List <uint> {
                (uint)EntityID.Door1
            }
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudHub
            };
            m_objectives.Add(unlockFirstCargo);


            var checkLaboratory = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_LABORATORY,
                MyMissionID.RESEARCH_VESSEL_CHECK_LABORATORY,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_LABORATORY_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_USE_HUB_1 },
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_14)
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudLab
            };
            m_objectives.Add(checkLaboratory);


            var takeFirstParts = new MyUseObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_FIRST,
                MyMissionID.RESEARCH_VESSEL_TAKE_FIRST,
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_FIRST_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_LABORATORY },
                new MyMissionLocation(baseSector, (uint)EntityID.Cargo3),
                MyTextsWrapperEnum.PressToTakeComponent,
                MyTextsWrapperEnum.Component,
                MyTextsWrapperEnum.TakingInProgress,
                1000,
                MyUseObjectiveType.Activating,
                radiusOverride: 50
                )
            {
                SaveOnSuccess = true
            };
            takeFirstParts.OnMissionSuccess += TakeFirstParts_Success;
            m_objectives.Add(takeFirstParts);


            var checkWarehouse = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_WAREHOUSE,
                MyMissionID.RESEARCH_VESSEL_CHECK_WAREHOUSE,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_WAREHOUSE_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_TAKE_FIRST },
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_4)
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudWarehouse
            };
            m_objectives.Add(checkWarehouse);


            var checkDrillMachineRoom = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_DRILL_ROOM,
                MyMissionID.RESEARCH_VESSEL_CHECK_DRILL_ROOM,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_DRILL_ROOM_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_WAREHOUSE },
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_5)
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudDrillRoom
            };
            checkDrillMachineRoom.OnMissionSuccess += new MissionHandler(checkDrillMachineRoom_OnMissionSuccess);
            m_objectives.Add(checkDrillMachineRoom);


            var checkFirstHangar = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_FIRST_HANGAR,
                MyMissionID.RESEARCH_VESSEL_CHECK_FIRST_HANGAR,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_FIRST_HANGAR_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_DRILL_ROOM },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyNearHub2)
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudHangar
            };
            m_objectives.Add(checkFirstHangar);


            var takeSecondParts = new MyUseObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_SECOND,
                MyMissionID.RESEARCH_VESSEL_TAKE_SECOND,
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_SECOND_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_FIRST_HANGAR },
                new MyMissionLocation(baseSector, (uint)EntityID.Cargo4),
                MyTextsWrapperEnum.PressToTakeComponent,
                MyTextsWrapperEnum.Component,
                MyTextsWrapperEnum.TakingInProgress,
                1000,
                MyUseObjectiveType.Activating,
                radiusOverride: 50
                )
            {
                SaveOnSuccess = true
            };
            takeSecondParts.OnMissionSuccess += TakeSecondParts_Success;
            m_objectives.Add(takeSecondParts);


            var useHub2 = new MyObjectiveEnablePrefabs(
                MyTextsWrapperEnum.RESEARCH_VESSEL_USE_HUB_2,
                MyMissionID.RESEARCH_VESSEL_USE_HUB_2,
                MyTextsWrapperEnum.RESEARCH_VESSEL_USE_HUB_2_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_TAKE_SECOND },
                null,
                new List <uint> {
                (uint)EntityID.Hub2
            },
                new List <uint> {
                (uint)EntityID.Door2
            }
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudHub
            };
            m_objectives.Add(useHub2);


            var checkSecondHangar = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_SECOND_HANGAR,
                MyMissionID.RESEARCH_VESSEL_CHECK_SECOND_HANGAR,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_SECOND_HANGAR_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_USE_HUB_2 },
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_7)
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudHangar
            };
            m_objectives.Add(checkSecondHangar);


            var checkThirdHangar = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_THIRD_HANGAR,
                MyMissionID.RESEARCH_VESSEL_CHECK_THIRD_HANGAR,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_THIRD_HANGAR_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_SECOND_HANGAR },
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_8)
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudHangar
            };
            m_objectives.Add(checkThirdHangar);


            var checkSecondWarehouse = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_SECOND_WAREHOUSE,
                MyMissionID.RESEARCH_VESSEL_CHECK_SECOND_WAREHOUSE,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_SECOND_WAREHOUSE_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_THIRD_HANGAR },
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_9)
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudWarehouse
            };
            m_objectives.Add(checkSecondWarehouse);


            var checkGenerator = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_GENERATOR,
                MyMissionID.RESEARCH_VESSEL_CHECK_GENERATOR,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_GENERATOR_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_SECOND_WAREHOUSE },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyNearHub3)
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudGeneratorRoom
            };
            m_objectives.Add(checkGenerator);


            var useHub3 = new MyObjectiveEnablePrefabs(
                MyTextsWrapperEnum.RESEARCH_VESSEL_USE_HUB_3,
                MyMissionID.RESEARCH_VESSEL_USE_HUB_3,
                MyTextsWrapperEnum.RESEARCH_VESSEL_USE_HUB_3_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_GENERATOR },
                null,
                new List <uint> {
                (uint)EntityID.Hub3
            },
                new List <uint> {
                (uint)EntityID.Door3
            }
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudHub
            };
            useHub3.OnMissionSuccess += new MissionHandler(UseHub3_Success);
            m_objectives.Add(useHub3);

            var takeThridProbe = new MyUseObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_THIRD,
                MyMissionID.RESEARCH_VESSEL_TAKE_THIRD,
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_THIRD_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_USE_HUB_3 },
                new MyMissionLocation(baseSector, (uint)EntityID.Cargo2),
                MyTextsWrapperEnum.PressToTakeComponent,
                MyTextsWrapperEnum.Component,
                MyTextsWrapperEnum.TakingInProgress,
                1000,
                MyUseObjectiveType.Activating,
                radiusOverride: 50
                )
            {
                SaveOnSuccess = true
            };
            takeThridProbe.OnMissionSuccess += TakeThirdParts_Success;
            m_objectives.Add(takeThridProbe);

            var takeThridProbeDialogue = new MyObjectiveDialog(
                MyTextsWrapperEnum.Null,
                MyMissionID.RESEARCH_VESSEL_TAKE_THIRD_DIALOGUE,
                MyTextsWrapperEnum.Null,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_TAKE_THIRD },
                MyDialogueEnum.RESEARCH_VESSEL_0700_THIRDPARTS);
            m_objectives.Add(takeThridProbeDialogue);

            var checkCargoAgain = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_CARGO_AGAIN,
                MyMissionID.RESEARCH_VESSEL_CHECK_CARGO_AGAIN,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_CARGO_AGAIN_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_TAKE_THIRD_DIALOGUE },
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_1)
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudContainer
            };
            checkCargoAgain.OnMissionSuccess += new MissionHandler(CheckCargoAgain_Success);
            m_objectives.Add(checkCargoAgain);

            var takeFourthParts = new MyUseObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_FOURTH,
                MyMissionID.RESEARCH_VESSEL_TAKE_FOURTH,
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_FOURTH_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_CARGO_AGAIN },
                new MyMissionLocation(baseSector, (uint)EntityID.Cargo1),
                MyTextsWrapperEnum.PressToTakeComponent,
                MyTextsWrapperEnum.Component,
                MyTextsWrapperEnum.TakingInProgress,
                1000,
                MyUseObjectiveType.Activating,
                radiusOverride: 50
                )
            {
                SaveOnSuccess = false
            };
            takeFourthParts.OnMissionSuccess += TakeFourthParts_Success;
            m_objectives.Add(takeFourthParts);


            #endregion
        }
        public MyRussianTransmitterMission()
        {
            ID          = MyMissionID.RUSSIAN_TRANSMITTER; /* ID must be added to MyMissions.cs */
            DebugName   = new StringBuilder("17-RUF transmitter");
            Name        = MyTextsWrapperEnum.RUSSIAN_TRANSMITTER;
            Description = MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_Description;
            Flags       = MyMissionFlags.Story;

            MyMwcVector3Int baseSector = new MyMwcVector3Int(-4988032, 0, -865747);             // 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.CHINESE_TRANSMITTER }; // IDs of missions required to make this mission available
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_BACK_TO_MADELYN };
            RequiredActors             = new MyActorEnum[] { MyActorEnum.MADELYN, MyActorEnum.TARJA, MyActorEnum.VALENTIN };

            #region Objectives

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

            var introDialogue = new MyObjectiveDialog(
                MyMissionID.RUSSIAN_TRANSMITTER_INTRO_DIALOGUE,
                null,
                this,
                new MyMissionID[] { },
                MyDialogueEnum.RUSSIAN_TRANSMITTER_0100_INTRO);
            m_objectives.Add(introDialogue);

            // START OF REACH OBJECTIVE SUBMISSION DEFINITION
            var reachSideEntrance = new MyObjective(                                    // 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.RUSSIAN_TRANSMITTER_REACH_SIDE_ENTRANCE,             // Name of the submission
                MyMissionID.RUSSIAN_TRANSMITTER_REACH_SIDE_ENTRANCE,                    // ID of the submission - must be added to MyMissions.cs
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_REACH_SIDE_ENTRANCE_Description, // Description of the submission
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_INTRO_DIALOGUE }, // ID of submissions required to make this submission available - it is clear so this submission is the starting submission
                new MyMissionLocation(baseSector, (uint)EntityID.OutpostSideEntrance) // ID of dummy point of checkpoint
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudEntrance
            };                                   // False means do not save game in that checkpoint
            m_objectives.Add(reachSideEntrance); // Adding this submission to the list of submissions of current mission
            // END OF REACH OBJECTIVE SUBMISSION DEFINITION


            var enterTheBase = new MyObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_ENTER_THE_BASE,
                MyMissionID.RUSSIAN_TRANSMITTER_ENTER_THE_BASE,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_ENTER_THE_BASE_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_REACH_SIDE_ENTRANCE },
                new MyMissionLocation(baseSector, (uint)EntityID.EnterTheBase)
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudEntrance
            };
            enterTheBase.OnMissionLoaded  += new MissionHandler(enterTheBase_OnMissionLoaded);
            enterTheBase.OnMissionSuccess += new MissionHandler(enterTheBase_OnMissionSuccess);
            m_objectives.Add(enterTheBase);


            var findFrequency = new MyUseObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_FIND_FREQUENCY,
                MyMissionID.RUSSIAN_TRANSMITTER_FIND_FREQUENCY,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_FIND_FREQUENCY_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_ENTER_THE_BASE },
                new MyMissionLocation(baseSector, (uint)EntityID.SabotageTurrets_1),
                MyTextsWrapperEnum.PressToDownloadData,
                MyTextsWrapperEnum.SecurityControlHUB,
                MyTextsWrapperEnum.DownloadingData,
                10000,
                MyUseObjectiveType.Hacking
                )
            {
                SaveOnSuccess = false
            };
            findFrequency.OnMissionLoaded  += new MissionHandler(findFrequency_OnMissionLoaded);
            findFrequency.OnMissionSuccess += FindFrequency_Success;
            m_objectives.Add(findFrequency);

            m_strangerContact = new MyObjectiveDialog(
                MyTextsWrapperEnum.Null,
                MyMissionID.RUSSIAN_TRANSMITTER_STRANGER_CONTACT,
                MyTextsWrapperEnum.Null,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_FIND_FREQUENCY },
                MyDialogueEnum.RUSSIAN_TRANSMITTER_0500_0600_HACKPROBLEM_STRANGERCALLS
                );
            m_objectives.Add(m_strangerContact);

            var meetStranger = new MyObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_MEET_STRANGER,
                MyMissionID.RUSSIAN_TRANSMITTER_MEET_STRANGER,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_MEET_STRANGER_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_STRANGER_CONTACT },
                new MyMissionLocation(baseSector, (uint)EntityID.ShipVolodia),
                radiusOverride: 90f
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudStranger
            };
            meetStranger.OnMissionLoaded  += MeetStranger_Loaded;
            meetStranger.OnMissionSuccess += MeetStranger_Success;
            m_objectives.Add(meetStranger);



            var reachWarehouse = new MyObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_REACH_WAREHOUSE,
                MyMissionID.RUSSIAN_TRANSMITTER_REACH_WAREHOUSE,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_REACH_WAREHOUSE_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_MEET_STRANGER },
                new MyMissionLocation(baseSector, (uint)EntityID.ReachWarehouse)
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudWarehouse
            };
            reachWarehouse.OnMissionLoaded += new MissionHandler(ReachWarehouse_Loaded);
            m_objectives.Add(reachWarehouse);


            var stealMilitarySupply = new MyUseObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_STEAL_MILITARY_SUPPLY,
                MyMissionID.RUSSIAN_TRANSMITTER_STEAL_MILITARY_SUPPLY,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_STEAL_MILITARY_SUPPLY_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_REACH_WAREHOUSE },
                new MyMissionLocation(baseSector, (uint)EntityID.StealMilitarySupply),
                MyTextsWrapperEnum.PressToTakeCargo,
                MyTextsWrapperEnum.CargoBox,
                MyTextsWrapperEnum.TakingInProgress,
                1000,
                MyUseObjectiveType.Activating
                )
            {
                SaveOnSuccess = false
            };
            stealMilitarySupply.OnMissionSuccess += new MissionHandler(StealMilitarySupply_Success);
            m_objectives.Add(stealMilitarySupply);


            m_tradeWithVolodia = new MyObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_TRADE_WITH_VOLODIA,
                MyMissionID.RUSSIAN_TRANSMITTER_TRADE_WITH_VOLODIA,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_TRADE_WITH_VOLODIA_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_STEAL_MILITARY_SUPPLY },
                new MyMissionLocation(baseSector, (uint)EntityID.ShipVolodia),
                radiusOverride: 90
                )
            {
                SaveOnSuccess = true, SuccessDialogId = MyDialogueEnum.RUSSIAN_TRANSMITTER_1000_VOLODIA_FOUND, HudName = MyTextsWrapperEnum.Volodia
            };
            m_tradeWithVolodia.OnMissionSuccess += TradeWithVolodia_Success;
            m_objectives.Add(m_tradeWithVolodia);


            m_fightRussianCommando = new MyObjectiveDestroy(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_FIGHT_RUSSIAN_COMMANDO,
                MyMissionID.RUSSIAN_TRANSMITTER_FIGHT_RUSSIAN_COMMANDO,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_FIGHT_RUSSIAN_COMMANDO_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_TRADE_WITH_VOLODIA },
                //new List<uint> { (uint)EntityID.MothershipEntity },
                new List <uint> {
            },
                new List <uint> {
                (uint)EntityID.CommandoSpawnPoint
            },
                false
                )
            {
                SaveOnSuccess = false, SuccessDialogId = MyDialogueEnum.RUSSIAN_TRANSMITTER_1400_RETREAT, HudName = MyTextsWrapperEnum.Nothing
            };
            m_fightRussianCommando.OnMissionLoaded  += RussianCommandoLoaded;
            m_fightRussianCommando.OnMissionSuccess += new MissionHandler(FightRussianCommando_Success);
            m_objectives.Add(m_fightRussianCommando);


            var backToTransmitter = new MyObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_BACK_TO_TRANSMITTER,
                MyMissionID.RUSSIAN_TRANSMITTER_BACK_TO_TRANSMITTER,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_BACK_TO_TRANSMITTER_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_FIGHT_RUSSIAN_COMMANDO },    // prerekvizita - OPRAVIT na survive!!!
                new MyMissionLocation(baseSector, (uint)EntityID.BackToTransmitter)
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudTransmitter
            };
            backToTransmitter.OnMissionLoaded += new MissionHandler(BackToTransmitter_Loaded);
            m_objectives.Add(backToTransmitter);


            var decryptFrequency = new MyUseObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_DECRYPT_FREQUENCY,
                MyMissionID.RUSSIAN_TRANSMITTER_DECRYPT_FREQUENCY,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_DECRYPT_FREQUENCY_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_BACK_TO_TRANSMITTER },
                new MyMissionLocation(baseSector, (uint)EntityID.SabotageTurrets_1),
                MyTextsWrapperEnum.PressToHack,
                MyTextsWrapperEnum.SecurityControlHUB,
                MyTextsWrapperEnum.HackingProgress,
                5000,
                MyUseObjectiveType.Hacking
                )
            {
                SaveOnSuccess = false, SuccessDialogId = MyDialogueEnum.RUSSIAN_TRANSMITTER_1600_ITSWORKING
            };
            m_objectives.Add(decryptFrequency);


            var uploadData = new MyUseObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_UPLOAD_DATA,
                MyMissionID.RUSSIAN_TRANSMITTER_UPLOAD_DATA,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_UPLOAD_DATA_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_DECRYPT_FREQUENCY },
                new MyMissionLocation(baseSector, (uint)EntityID.SabotageTurrets_3),
                MyTextsWrapperEnum.PressToHack,
                MyTextsWrapperEnum.SecurityControlHUB,
                MyTextsWrapperEnum.HackingProgress,
                5000
                )
            {
                SaveOnSuccess = false, SuccessDialogId = MyDialogueEnum.RUSSIAN_TRANSMITTER_1700_UPLOADINGSIGNAL
            };
            m_objectives.Add(uploadData);


            var findMainRoomEntrance = new MyObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_FIND_MAIN_ROOM_ENTRANCE,
                MyMissionID.RUSSIAN_TRANSMITTER_FIND_MAIN_ROOM_ENTRANCE,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_FIND_MAIN_ROOM_ENTRANCE_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_UPLOAD_DATA },
                new MyMissionLocation(baseSector, (uint)EntityID.FindMainRoomEntrance)
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudEntrance
            };
            findMainRoomEntrance.OnMissionLoaded += new MissionHandler(findMainRoomEntrance_Loaded);
            m_objectives.Add(findMainRoomEntrance);


            var placeDeviceOnTransmitter = new MyUseObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_PLACE_DEVICE_ON_TRANSMITTER,
                MyMissionID.RUSSIAN_TRANSMITTER_PLACE_DEVICE_ON_TRANSMITTER,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_PLACE_DEVICE_ON_TRANSMITTER_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_FIND_MAIN_ROOM_ENTRANCE },
                new MyMissionLocation(baseSector, (uint)EntityID.PlaceDeviceOnTransmitter),
                MyTextsWrapperEnum.PressToPlaceDevice,
                MyTextsWrapperEnum.Transmitter,
                MyTextsWrapperEnum.PlacementInProgress,
                10000,
                MyUseObjectiveType.Building
                )
            {
                SaveOnSuccess = false
            };
            placeDeviceOnTransmitter.OnMissionSuccess += new MissionHandler(PlaceDeviceOnTransmitter_Success);
            m_objectives.Add(placeDeviceOnTransmitter);


            var openDoors = new MyObjectiveEnablePrefabs(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_OPEN_DOORS,
                MyMissionID.RUSSIAN_TRANSMITTER_OPEN_DOORS,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_OPEN_DOORS_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_PLACE_DEVICE_ON_TRANSMITTER },
                null,
                new List <uint> {
                (uint)EntityID.Hub3
            },
                new List <uint> {
                (uint)EntityID.Door1, (uint)EntityID.Door2, (uint)EntityID.Door3, (uint)EntityID.Door4,
            }
                )
            {
                SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudHub
            };
            openDoors.OnMissionSuccess += new MissionHandler(OpenDoors_Success);
            m_objectives.Add(openDoors);


            var backToMadelyn = new MyObjective(
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_BACK_TO_MADELYN,
                MyMissionID.RUSSIAN_TRANSMITTER_BACK_TO_MADELYN,
                MyTextsWrapperEnum.RUSSIAN_TRANSMITTER_BACK_TO_MADELYN_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RUSSIAN_TRANSMITTER_OPEN_DOORS },
                new MyMissionLocation(baseSector, MyMissionLocation.MADELYN_HANGAR),
                radiusOverride: MyMissionLocation.MADELYN_HANGAR_RADIUS
                )
            {
                SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudMadelynsSapho
            };
            backToMadelyn.OnMissionSuccess += new MissionHandler(BackToMadelyn_Success);
            m_objectives.Add(backToMadelyn);

            #endregion
        }
        public MyResearchVesselMission()
        {
            ID = MyMissionID.RESEARCH_VESSEL;
            DebugName = new StringBuilder("12-Eurydice/Osaka");
            Name = MyTextsWrapperEnum.RESEARCH_VESSEL;
            Description = MyTextsWrapperEnum.RESEARCH_VESSEL_Description;
            Flags = MyMissionFlags.Story;

            MyMwcVector3Int baseSector = new MyMwcVector3Int(4189723, 0, -2201402);
            Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation);

            RequiredMissions = new MyMissionID[] { MyMissionID.RIME_CONVINCE };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_TAKE_FOURTH };
            RequiredActors = new MyActorEnum[] { MyActorEnum.MARCUS, MyActorEnum.MADELYN, MyActorEnum.TARJA, MyActorEnum.VALENTIN };


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

            var introDialogue = new MyObjectiveDialog(
                MyMissionID.RESEARCH_VESSEL_INTRO,
                null,
                this,
                new MyMissionID[] { },
                MyDialogueEnum.RESEARCH_VESSEL_0100_INTRO
            ) { SaveOnSuccess = true };
            m_objectives.Add(introDialogue);


            var reachShip = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_REACH_SHIP,
                MyMissionID.RESEARCH_VESSEL_REACH_SHIP,
                MyTextsWrapperEnum.RESEARCH_VESSEL_REACH_SHIP_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_INTRO },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyReachShip)
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudEurydice };
            reachShip.OnMissionSuccess += new MissionHandler(ReachShip_Success);
            m_objectives.Add(reachShip);

    
            var checkCargo = new MyObjective( 
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_CARGO,
                MyMissionID.RESEARCH_VESSEL_CHECK_CARGO,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_CARGO_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_REACH_SHIP },
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_1)
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudContainer };
            m_objectives.Add(checkCargo);


            var checkCommandRoom = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_COMMAND_ROOM,
                MyMissionID.RESEARCH_VESSEL_CHECK_COMMAND_ROOM,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_COMMAND_ROOM_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_CARGO },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyNearHub1)
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudCommandRoom };
            checkCommandRoom.OnMissionLoaded += new MissionHandler(checkCommandRoom_OnMissionLoaded);
            m_objectives.Add(checkCommandRoom);


            var unlockFirstCargo = new MyObjectiveEnablePrefabs(
                MyTextsWrapperEnum.RESEARCH_VESSEL_USE_HUB_1,
                MyMissionID.RESEARCH_VESSEL_USE_HUB_1,
                MyTextsWrapperEnum.RESEARCH_VESSEL_USE_HUB_1_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_COMMAND_ROOM },
                null,
                new List<uint> { (uint)EntityID.Hub1 },
                new List<uint> { (uint)EntityID.Door1 }
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudHub };
            m_objectives.Add(unlockFirstCargo);


            var checkLaboratory = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_LABORATORY,
                MyMissionID.RESEARCH_VESSEL_CHECK_LABORATORY,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_LABORATORY_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_USE_HUB_1 },
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_14)
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudLab };
            m_objectives.Add(checkLaboratory);


            var takeFirstParts = new MyUseObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_FIRST,
                MyMissionID.RESEARCH_VESSEL_TAKE_FIRST,
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_FIRST_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_LABORATORY },
                new MyMissionLocation(baseSector, (uint)EntityID.Cargo3),
                MyTextsWrapperEnum.PressToTakeComponent,
                MyTextsWrapperEnum.Component,
                MyTextsWrapperEnum.TakingInProgress,
                1000,
                MyUseObjectiveType.Activating,
                radiusOverride: 50
            ) { SaveOnSuccess = true };
            takeFirstParts.OnMissionSuccess += TakeFirstParts_Success;
            m_objectives.Add(takeFirstParts);


            var checkWarehouse = new MyObjective( 
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_WAREHOUSE,
                MyMissionID.RESEARCH_VESSEL_CHECK_WAREHOUSE,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_WAREHOUSE_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_TAKE_FIRST }, 
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_4)
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudWarehouse };
            m_objectives.Add(checkWarehouse); 


            var checkDrillMachineRoom = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_DRILL_ROOM,
                MyMissionID.RESEARCH_VESSEL_CHECK_DRILL_ROOM, 
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_DRILL_ROOM_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_WAREHOUSE }, 
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_5)
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudDrillRoom };
            checkDrillMachineRoom.OnMissionSuccess += new MissionHandler(checkDrillMachineRoom_OnMissionSuccess);
            m_objectives.Add(checkDrillMachineRoom); 


            var checkFirstHangar = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_FIRST_HANGAR,
                MyMissionID.RESEARCH_VESSEL_CHECK_FIRST_HANGAR,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_FIRST_HANGAR_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_DRILL_ROOM },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyNearHub2)
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudHangar };
            m_objectives.Add(checkFirstHangar);


            var takeSecondParts = new MyUseObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_SECOND,
                MyMissionID.RESEARCH_VESSEL_TAKE_SECOND,
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_SECOND_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_FIRST_HANGAR },
                new MyMissionLocation(baseSector, (uint)EntityID.Cargo4),
                MyTextsWrapperEnum.PressToTakeComponent,
                MyTextsWrapperEnum.Component,
                MyTextsWrapperEnum.TakingInProgress,
                1000,
                MyUseObjectiveType.Activating,
                radiusOverride: 50
            ) { SaveOnSuccess = true };
            takeSecondParts.OnMissionSuccess += TakeSecondParts_Success;
            m_objectives.Add(takeSecondParts);


            var useHub2 = new MyObjectiveEnablePrefabs(
               MyTextsWrapperEnum.RESEARCH_VESSEL_USE_HUB_2,
               MyMissionID.RESEARCH_VESSEL_USE_HUB_2,
               MyTextsWrapperEnum.RESEARCH_VESSEL_USE_HUB_2_Description,
               null,
               this,
               new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_TAKE_SECOND },
                null,
                new List<uint> { (uint)EntityID.Hub2 },
                new List<uint> { (uint)EntityID.Door2 }
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudHub };
            m_objectives.Add(useHub2);


            var checkSecondHangar = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_SECOND_HANGAR,
                MyMissionID.RESEARCH_VESSEL_CHECK_SECOND_HANGAR, 
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_SECOND_HANGAR_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_USE_HUB_2 },
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_7)
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudHangar };
            m_objectives.Add(checkSecondHangar);


            var checkThirdHangar = new MyObjective( 
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_THIRD_HANGAR,
                MyMissionID.RESEARCH_VESSEL_CHECK_THIRD_HANGAR,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_THIRD_HANGAR_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_SECOND_HANGAR },
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_8)
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudHangar };
            m_objectives.Add(checkThirdHangar);
          

            var checkSecondWarehouse = new MyObjective( 
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_SECOND_WAREHOUSE,
                MyMissionID.RESEARCH_VESSEL_CHECK_SECOND_WAREHOUSE,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_SECOND_WAREHOUSE_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_THIRD_HANGAR },
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_9)
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudWarehouse };
            m_objectives.Add(checkSecondWarehouse);
            

            var checkGenerator = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_GENERATOR,
                MyMissionID.RESEARCH_VESSEL_CHECK_GENERATOR,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_GENERATOR_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_SECOND_WAREHOUSE },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyNearHub3)
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudGeneratorRoom };
            m_objectives.Add(checkGenerator);


            var useHub3 = new MyObjectiveEnablePrefabs(
                MyTextsWrapperEnum.RESEARCH_VESSEL_USE_HUB_3,
                MyMissionID.RESEARCH_VESSEL_USE_HUB_3,
                MyTextsWrapperEnum.RESEARCH_VESSEL_USE_HUB_3_Description,
               null,
               this,
               new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_GENERATOR },
                null,
                new List<uint> { (uint)EntityID.Hub3 },
                new List<uint> { (uint)EntityID.Door3 }
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudHub };
            useHub3.OnMissionSuccess += new MissionHandler(UseHub3_Success);
            m_objectives.Add(useHub3);

            var takeThridProbe = new MyUseObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_THIRD,
                MyMissionID.RESEARCH_VESSEL_TAKE_THIRD,
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_THIRD_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_USE_HUB_3 },
                new MyMissionLocation(baseSector, (uint)EntityID.Cargo2),
                MyTextsWrapperEnum.PressToTakeComponent,
                MyTextsWrapperEnum.Component,
                MyTextsWrapperEnum.TakingInProgress,
                1000,
                MyUseObjectiveType.Activating,
                radiusOverride: 50
                ) { SaveOnSuccess = true };
            takeThridProbe.OnMissionSuccess += TakeThirdParts_Success;
            m_objectives.Add(takeThridProbe);

            var takeThridProbeDialogue = new MyObjectiveDialog(
                MyTextsWrapperEnum.Null,
                MyMissionID.RESEARCH_VESSEL_TAKE_THIRD_DIALOGUE,
                MyTextsWrapperEnum.Null,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_TAKE_THIRD },
                MyDialogueEnum.RESEARCH_VESSEL_0700_THIRDPARTS);
            m_objectives.Add(takeThridProbeDialogue);

            var checkCargoAgain = new MyObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_CARGO_AGAIN,
                MyMissionID.RESEARCH_VESSEL_CHECK_CARGO_AGAIN,
                MyTextsWrapperEnum.RESEARCH_VESSEL_CHECK_CARGO_AGAIN_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_TAKE_THIRD_DIALOGUE },
                new MyMissionLocation(baseSector, (uint)EntityID.checkpoint_1)
            ) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudContainer };
            checkCargoAgain.OnMissionSuccess += new MissionHandler(CheckCargoAgain_Success);
            m_objectives.Add(checkCargoAgain);
        
            var takeFourthParts = new MyUseObjective(
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_FOURTH,
                MyMissionID.RESEARCH_VESSEL_TAKE_FOURTH,
                MyTextsWrapperEnum.RESEARCH_VESSEL_TAKE_FOURTH_Description,
                null,
                this,
                new MyMissionID[] { MyMissionID.RESEARCH_VESSEL_CHECK_CARGO_AGAIN },
                new MyMissionLocation(baseSector, (uint)EntityID.Cargo1),
                MyTextsWrapperEnum.PressToTakeComponent,
                MyTextsWrapperEnum.Component,
                MyTextsWrapperEnum.TakingInProgress,
                 1000,
                 MyUseObjectiveType.Activating, 
                 radiusOverride: 50
                ) { SaveOnSuccess = false };
            takeFourthParts.OnMissionSuccess += TakeFourthParts_Success;
            m_objectives.Add(takeFourthParts);


            #endregion
        }
Beispiel #10
0
        public MyEACTransmitterMission()
        {
            ID          = MyMissionID.EAC_TRANSMITTER;
            DebugName   = new StringBuilder("21-EAC transmitter");
            Name        = MyTextsWrapperEnum.EAC_TRANSMITTER;
            Description = MyTextsWrapperEnum.EAC_TRANSMITTER_Description; // "Set all 3 satellites to your needs.\n"
            Flags       = MyMissionFlags.Story;

            MyMwcVector3Int baseSector = new MyMwcVector3Int(3818505, 0, -4273800);

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



            RequiredMissions           = new MyMissionID[] { MyMissionID.EAC_PRISON };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_MEETMS };
            RequiredActors             = new MyActorEnum[] { MyActorEnum.MARCUS, MyActorEnum.MADELYN, MyActorEnum.TARJA, MyActorEnum.VALENTIN };

            m_objectives = new List <MyObjective>();

            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeEnteringCargoWithRavens, 0, (uint)EntityID.SpawnpointAtInnerCargo));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeEnteringCargoWithRavens, 0, (uint)EntityID.SpawnpointAtOuterControlRoom1));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeEnteringControlRoomFromOutside, 0, (uint)EntityID.SpawnpointAtControlRoom1));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeEnteringControlRoomFromOutside, 0, (uint)EntityID.SpawnpointAtControlRoom2));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeEnteringSatelitteA, 0, (uint)EntityID.SpawnpointAtSatelitteA));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorWhenEscapingSatAThruDestroyedPanel, 0, (uint)EntityID.SpawnpointAtOuterSatelitteA));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorWhenEscapingSatAThruDestroyedPanel, 0, (uint)EntityID.SpawnpointAtControlRoom3));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorWhenEscapingSatAThruDestroyedPanel, 0, (uint)EntityID.SpawnpointAtControlRoom4));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeAgregat1, 0, (uint)EntityID.SpawnpointAtAgregat1));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeAgregat2, 0, (uint)EntityID.SpawnpointAtAgregat2));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeAgregat3, 0, (uint)EntityID.SpawnpointAtAgregat3));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeHackingSatelitteBandC, 0, (uint)EntityID.SpawnpointAtSatelitteB));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeHackingSatelitteBandC, 0, (uint)EntityID.SpawnpointAtSatelitteC));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeStartingTransmission, 0, (uint)EntityID.SpawnpointAtControlRoom5));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeStartingTransmission, 0, (uint)EntityID.SpawnpointAtControlRoom6));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeOpeningDoorToArm, 0, (uint)EntityID.SpawnpointAtArmEntrance));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeEnteringCargoThruArm, 0, (uint)EntityID.SpawnpointAtCargoInnerEntrance));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeFixingGenerator, 0, (uint)EntityID.SpawnpointAtGenerator));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeTurnBackOnSolars, 0, (uint)EntityID.SpawnpointAtSolarStarting));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeTurnBackOnSolars, 0, (uint)EntityID.SpawnpointAtControlRoom7));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeTurnBackOnSolars, 0, (uint)EntityID.SpawnpointAtControlRoom8));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeTurnBackOnSolars, 0, (uint)EntityID.SpawnpointAtOuterControlRoom2));

            var openCargoDoor = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_OPEN_CARGO_DOOR),
                MyMissionID.EAC_TRANSMITTER_OPEN_CARGO,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_OPEN_CARGO_DOOR_Description),
                null,
                this,
                new MyMissionID[] { },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyCargoBomb),
                MyTextsWrapperEnum.PressToPlaceBomb,
                MyTextsWrapperEnum.Blank,
                MyTextsWrapperEnum.PlacingBomb,
                1000,
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_0100
                )
            {
                SaveOnSuccess = true
            };

            m_objectives.Add(openCargoDoor);
            openCargoDoor.OnMissionLoaded  += new MissionHandler(openCargoDoor_OnMissionLoaded);
            openCargoDoor.OnMissionSuccess += new MissionHandler(openCargoDoor_OnMissionSuccess);


            var enterControlRoom = new MyObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_CENTRAL_ROOM),
                MyMissionID.EAC_TRANSMITTER_CENTRAL_ROOM,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_CENTRAL_ROOM_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_OPEN_CARGO },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyControlRoom),
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_0200
                )
            {
                HudName       = MyTextsWrapperEnum.HudControlRoom,
                SaveOnSuccess = true
            };

            enterControlRoom.OnMissionLoaded  += new MissionHandler(enterControlRoom_OnMissionLoaded);
            enterControlRoom.OnMissionSuccess += new MissionHandler(enterControlRoom_OnMissionSuccess);
            m_objectives.Add(enterControlRoom);


            var unlockWayToSatelliteA = new MyObjectiveEnablePrefabs(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITES),
                MyMissionID.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITE_A,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITES_Descrption),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_CENTRAL_ROOM },
                null,
                new List <uint> {
                (int)EntityID.HubA
            },
                new List <uint> {
                (int)EntityID.DoorHubA
            }
                )
            {
                HudName       = MyTextsWrapperEnum.HudHub,
                SaveOnSuccess = true
            };

            m_objectives.Add(unlockWayToSatelliteA);

            var unlockWayToSatelliteB = new MyObjectiveEnablePrefabs(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITES),
                MyMissionID.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITE_B,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITES_Descrption),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITE_A },
                null,
                new List <uint> {
                (int)EntityID.HubB
            },
                new List <uint> {
                (int)EntityID.DoorHubB1, (int)EntityID.DoorHubB2, (int)EntityID.DoorHubB3, (int)EntityID.DoorHubB4
            }
                )
            {
                HudName       = MyTextsWrapperEnum.HudHub,
                SaveOnSuccess = true
            };

            m_objectives.Add(unlockWayToSatelliteB);

            var unlockWayToSatelliteC = new MyObjectiveEnablePrefabs(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITES),
                MyMissionID.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITE_C,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITES_Descrption),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITE_B },
                null,
                new List <uint> {
                (int)EntityID.HubC
            },
                new List <uint> {
                (int)EntityID.DoorHubC1, (int)EntityID.DoorHubC2, (int)EntityID.DoorHubC3, (int)EntityID.DoorHubC4
            }
                )
            {
                HudName       = MyTextsWrapperEnum.HudHub,
                SaveOnSuccess = true
            };

            m_objectives.Add(unlockWayToSatelliteC);


            var hackSatelliteA = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_HACK_SATELLITE_A),
                MyMissionID.EAC_TRANSMITTER_HACK_SATELLITE_A,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_HACK_SATELLITE_A_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_UNLOCK_WAY_TO_SATELLITE_C },
                new MyMissionLocation(baseSector, (uint)EntityID.DummySatelliteA),
                MyTextsWrapperEnum.PressToHack,
                MyTextsWrapperEnum.HackingProgress,
                MyTextsWrapperEnum.Hacking,
                2000,
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_0300
                );

            m_objectives.Add(hackSatelliteA);


            var autodestructEscape = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_ESCAPE),
                MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_ESCAPE,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_ESCAPE_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_HACK_SATELLITE_A },
                new List <uint> {
                (uint)EntityID.PanelAutodestruct
            },
                startDialogID: MyDialogueEnum.EAC_TRANSMITTER_0400
                )
            {
                HudName = MyTextsWrapperEnum.HudPanel
            };

            autodestructEscape.OnMissionLoaded += new MissionHandler(autodestructEscape_OnMissionLoaded);
            m_objectives.Add(autodestructEscape);


            var autodestructHack = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HACK),
                MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HACK,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HACK_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_ESCAPE },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyAutodestructHack),
                MyTextsWrapperEnum.PressToHack,
                MyTextsWrapperEnum.Hacking,
                MyTextsWrapperEnum.HackingProgress,
                2000
                );

            m_objectives.Add(autodestructHack);

            //Escape by destroying panel upon your head
            var autodestructDestroy = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_DESTROY),
                MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_DESTROY,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_DESTROY_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HACK },
                new List <uint> {
                (uint)EntityID.PrefabAutodestruct1, (uint)EntityID.PrefabAutodestruct2
            },
                startDialogID: MyDialogueEnum.EAC_TRANSMITTER_0500
                )
            {
                SaveOnSuccess = true
            };

            autodestructDestroy.OnMissionLoaded  += new MissionHandler(autodestructDestroy_OnMissionLoaded);
            autodestructDestroy.OnMissionSuccess += new MissionHandler(autodestructDestroy_OnMissionSuccess);
            m_objectives.Add(autodestructDestroy);

            var autodestructHelp = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HELP),
                MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HELP,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HELP_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_DESTROY },
                null,
                new List <uint> {
                (uint)EntityID.SpawnAutodestruct
            },
                true,
                true,
                startDialogID: MyDialogueEnum.EAC_TRANSMITTER_0600,
                successDialogID: MyDialogueEnum.EAC_TRANSMITTER_0700
                )
            {
                SaveOnSuccess = true
            };

            autodestructHelp.OnMissionSuccess += new MissionHandler(autodestructHelp_OnMissionSuccess);
            m_objectives.Add(autodestructHelp);


            var hackSatelliteB = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_HACK_SATELLITE_B),
                MyMissionID.EAC_TRANSMITTER_HACK_SATELLITE_B,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_HACK_SATELLITE_B_Descrption),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_BLOCK_AUTODESTRUCT_HELP },
                new MyMissionLocation(baseSector, (uint)EntityID.DummySatelliteB),
                MyTextsWrapperEnum.PressToHack,
                MyTextsWrapperEnum.HackingProgress,
                MyTextsWrapperEnum.Hacking,
                2000
                )
            {
                SaveOnSuccess = true
            };

            m_objectives.Add(hackSatelliteB);


            var hackSatelliteC = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_HACK_SATELLITE_C),
                MyMissionID.EAC_TRANSMITTER_HACK_SATELLITE_C,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_HACK_SATELLITE_C_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_HACK_SATELLITE_B },
                new MyMissionLocation(baseSector, (uint)EntityID.DummySatelliteC),
                MyTextsWrapperEnum.PressToHack,
                MyTextsWrapperEnum.HackingProgress,
                MyTextsWrapperEnum.Hacking,
                2000,
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_0800
                )
            {
                SaveOnSuccess = true
            };

            m_objectives.Add(hackSatelliteC);

            var startTransmittion = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_START_TRANSMISSION),
                MyMissionID.EAC_TRANSMITTER_START_TRANSMISSION,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_START_TRANSMISSION_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_HACK_SATELLITE_C },
                new MyMissionLocation(baseSector, (uint)EntityID.DummySatelliteD),
                MyTextsWrapperEnum.PressToStartTransmission,
                MyTextsWrapperEnum.StartingTransmission,
                MyTextsWrapperEnum.Transmission,
                1000,
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_0900
                );

            m_objectives.Add(startTransmittion);

            var openSolarArm = new MyObjectiveEnablePrefabs(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_OPEN_SOLAR_ARM),
                MyMissionID.EAC_TRANSMITTER_OPEN_SOLAR_ARM,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_OPEN_SOLAR_ARM_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_START_TRANSMISSION },
                null,
                new List <uint> {
                (int)EntityID.HubSolarArm
            },
                new List <uint> {
                (int)EntityID.DoorSolarArm
            },
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_1000
                )
            {
                HudName       = MyTextsWrapperEnum.HudHub,
                SaveOnSuccess = true
            };

            openSolarArm.OnMissionLoaded += new MissionHandler(openSolarArm_OnMissionLoaded);
            m_objectives.Add(openSolarArm);



            var findRepairKit = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_FIND_REPAIR),
                MyMissionID.EAC_TRANSMITTER_FIND_REPAIR,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_FIND_REPAIR_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_OPEN_SOLAR_ARM },
                new MyMissionLocation(baseSector, (uint)EntityID.CargoRepair),
                MyTextsWrapperEnum.PressToTakeCargo,
                MyTextsWrapperEnum.TakeAll,
                MyTextsWrapperEnum.TakingInProgress,
                2000,
                radiusOverride: 50
                )
            {
                HudName       = MyTextsWrapperEnum.HudGeneratorRepairKit,
                SaveOnSuccess = true
            };

            findRepairKit.OnMissionLoaded  += new MissionHandler(findRepairKit_OnMissionLoaded);
            findRepairKit.OnMissionSuccess += new MissionHandler(findRepairKit_OnMissionSuccess);
            m_objectives.Add(findRepairKit);


            var fixGenerator = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_FIX_GENERATOR),
                MyMissionID.EAC_TRANSMITTER_FIX_GENERATOR,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_FIX_GENERATOR_Descrpition),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_FIND_REPAIR },
                new MyMissionLocation(baseSector, (uint)EntityID.DummyGeneratorFix),
                MyTextsWrapperEnum.PressToStartGenerator,
                MyTextsWrapperEnum.StartingProgress,
                MyTextsWrapperEnum.StartingProgress,
                2000,
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_1100
                )
            {
                SaveOnSuccess = true
            };

            fixGenerator.OnMissionSuccess += new MissionHandler(fixGenerator_OnMissionSuccess);
            m_objectives.Add(fixGenerator);

            var activateSolarpanels = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_ACTIVATE_SOLARPANELS),
                MyMissionID.EAC_TRANSMITTER_ACTIVATE_SOLARPANELS,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_ACTIVATE_SOLARPANELS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_FIX_GENERATOR },
                new MyMissionLocation(baseSector, (uint)EntityID.DummySolarCircuit),
                MyTextsWrapperEnum.PressToRedirectEnergy,
                MyTextsWrapperEnum.RedirectEnergy,
                MyTextsWrapperEnum.RedirectionInProgress,
                2000,
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_1200
                );

            m_objectives.Add(activateSolarpanels);

            var restartTransmition = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_RESTART_TRANSMISSION),
                MyMissionID.EAC_TRANSMITTER_RESTART_TRANSMISSION,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_RESTART_TRANSMISSION_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_ACTIVATE_SOLARPANELS },
                new MyMissionLocation(baseSector, (uint)EntityID.DummySatelliteD),
                MyTextsWrapperEnum.PressToStartTransmission,
                MyTextsWrapperEnum.StartingTransmission,
                MyTextsWrapperEnum.Transmission,
                2000,
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_1300
                )
            {
                SaveOnSuccess = true
            };

            m_objectives.Add(restartTransmition);


            var meetms = new MyObjective(
                (MyTextsWrapperEnum.EAC_TRANSMITTER_MEETMS),
                MyMissionID.EAC_TRANSMITTER_MEETMS,
                (MyTextsWrapperEnum.EAC_TRANSMITTER_MEETMS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_TRANSMITTER_RESTART_TRANSMISSION },
                new MyMissionLocation(baseSector, MyMissionLocation.MADELYN_HANGAR),
                startDialogId: MyDialogueEnum.EAC_TRANSMITTER_1400,
                radiusOverride: MyMissionLocation.MADELYN_HANGAR_RADIUS
                )
            {
                HudName = MyTextsWrapperEnum.HudMadelynsSapho
            };

            m_objectives.Add(meetms);
        }
        public MyEACPrisonMission()
        {
            ID = MyMissionID.EAC_PRISON; /* ID must be added to MyMissions.cs */
            DebugName = new StringBuilder("20-EAC prison");
            Name = MyTextsWrapperEnum.EAC_PRISON;
            Description = MyTextsWrapperEnum.EAC_PRISON_Description;
            Flags = MyMissionFlags.Story;
            AchievementName = MySteamAchievementNames.Mission29_EacPrison;

            MyMwcVector3Int baseSector = new MyMwcVector3Int(5480055, 0, -5077310);

            /* sector where the mission is located */
            Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation); //posledne cislo - ID dummy pointu kde prijimam misiu

            RequiredMissions = new MyMissionID[] { MyMissionID.TWIN_TOWERS };
            RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.EAC_PRISON_MEETINGPOINT };
            RequiredActors = new MyActorEnum[] { MyActorEnum.TARJA, MyActorEnum.VALENTIN, MyActorEnum.MADELYN, MyActorEnum.MARCUS };
            
            m_objectives = new List<MyObjective>();

            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeStorage, 0, (uint)EntityID.SpawnpointAtStorage));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeIndustry, 0, (uint)EntityID.SpawnpointAtIndustry1));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeIndustry, 0, (uint)EntityID.SpawnpointAtIndustry2));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeParking, 0, (uint)EntityID.SpawnpointAtParking));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeMines, 0, (uint)EntityID.SpawnpointAtMines));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeMinesEntrance, 0, (uint)EntityID.SpawnpointAtMinesEntrance));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeMarcusCell, 0, (uint)EntityID.SpawnpointAtMarcusCell));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeSecurityCheck7, 0, (uint)EntityID.SpawnpointAtSecurityCheck7));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeSecurityCheck6, 0, (uint)EntityID.SpawnpointAtSecurityCheck6));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeSecurityCheck8, 0, (uint)EntityID.SpawnpointAtSecurityCheck8));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeSecurityCheck4, 0, (uint)EntityID.SpawnpointAtSecurityCheck4));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeCellAfterSecurityCheck4, 0, (uint)EntityID.SpawnpointAtCellAfterSecurityCheck4));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeSecurityCheck5, 0, (uint)EntityID.SpawnpointAtSecurityCheck5));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeCell1AfterSecurityCheck5, 0, (uint)EntityID.SpawnpointAtCell1AfterSecurityCheck5));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeCell2AfterSecurityCheck5, 0, (uint)EntityID.SpawnpointAtCell2AfterSecurityCheck5));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeCell3AfterSecurityCheck5, 0, (uint)EntityID.SpawnpointAtCell3AfterSecurityCheck5));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeSecurityCheck3, 0, (uint)EntityID.SpawnpointAtSecurityCheck3));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeCell1AfterSecurityCheck3, 0, (uint)EntityID.SpawnpointAtCell1AfterSecurityCheck3));
            Components.Add(new MySpawnpointWaves((uint)EntityID.DetectorBeforeCell2AfterSecurityCheck3, 0, (uint)EntityID.SpawnpointAtCell2AfterSecurityCheck3));

            //Components.Add(new MySpawnpointWaves(detectorId, 3, new List<uint[]> { 
            //    new uint[] { spawnpointId1, spawnpointId2, spawnpointId3 },
            //    new uint[] { spawnpointId4, spawnpointId5 }}));
                        
            //01
            var mothershipBattle = new MyObjective(
                (MyTextsWrapperEnum.EAC_PRISON_THRUSWARM_Name),
                MyMissionID.EAC_PRISON_THRUSWARM,
                (MyTextsWrapperEnum.EAC_PRISON_THRUSWARM_Description),
                null,
                this,
                new MyMissionID[] {},
                new MyMissionLocation(baseSector, (uint)EntityID.MotherShiBattleLocationDummy)
                ) {SaveOnSuccess = true,StartDialogId = MyDialogueEnum.EAC_PRISON_0100, SuccessDialogId = MyDialogueEnum.EAC_PRISON_0200};
            m_objectives.Add(mothershipBattle);
            //mothershipBattle.Components.Add(new MySpawnpointWaves(77073, 0, 76625));
            mothershipBattle.OnMissionLoaded += mothershipBattle_OnMissionLoaded;

            //02
            
            var destroySolarDefence = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.EAC_PRISON_SOLARDEF_Name),
                MyMissionID.EAC_PRISON_SOLARDEF,
                (MyTextsWrapperEnum.EAC_PRISON_SOLARDEF_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_THRUSWARM },
                m_02toKill
            ) { SaveOnSuccess = true,StartDialogId = MyDialogueEnum.EAC_PRISON_0300};
            destroySolarDefence.OnMissionSuccess += DestroySolarDefenceOnOnMissionSuccess;
            m_objectives.Add(destroySolarDefence);
            destroySolarDefence.OnMissionLoaded += destroySolarDefence_OnMissionLoaded;

            //03
            m_destroySolarPanelsFirst = new MyObjective(
                (MyTextsWrapperEnum.EAC_PRISON_SOLAROFF1_Name),
                MyMissionID.EAC_PRISON_SOLAROFF1,
                (MyTextsWrapperEnum.EAC_PRISON_SOLAROFF1_Description),
                null,
                this,
                new MyMissionID[] {MyMissionID.EAC_PRISON_SOLARDEF},
                null
                ) {SaveOnSuccess = false};
            m_destroySolarPanelsFirst.OnMissionLoaded += DestroySolarPanelsFirstSubmissionLoaded;
            m_destroySolarPanelsFirst.OnMissionSuccess += DestroySolarPanelsFirstSubmissionSuccess;
            m_objectives.Add(m_destroySolarPanelsFirst);
            m_destroySolarPanelsFirst.SaveOnSuccess = true;

            //04
            var motherShipHelp = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.EAC_PRISON_MOTHERSHIPHELP_Name),
                MyMissionID.EAC_PRISON_MOTHERSHIPHELP,
                (MyTextsWrapperEnum.EAC_PRISON_MOTHERSHIPHELP_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_SOLAROFF1 },
                m_04toKill
            ) { SaveOnSuccess = false, StartDialogId = MyDialogueEnum.EAC_PRISON_0400, SuccessDialogId = MyDialogueEnum.EAC_PRISON_0500};
            m_objectives.Add(motherShipHelp);
            motherShipHelp.OnMissionLoaded += new MissionHandler(motherShipHelp_OnMissionLoaded);

                        //05
            m_destroySolarPanelsSecond = new MyObjective(
                (MyTextsWrapperEnum.EAC_PRISON_SOLAROFF2_Name),
                MyMissionID.EAC_PRISON_SOLAROFF2,
                (MyTextsWrapperEnum.EAC_PRISON_SOLAROFF2_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_MOTHERSHIPHELP },
                null
            ) { SaveOnSuccess = true,};
            m_destroySolarPanelsSecond.OnMissionLoaded += DestroySolarPanelsSecondSubmissionLoaded;
            m_destroySolarPanelsSecond.OnMissionSuccess += DestroySolarPanelsSecondSubmissionSuccess;
            m_objectives.Add(m_destroySolarPanelsSecond);
            
            //06
            var breakInsideStation = new MyTimedReachLocationObjective(
               (MyTextsWrapperEnum.EAC_PRISON_BREAKIN_Name),
               MyMissionID.EAC_PRISON_BREAKIN,
               (MyTextsWrapperEnum.EAC_PRISON_BREAKIN_Description),
               null,
               this,
               new MyMissionID[] { MyMissionID.EAC_PRISON_SOLAROFF2 },
               new System.TimeSpan(0, 1, 0),
               new MyMissionLocation(baseSector,(uint) EntityID.BreakInsideStationLocationDummy)
           ) { SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_PRISON_0600, HudName = MyTextsWrapperEnum.HudCargoBay };
            breakInsideStation.OnMissionSuccess += BreakInsideStationSubmissionSuccess;
            breakInsideStation.OnMissionLoaded += BreakInsideStationOnOnMissionLoaded;
            m_objectives.Add(breakInsideStation);
            
            //07
            var marcusLocationIntel = new MyUseObjective(
                   (MyTextsWrapperEnum.EAC_PRISON_LOCINTEL_Name),
                   MyMissionID.EAC_PRISON_LOCINTEL,
                   (MyTextsWrapperEnum.EAC_PRISON_LOCINTEL_Description),
                   null,
                   this,
                   new MyMissionID[] { MyMissionID.EAC_PRISON_BREAKIN },
                   new MyMissionLocation(baseSector, (uint)EntityID._MarcusIntelLocation),
                   MyTextsWrapperEnum.PressToDownloadData,
                   MyTextsWrapperEnum.Console,
                   MyTextsWrapperEnum.DownloadingData,
                   5000,
                   MyUseObjectiveType.Hacking
                ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudSecurityHub };

            m_objectives.Add(marcusLocationIntel);
            marcusLocationIntel.OnMissionLoaded += new MissionHandler(marcusLocationIntel_OnMissionLoaded);
            marcusLocationIntel.OnMissionSuccess += MarcusLocationIntelOnOnMissionSuccess;
            marcusLocationIntel.Components.Add(new MySpawnpointLimiter(m_spawns, 6));
            
            //08
            m_findCircoutPart = new MyUseObjective(
                    (MyTextsWrapperEnum.EAC_PRISON_ACQUIREIDCARD_Name),
                    MyMissionID.EAC_PRISON_ACQUIREIDCARD,
                    (MyTextsWrapperEnum.EAC_PRISON_ACQUIREIDCARD_Description),
                    null,
                    this,
                    new MyMissionID[] { MyMissionID.EAC_PRISON_LOCINTEL},
                    new MyMissionLocation(baseSector, (uint)EntityID.CargoIDCard),
                    MyTextsWrapperEnum.PressToTakeCargo,
                    MyTextsWrapperEnum.TakeAll,
                    MyTextsWrapperEnum.TakeAll,
                    2000,
                    MyUseObjectiveType.Taking,
                    radiusOverride: 50
            ) { SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_PRISON_0700, HudName = MyTextsWrapperEnum.HudIdCard };

            m_findCircoutPart.OnMissionLoaded += OnFindCircuitLoaded;
            m_findCircoutPart.OnMissionSuccess += new MissionHandler(m_findCircoutPart_OnMissionSuccess);
            m_objectives.Add(m_findCircoutPart);


            var marcusLocationIntel2 = new MyUseObjective(
               (MyTextsWrapperEnum.EAC_PRISON_LOCINTEL2_Name),
               MyMissionID.EAC_PRISON_LOCINTEL2,
               (MyTextsWrapperEnum.EAC_PRISON_LOCINTEL2_Description),
               null,
               this,
               new MyMissionID[] { MyMissionID.EAC_PRISON_ACQUIREIDCARD },
               new MyMissionLocation(baseSector, (uint)EntityID._MarcusIntelLocation),
               MyTextsWrapperEnum.PressToDownloadData,
               MyTextsWrapperEnum.Console,
               MyTextsWrapperEnum.DownloadingData,
               5000,
               MyUseObjectiveType.Hacking
            ) { SaveOnSuccess = true, SuccessDialogId = MyDialogueEnum.EAC_PRISON_0900, StartDialogId = MyDialogueEnum.EAC_PRISON_0800, HudName = MyTextsWrapperEnum.HudSecurityHub };

            m_objectives.Add(marcusLocationIntel2);
            
            //09
            var openDoors = new MyObjectiveEnablePrefabs(
                (MyTextsWrapperEnum.EAC_PRISON_OPENACCESS_Name),
                MyMissionID.EAC_PRISON_OPENACCESS,
                (MyTextsWrapperEnum.EAC_PRISON_OPENACCESS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_LOCINTEL2 },
                null,
                new List<uint> {(int)EntityID.SecurityHub},
                m_09toEnablePrefabs
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudSecurityHub };
            m_objectives.Add(openDoors);

            openDoors.OnMissionLoaded += OnOpenDoorsLoaded;
            
            //10
            var takeOffSecurityCircuit = new MyObjectiveDisablePrefabs(
              (MyTextsWrapperEnum.EAC_PRISON_SECURITYOFF_Name),
              MyMissionID.EAC_PRISON_SECURITYOFF,
              (MyTextsWrapperEnum.EAC_PRISON_SECURITYOFF_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_OPENACCESS },
                new List<uint> { (uint)EntityID.HubHack },
                new List<uint> { (uint)EntityID.HubHackGenerator },
                false,
                false
            ) { SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_PRISON_1000, HudName = MyTextsWrapperEnum.HudHub };

            takeOffSecurityCircuit.OnMissionLoaded += OntakeOffSecuritypartLoaded;//zapne svetlo
            m_objectives.Add(takeOffSecurityCircuit);
            
            //11
            var approachMarcusCell = new MyUseObjective(
                (MyTextsWrapperEnum.EAC_PRISON_MARCUSCELL_Name),
               MyMissionID.EAC_PRISON_MARCUSCELL,
               (MyTextsWrapperEnum.EAC_PRISON_MARCUSCELL_Description),
               null,
               this,
               new MyMissionID[] { MyMissionID.EAC_PRISON_SECURITYOFF },
               new MyMissionLocation(baseSector, (uint)EntityID.MarcusCellLocation),
               MyTextsWrapperEnum.HoldToMoveMarcus,
               MyTextsWrapperEnum.Actor_Marcus,
               MyTextsWrapperEnum.Moving,
               4000,
               MyUseObjectiveType.Taking
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudMarcus };
            approachMarcusCell.OnMissionLoaded += OnapproachMarcusLoaded;
            m_objectives.Add(approachMarcusCell);

            var marcusLoaded = new MyObjectiveDialog(
                MyMissionID.EAC_PRISON_MARCUSDIALOG,
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_MARCUSCELL },
                MyDialogueEnum.EAC_PRISON_1200
            ) { SaveOnSuccess = true };
            marcusLoaded.OnMissionLoaded += OnMarcusLoadedLoaded;
            m_objectives.Add(marcusLoaded);

            var weHaveCompany = new MyObjectiveDialog(
                MyMissionID.EAC_PRISON_WE_HAVE_COMPANY,
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_MARCUSDIALOG },
                MyDialogueEnum.EAC_PRISON_1250
            ) { SaveOnSuccess = false };
            weHaveCompany.OnMissionLoaded += OnWeHaveCompanyLoaded;
            m_objectives.Add(weHaveCompany);

            //12
            var findMarcusSmallShip = new MyUseObjective(
             (MyTextsWrapperEnum.EAC_PRISON_COVERMARCUS_Name),
             MyMissionID.EAC_PRISON_COVERMARCUS,
             (MyTextsWrapperEnum.EAC_PRISON_COVERMARCUS_Description),
               null,
               this,
               new MyMissionID[] { MyMissionID.EAC_PRISON_WE_HAVE_COMPANY },
               new MyMissionLocation(baseSector, (uint)EntityID.MarcusShipDetector),
               MyTextsWrapperEnum.HoldToMoveMarcus,
               MyTextsWrapperEnum.Actor_Marcus,
               MyTextsWrapperEnum.Moving,
               4000,
               MyUseObjectiveType.Putting
            ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudShip };

            // destroySolarDefence.OnMissionSuccess += ToHangarSubmissionSuccess;
            m_objectives.Add(findMarcusSmallShip);
            findMarcusSmallShip.OnMissionSuccess += OnSuccesfindMarcusSmallShip;

            //13
            var equipMarcus = new MyUseObjective(
             (MyTextsWrapperEnum.EAC_PRISON_GETARMS_Name),
             MyMissionID.EAC_PRISON_GETARMS,
             (MyTextsWrapperEnum.EAC_PRISON_GETARMS_Description),
                   null,
                   this,
                   new MyMissionID[] { MyMissionID.EAC_PRISON_COVERMARCUS },
                   new MyMissionLocation(baseSector, (uint)EntityID.CargoForMarcus),
                   MyTextsWrapperEnum.HoldToMoveWeapons,
                   MyTextsWrapperEnum.Actor_Marcus,
                   MyTextsWrapperEnum.Moving,
                   4000
             ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudEquipment };

            // destroySolarDefence.OnMissionSuccess += ToHangarSubmissionSuccess;
            m_objectives.Add(equipMarcus);
            equipMarcus.OnMissionSuccess += OnEquipMarcussSucces;
            equipMarcus.OnMissionLoaded += EquipMarcusOnOnMissionLoaded;

            //14
            var fightOutStation = new MyObjective(
                    (MyTextsWrapperEnum.EAC_PRISON_FIGHTOUT_Name),
                MyMissionID.EAC_PRISON_FIGHTOUT,
                (MyTextsWrapperEnum.EAC_PRISON_FIGHTOUT_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_GETARMS },
                new MyMissionLocation(baseSector, (uint)EntityID.StationDummy)
            ) { SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_PRISON_1300, SuccessDialogId = MyDialogueEnum.EAC_PRISON_1400, HudName = MyTextsWrapperEnum.Nothing };
            fightOutStation.OnMissionLoaded += fightOutStation_OnMissionLoaded;
            fightOutStation.OnMissionSuccess += fightOutStation_OnMissionSuccess;
            m_objectives.Add(fightOutStation);

            //15
            var CrushRemainingShips = new MyObjectiveDestroy(
                (MyTextsWrapperEnum.EAC_PRISON_CRUSHREINFORCEMENTS_Name),
                MyMissionID.EAC_PRISON_CRUSHREINFORCEMENTS,
                (MyTextsWrapperEnum.EAC_PRISON_CRUSHREINFORCEMENTS_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_FIGHTOUT },
                new List<uint> { },         // entities needed to kill
                m_15toKillSpawnpoints,  // spawnpoint from which bots must be killed
                false                       // don't show marks on entities (not from spawnpoint)
            ) { SaveOnSuccess = true, };
            m_objectives.Add(CrushRemainingShips);
            
            //16
            var GetToMeetingPoint = new MyObjective(
                (MyTextsWrapperEnum.EAC_PRISON_MEETINGPOINT_Name),
                MyMissionID.EAC_PRISON_MEETINGPOINT,
                (MyTextsWrapperEnum.EAC_PRISON_MEETINGPOINT_Description),
                null,
                this,
                new MyMissionID[] { MyMissionID.EAC_PRISON_CRUSHREINFORCEMENTS },
                new MyMissionLocation(baseSector, MyMissionLocation.MADELYN_HANGAR),
                radiusOverride: MyMissionLocation.MADELYN_HANGAR_RADIUS
              ) { SaveOnSuccess = true, StartDialogId = MyDialogueEnum.EAC_PRISON_1500, SuccessDialogId = MyDialogueEnum.EAC_PRISON_1600, HudName = MyTextsWrapperEnum.HudMeetingPoint };
            m_objectives.Add(GetToMeetingPoint);
            
        }