public MyJunkyardReturnMission() { ID = MyMissionID.JUNKYARD_RETURN; /* ID must be added to MyMissions.cs */ Name = MyTextsWrapperEnum.JUNKYARD_RETURN; Description = MyTextsWrapperEnum.JUNKYARD_RETURN_Description; //"Return to Ranjit with stolen Cargoship\n" DebugName = new StringBuilder("08e-Junkyard racing"); // Name of mission Flags = MyMissionFlags.Story; AchievementName = MySteamAchievementNames.Mission12_JunkyardRacing; MyMwcVector3Int baseSector = new MyMwcVector3Int(2567538,0,-172727); // Story sector of the script - i.e. (-2465,0,6541) Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation); // Starting dummy point - must by typecasted to uint and referenced from EntityID enum RequiredMissions = new MyMissionID[] { MyMissionID.CHINESE_ESCAPE }; // IDs of missions required to make this mission available RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_DIALOGUE_RETURN }; RequiredActors = new MyActorEnum[] { MyActorEnum.MARCUS, MyActorEnum.MADELYN, MyActorEnum.TARJA, MyActorEnum.VALENTIN }; #region Objectives m_objectives = new List<MyObjective>(); // Creating of list of submissions var meetManjeet = new MyObjective( (MyTextsWrapperEnum.JUNKYARD_RETURN_MEET_SMUGGLER_Name), MyMissionID.JUNKYARD_RETURN_MEET_SMUGGLER, (MyTextsWrapperEnum.JUNKYARD_RETURN_MEET_SMUGGLER_Description), null, this, new MyMissionID[] {}, new MyMissionLocation(baseSector, (uint) EntityID.Manjeet), new List<uint> {(uint) EntityID.Manjeet}, radiusOverride: 50 ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudManjeet }; m_objectives.Add(meetManjeet); meetManjeet.OnMissionLoaded += O01MeetSmugglerLoaded; var manjeetDialogue = new MyObjectiveDialog( MyMissionID.JUNKYARD_RETURN_SMUGGLER_DIALOGUE, null, this, new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_MEET_SMUGGLER }, MyDialogueEnum.JUNKYARD_RETURN_0200 ) { SaveOnSuccess = true }; manjeetDialogue.OnMissionSuccess += new MissionHandler(manjeetDialogue_OnMissionSuccess); m_objectives.Add(manjeetDialogue); var speedsterDialogue = new MyObjective( MyTextsWrapperEnum.Null, MyMissionID.JUNKYARD_RETURN_SPEEDSTER_DIALOGUE, MyTextsWrapperEnum.Null, null, this, new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_SMUGGLER_DIALOGUE }, null ) { SaveOnSuccess = true }; speedsterDialogue.OnMissionLoaded += O02SmugglerDialogueLoaded; m_objectives.Add(speedsterDialogue); m_objective03_FlyToStart = new MyObjective( (MyTextsWrapperEnum.JUNKYARD_RETURN_FLY_TO_START_Name), MyMissionID.JUNKYARD_RETURN_FLY_TO_START, (MyTextsWrapperEnum.JUNKYARD_RETURN_FLY_TO_START_Description), null, this, new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_SPEEDSTER_DIALOGUE }, null, startDialogId: MyDialogueEnum.JUNKYARD_RETURN_0300 ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudStart }; m_objective03_FlyToStart.MissionEntityIDs.Add((uint)EntityID.DetectorStartRacePosition); m_objective03_FlyToStart.OnMissionLoaded += O03FlyToStartLoaded; m_objective03_FlyToStart.OnMissionCleanUp += O03FlyToStartCleanUp; m_objectives.Add(m_objective03_FlyToStart); m_objective04_Race = new MyObjectiveRace( (MyTextsWrapperEnum.JUNKYARD_RETURN_RACE_Name), (MyTextsWrapperEnum.JUNKYARD_RETURN_RACE_PrepareName), (MyTextsWrapperEnum.JUNKYARD_RETURN_RACE_GoBackName), MyMissionID.JUNKYARD_RETURN_RACE, (MyTextsWrapperEnum.JUNKYARD_RETURN_RACE_Description), null, this, new MyMissionID[]{ MyMissionID.JUNKYARD_RETURN_FLY_TO_START }, baseSector, m_raceCheckpoints, (uint)EntityID.DetectorStartRacePosition2 ) { SaveOnSuccess = true} ; m_objective04_Race.RacerNames = new List<string> { "Racer2", "Racer3", "Challenger" }; m_objective04_Race.BotLoaded += Race_BotLoaded; m_objective04_Race.OnMissionLoaded += O04RaceLoaded; m_objective04_Race.OnMissionFailed += RaceMissionFailed; m_objective04_Race.OnMissionSuccess += Objective04_RaceOnOnMissionSuccess; m_objective04_Race.CheckpointReached += RaceMissonOnCheckpointReached; m_objective04_Race.OnStartNumberChanged += RaceStartNumberChanged; m_objective04_Race.RaceStarted = RaceStarted; m_objectives.Add(m_objective04_Race); m_objective05_Win = new MyObjectiveDialog( (MyTextsWrapperEnum.JUNKYARD_RETURN_WIN_Name), MyMissionID.JUNKYARD_RETURN_WIN, (MyTextsWrapperEnum.JUNKYARD_RETURN_WIN_Description), null, this, new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_RACE }, MyDialogueEnum.JUNKYARD_RETURN_1300 ) { SaveOnSuccess = false }; m_objectives.Add(m_objective05_Win); m_objective05_Win.OnMissionLoaded += O05WinLoaded; m_objective06_GoToSmuggler = new MyMeetObjective( (MyTextsWrapperEnum.JUNKYARD_RETURN_GO_TO_SMUGGLER_name), MyMissionID.JUNKYARD_RETURN_GO_TO_SMUGGLER, (MyTextsWrapperEnum.JUNKYARD_RETURN_GO_TO_SMUGGLER_Description), this, new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_WIN }, null, (uint)EntityID.Manjeet, 100, 0.25f, null ) { SaveOnSuccess = true, FollowMe = false }; m_objectives.Add(m_objective06_GoToSmuggler); m_objective07_SmugglerDialogueReturn = new MyObjectiveDialog( (MyTextsWrapperEnum.JUNKYARD_RETURN_DIALOGUE_RETURN_Name), MyMissionID.JUNKYARD_RETURN_DIALOGUE_RETURN, (MyTextsWrapperEnum.JUNKYARD_RETURN_DIALOGUE_RETURN_Description), null, this, new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_GO_TO_SMUGGLER}, dialogId: MyDialogueEnum.JUNKYARD_RETURN_1400 ) { SaveOnSuccess = false }; m_objectives.Add(m_objective07_SmugglerDialogueReturn); m_objective07_SmugglerDialogueReturn.OnMissionLoaded += O07SmugglerDialogueReturnLoaded; #endregion }
public MyJunkyardReturnMission() { ID = MyMissionID.JUNKYARD_RETURN; /* ID must be added to MyMissions.cs */ Name = MyTextsWrapperEnum.JUNKYARD_RETURN; Description = MyTextsWrapperEnum.JUNKYARD_RETURN_Description; //"Return to Ranjit with stolen Cargoship\n" DebugName = new StringBuilder("08e-Junkyard racing"); // Name of mission Flags = MyMissionFlags.Story; AchievementName = MySteamAchievementNames.Mission12_JunkyardRacing; MyMwcVector3Int baseSector = new MyMwcVector3Int(2567538, 0, -172727); // Story sector of the script - i.e. (-2465,0,6541) Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation); // Starting dummy point - must by typecasted to uint and referenced from EntityID enum RequiredMissions = new MyMissionID[] { MyMissionID.CHINESE_ESCAPE }; // IDs of missions required to make this mission available RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_DIALOGUE_RETURN }; RequiredActors = new MyActorEnum[] { MyActorEnum.MARCUS, MyActorEnum.MADELYN, MyActorEnum.TARJA, MyActorEnum.VALENTIN }; #region Objectives m_objectives = new List <MyObjective>(); // Creating of list of submissions var meetManjeet = new MyObjective( (MyTextsWrapperEnum.JUNKYARD_RETURN_MEET_SMUGGLER_Name), MyMissionID.JUNKYARD_RETURN_MEET_SMUGGLER, (MyTextsWrapperEnum.JUNKYARD_RETURN_MEET_SMUGGLER_Description), null, this, new MyMissionID[] {}, new MyMissionLocation(baseSector, (uint)EntityID.Manjeet), new List <uint> { (uint)EntityID.Manjeet }, radiusOverride: 50 ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudManjeet }; m_objectives.Add(meetManjeet); meetManjeet.OnMissionLoaded += O01MeetSmugglerLoaded; var manjeetDialogue = new MyObjectiveDialog( MyMissionID.JUNKYARD_RETURN_SMUGGLER_DIALOGUE, null, this, new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_MEET_SMUGGLER }, MyDialogueEnum.JUNKYARD_RETURN_0200 ) { SaveOnSuccess = true }; manjeetDialogue.OnMissionSuccess += new MissionHandler(manjeetDialogue_OnMissionSuccess); m_objectives.Add(manjeetDialogue); var speedsterDialogue = new MyObjective( MyTextsWrapperEnum.Null, MyMissionID.JUNKYARD_RETURN_SPEEDSTER_DIALOGUE, MyTextsWrapperEnum.Null, null, this, new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_SMUGGLER_DIALOGUE }, null ) { SaveOnSuccess = true }; speedsterDialogue.OnMissionLoaded += O02SmugglerDialogueLoaded; m_objectives.Add(speedsterDialogue); m_objective03_FlyToStart = new MyObjective( (MyTextsWrapperEnum.JUNKYARD_RETURN_FLY_TO_START_Name), MyMissionID.JUNKYARD_RETURN_FLY_TO_START, (MyTextsWrapperEnum.JUNKYARD_RETURN_FLY_TO_START_Description), null, this, new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_SPEEDSTER_DIALOGUE }, null, startDialogId: MyDialogueEnum.JUNKYARD_RETURN_0300 ) { SaveOnSuccess = true, HudName = MyTextsWrapperEnum.HudStart }; m_objective03_FlyToStart.MissionEntityIDs.Add((uint)EntityID.DetectorStartRacePosition); m_objective03_FlyToStart.OnMissionLoaded += O03FlyToStartLoaded; m_objective03_FlyToStart.OnMissionCleanUp += O03FlyToStartCleanUp; m_objectives.Add(m_objective03_FlyToStart); m_objective04_Race = new MyObjectiveRace( (MyTextsWrapperEnum.JUNKYARD_RETURN_RACE_Name), (MyTextsWrapperEnum.JUNKYARD_RETURN_RACE_PrepareName), (MyTextsWrapperEnum.JUNKYARD_RETURN_RACE_GoBackName), MyMissionID.JUNKYARD_RETURN_RACE, (MyTextsWrapperEnum.JUNKYARD_RETURN_RACE_Description), null, this, new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_FLY_TO_START }, baseSector, m_raceCheckpoints, (uint)EntityID.DetectorStartRacePosition2 ) { SaveOnSuccess = true }; m_objective04_Race.RacerNames = new List <string> { "Racer2", "Racer3", "Challenger" }; m_objective04_Race.BotLoaded += Race_BotLoaded; m_objective04_Race.OnMissionLoaded += O04RaceLoaded; m_objective04_Race.OnMissionFailed += RaceMissionFailed; m_objective04_Race.OnMissionSuccess += Objective04_RaceOnOnMissionSuccess; m_objective04_Race.CheckpointReached += RaceMissonOnCheckpointReached; m_objective04_Race.OnStartNumberChanged += RaceStartNumberChanged; m_objective04_Race.RaceStarted = RaceStarted; m_objectives.Add(m_objective04_Race); m_objective05_Win = new MyObjectiveDialog( (MyTextsWrapperEnum.JUNKYARD_RETURN_WIN_Name), MyMissionID.JUNKYARD_RETURN_WIN, (MyTextsWrapperEnum.JUNKYARD_RETURN_WIN_Description), null, this, new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_RACE }, MyDialogueEnum.JUNKYARD_RETURN_1300 ) { SaveOnSuccess = false }; m_objectives.Add(m_objective05_Win); m_objective05_Win.OnMissionLoaded += O05WinLoaded; m_objective06_GoToSmuggler = new MyMeetObjective( (MyTextsWrapperEnum.JUNKYARD_RETURN_GO_TO_SMUGGLER_name), MyMissionID.JUNKYARD_RETURN_GO_TO_SMUGGLER, (MyTextsWrapperEnum.JUNKYARD_RETURN_GO_TO_SMUGGLER_Description), this, new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_WIN }, null, (uint)EntityID.Manjeet, 100, 0.25f, null ) { SaveOnSuccess = true, FollowMe = false }; m_objectives.Add(m_objective06_GoToSmuggler); m_objective07_SmugglerDialogueReturn = new MyObjectiveDialog( (MyTextsWrapperEnum.JUNKYARD_RETURN_DIALOGUE_RETURN_Name), MyMissionID.JUNKYARD_RETURN_DIALOGUE_RETURN, (MyTextsWrapperEnum.JUNKYARD_RETURN_DIALOGUE_RETURN_Description), null, this, new MyMissionID[] { MyMissionID.JUNKYARD_RETURN_GO_TO_SMUGGLER }, dialogId: MyDialogueEnum.JUNKYARD_RETURN_1400 ) { SaveOnSuccess = false }; m_objectives.Add(m_objective07_SmugglerDialogueReturn); m_objective07_SmugglerDialogueReturn.OnMissionLoaded += O07SmugglerDialogueReturnLoaded; #endregion }