public MyMultipleUseObjective(
            MyTextsWrapperEnum name,
            MyMissionID id,
            MyTextsWrapperEnum description,
            MyTexture2D icon,
            MyMission parentMission,
            MyMissionID[] requiredMissions,
            MyTextsWrapperEnum notificationText,
            MyTextsWrapperEnum useCaption,
            MyTextsWrapperEnum useText,
            int requiredTime,
            List<uint> MissionEntityIDs,
            MyUseObjectiveType objectiveType = MyUseObjectiveType.Hacking,


            MyDialogueEnum? startDialogId = null)
            : base(name, id, description, icon, parentMission, requiredMissions, null, MissionEntityIDs, startDialogId: startDialogId)
        {
            m_notificationText = notificationText;
            m_useText = useText;
            m_useCaption = useCaption;
            m_requiredTime = requiredTime;

            m_objectiveType = objectiveType;
        }
Пример #2
0
        public MyUseObjective(
            MyTextsWrapperEnum name,
            MyMissionID id,
            MyTextsWrapperEnum description,
            MyTexture2D icon,
            MyMission parentMission,
            MyMissionID[] requiredMissions,
            MyMissionLocation location,
            MyTextsWrapperEnum notificationText,
            MyTextsWrapperEnum useCaption,
            MyTextsWrapperEnum useText,
            int requiredTime,
            MyUseObjectiveType objectiveType = MyUseObjectiveType.Hacking,
            MyDialogueEnum? successDialogId = null,
            MyDialogueEnum? startDialogId = null,
            float? radiusOverride = null,
            List<uint> fakeMissionIds = null,
            uint? realMissionId = null)
            : base(name, id, description, icon, parentMission, requiredMissions, location, fakeMissionIds, successDialogId, startDialogId, radiusOverride: radiusOverride)
        {
            m_notificationText = notificationText;
            m_useText = useText;
            m_useCaption = useCaption;
            m_requiredTime = requiredTime;
            m_realMissionEntityId = realMissionId;
            InitSounds(objectiveType);

            if (location != null)
            {
                if (location.LocationEntityIdentifier.LocationEntityId != null)
                {
                    RequiredEntityIDs.Add(location.LocationEntityIdentifier.LocationEntityId.Value);
                }
            }
        }
        public MyMultipleUseObjective(
            MyTextsWrapperEnum name,
            MyMissionID id,
            MyTextsWrapperEnum description,
            MyTexture2D icon,
            MyMission parentMission,
            MyMissionID[] requiredMissions,
            MyTextsWrapperEnum notificationText,
            MyTextsWrapperEnum useCaption,
            MyTextsWrapperEnum useText,
            int requiredTime,
            List <uint> MissionEntityIDs,
            MyUseObjectiveType objectiveType = MyUseObjectiveType.Hacking,


            MyDialogueEnum?startDialogId = null)
            : base(name, id, description, icon, parentMission, requiredMissions, null, MissionEntityIDs, startDialogId: startDialogId)
        {
            m_notificationText = notificationText;
            m_useText          = useText;
            m_useCaption       = useCaption;
            m_requiredTime     = requiredTime;

            m_objectiveType = objectiveType;
        }
Пример #4
0
        public MyUseObjective(
            StringBuilder name,
            MyMissionID id,
            StringBuilder description,
            MyTexture2D icon,
            MyMission parentMission,
            MyMissionID[] requiredMissions,
            MyMissionLocation location,
            MyTextsWrapperEnum notificationText,
            MyTextsWrapperEnum useCaption,
            MyTextsWrapperEnum useText,
            int requiredTime,
            MyUseObjectiveType objectiveType = MyUseObjectiveType.Hacking,
            MyDialogueEnum?successDialogId   = null,
            MyDialogueEnum?startDialogId     = null,
            float?radiusOverride             = null,
            List <uint> fakeMissionIds       = null,
            uint?realMissionId = null)
            : base(name, id, description, icon, parentMission, requiredMissions, location, fakeMissionIds, successDialogId, startDialogId, radiusOverride: radiusOverride)
        {
            m_notificationText    = notificationText;
            m_useText             = useText;
            m_useCaption          = useCaption;
            m_requiredTime        = requiredTime;
            m_realMissionEntityId = realMissionId;
            InitSounds(objectiveType);

            if (location != null)
            {
                if (location.LocationEntityIdentifier.LocationEntityId != null)
                {
                    RequiredEntityIDs.Add(location.LocationEntityIdentifier.LocationEntityId.Value);
                }
            }
        }
Пример #5
0
 public MyTimedObjective(StringBuilder name, MyMissionID id, StringBuilder description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, TimeSpan submissionDuration, bool isOn)
     : this(name, id, description, icon, parentMission, requiredMissions, submissionDuration)
 {
     m_isOn = isOn;
     m_defaultState = m_isOn;
     DisplayCounter = true;
 }
 public MyObjectiveGetToLocations(StringBuilder Name, MyMissionID ID, StringBuilder Description, MyTexture2D Icon, MyMission ParentMission, MyMissionID[] RequiredMissions, List<MyMissionLocation> DummiesToVisit, Audio.Dialogues.MyDialogueEnum? successDialogId = null, Audio.Dialogues.MyDialogueEnum? startDialogId = null, bool displayObjectivesCount = true) :
     base(Name, ID, Description, Icon, ParentMission, RequiredMissions, null, null, successDialogId, startDialogId, displayObjectivesCount)
 {
     Debug.Assert(DummiesToVisit != null);
     Debug.Assert(DummiesToVisit.Count > 0);
     m_dummiesToVisit = DummiesToVisit;
     m_dummiesVisited = new List<MyMissionLocation>();
 }
Пример #7
0
 public MyObjectiveDestroy(MyTextsWrapperEnum name, MyMissionID id, MyTextsWrapperEnum description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, List<uint> toKill, List<uint> toKillSpawnpoints, bool showMarks = true, bool displayObjectivesCount = true, MyDialogueEnum? successDialogID = null, MyDialogueEnum? startDialogID = null)
     : base(name, id, description, icon, parentMission, requiredMissions, null, displayObjectivesCount: displayObjectivesCount, successDialogId: successDialogID, startDialogId: startDialogID)
 {
     m_toKill = toKill;
     m_toKillSpawnpoints = toKillSpawnpoints;
     m_showMarks = showMarks;
     FailIfEntityDestroyed = false;
     MakeEntityIndestructible = false;
 }
 public MyObjectiveDisablePrefabs(MyTextsWrapperEnum name, MyMissionID id, MyTextsWrapperEnum description, MyTexture2D icon, MyMission parentMission, 
         MyMissionID[] requiredMissions, List<uint> toDisable, List<uint> disableBy, bool displayObjectivesCount = true, 
         bool markObjectsToDisable = true, MyDialogueEnum? successDialogId = null, MyDialogueEnum? startDialogId = null)
     : base(name, id, description, icon, parentMission, requiredMissions, null, disableBy, successDialogId, startDialogId,  displayObjectivesCount: displayObjectivesCount)
 {
     m_toDisable = toDisable;
     m_markObjectsToDisable = markObjectsToDisable;
     RequiredEntityIDs.AddRange(toDisable);
 }
Пример #9
0
 public MyMeetObjective(StringBuilder Name, MyMissionID ID, StringBuilder Description, MyMission ParentMission, MyMissionID[] RequiredMissions, uint? detectorId, string botName, float distanceToTalk = 50, float slowdown = 0.25f, MyDialogueEnum? successDialogueId = null, MyDialogueEnum? startDialogueId = null, bool stopFollow = true)
     : base(Name, ID, Description, null, ParentMission, RequiredMissions, null, null, successDialogueId, startDialogueId)
 {
     m_botDetectorId = detectorId;
     m_distanceToTalk = distanceToTalk;
     m_slowdown = slowdown;
     //m_detectorDialog = detectorDialogId;
     m_stopFollow = stopFollow;
     m_constructorFromName = true;
     m_botName = botName;
     FollowMe = true;
 }
Пример #10
0
        public MyMeetObjective(MyTextsWrapperEnum Name, MyMissionID ID, MyTextsWrapperEnum Description, MyMission ParentMission, MyMissionID[] RequiredMissions, uint? detectorId, uint? botId, float distanceToTalk = 50, float slowdown = 0.25f, MyDialogueEnum? successDialogueId = null, MyDialogueEnum? startDialogueId = null, bool stopFollow = true)
            : base(Name, ID, Description, null, ParentMission, RequiredMissions, null, null, successDialogueId, startDialogueId)
        {
            m_botToTalkId = botId;
            m_botDetectorId = detectorId;
            m_distanceToTalk = distanceToTalk;
            m_slowdown = slowdown;
            //m_detectorDialog = detectorDialogId;

            m_stopFollow = stopFollow;
            FollowMe = true;
        }
 public MyObjectiveEnablePrefabs(
     StringBuilder name,
     MyMissionID id,
     StringBuilder description,
     MyTexture2D icon,
     MyMission parentMission,
     MyMissionID[] requiredMissions,
     MyMissionLocation location,
     List<uint> missionEntityIDs,
     List<uint> toEnablePrefabs,
     MyDialogueEnum? successDialogId = null,
     MyDialogueEnum? startDialogId = null)
     : base(name, id, description, icon, parentMission, requiredMissions, location, missionEntityIDs, successDialogId, startDialogId)
 {
     m_toEnablePrefabs = toEnablePrefabs;
 }
 public MyObjectiveEnablePrefabs(
     StringBuilder name,
     MyMissionID id,
     StringBuilder description,
     MyTexture2D icon,
     MyMission parentMission,
     MyMissionID[] requiredMissions,
     MyMissionLocation location,
     List <uint> missionEntityIDs,
     List <uint> toEnablePrefabs,
     MyDialogueEnum?successDialogId = null,
     MyDialogueEnum?startDialogId   = null)
     : base(name, id, description, icon, parentMission, requiredMissions, location, missionEntityIDs, successDialogId, startDialogId)
 {
     m_toEnablePrefabs = toEnablePrefabs;
 }
Пример #13
0
        public MyObjective(MyTextsWrapperEnum name,
                           MyMissionID missionId,
                           MyTextsWrapperEnum description,
                           MyTexture2D icon,
                           MyMission parentMission,
                           MyMissionID[] requiredMissions,
                           MyMissionLocation location,
                           List <uint> missionEntityIDs   = null,
                           MyDialogueEnum?successDialogId = null,
                           MyDialogueEnum?startDialogId   = null,
                           MyActorEnum[] requiredActors   = null,
                           float?radiusOverride           = null)
            : this(MyTextsWrapper.Get(name), missionId, MyTextsWrapper.Get(description), icon, parentMission, requiredMissions, location, missionEntityIDs, successDialogId,
                   startDialogId, requiredActors, radiusOverride)

        {
        }
Пример #14
0
 public MyObjective(StringBuilder Name,
                    MyMissionID ID,
                    StringBuilder Description,
                    MyTexture2D Icon,
                    MyMission ParentMission,
                    MyMissionID[] RequiredMissions,
                    MyMissionLocation Location,
                    List <uint> MissionEntityIDs   = null,
                    MyDialogueEnum?successDialogId = null,
                    MyDialogueEnum?startDialogId   = null,
                    MyActorEnum[] requiredActors   = null,
                    float?radiusOverride           = null)
 {
     this.NameTemp         = Name;
     this.ID               = ID;
     this.DescriptionTemp  = Description;
     this.Icon             = Icon;
     this.ParentMission    = ParentMission;
     this.RequiredMissions = RequiredMissions;
     this.Location         = Location;
     this.MissionEntityIDs = new List <uint>();
     this.SuccessDialogId  = successDialogId;
     this.StartDialogId    = startDialogId;
     this.m_radiusOverride = radiusOverride;
     if (MissionEntityIDs != null)
     {
         this.MissionEntityIDs.AddRange(MissionEntityIDs);
     }
     if (requiredActors != null)
     {
         this.RequiredActors = requiredActors;
     }
     RequiresDrone            = false;
     CanBeSkipped             = true;
     FailIfEntityDestroyed    = true;
     MakeEntityIndestructible = true;
 }
Пример #15
0
 public MyObjective( StringBuilder Name, 
                     MyMissionID ID, 
                     StringBuilder Description, 
                     MyTexture2D Icon, 
                     MyMission ParentMission, 
                     MyMissionID[] RequiredMissions, 
                     MyMissionLocation Location, 
                     List<uint> MissionEntityIDs = null, 
                     MyDialogueEnum? successDialogId = null, 
                     MyDialogueEnum? startDialogId = null,
                     MyActorEnum[] requiredActors = null,
                     float? radiusOverride = null)
 {
     this.NameTemp = Name;
     this.ID = ID;
     this.DescriptionTemp = Description;
     this.Icon = Icon;
     this.ParentMission = ParentMission;
     this.RequiredMissions = RequiredMissions;
     this.Location = Location;
     this.MissionEntityIDs = new List<uint>();
     this.SuccessDialogId = successDialogId;
     this.StartDialogId = startDialogId;
     this.m_radiusOverride = radiusOverride;
     if (MissionEntityIDs != null)
     {
         this.MissionEntityIDs.AddRange(MissionEntityIDs);
     }
     if (requiredActors != null)
     {
         this.RequiredActors = requiredActors;
     }
     RequiresDrone = false;
     CanBeSkipped = true;
     FailIfEntityDestroyed = true;
     MakeEntityIndestructible = true;
 }
Пример #16
0
 public MyMultipleObjectives(StringBuilder Name, MyMissionID ID, StringBuilder Description, MyTexture2D Icon, MyMission ParentMission, MyMissionID[] RequiredMissions, MyMissionLocation Location, List<uint> MissionEntityIDs = null, Audio.Dialogues.MyDialogueEnum? successDialogId = null, Audio.Dialogues.MyDialogueEnum? startDialogId = null, bool displayObjectivesCount = true)
     : base(Name, ID, Description, Icon, ParentMission, RequiredMissions, Location, MissionEntityIDs, successDialogId, startDialogId)
 {
     m_displayObjectivesCount = displayObjectivesCount;
     AdditionalHudInformation = new StringBuilder();
 }
Пример #17
0
 public MyObjectiveDefend(StringBuilder name, MyMissionID id, StringBuilder description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, List <uint> toKill, List <uint> toDefend, bool displayObjectivesCount = true)
     : this(name, id, description, icon, parentMission, requiredMissions, toKill, new List <uint>(), toDefend, true, displayObjectivesCount)
 {
 }
Пример #18
0
 public MyObjectiveDestroy(MyTextsWrapperEnum name, MyMissionID id, MyTextsWrapperEnum description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, List <uint> toKill, bool displayObjectivesCount = true, MyDialogueEnum?successDialogID = null, MyDialogueEnum?startDialogID = null)
     : this(name, id, description, icon, parentMission, requiredMissions, toKill, new List <uint>(), true, displayObjectivesCount, successDialogID, startDialogID)
 {
 }
Пример #19
0
 public MyObjectiveDestroy(MyTextsWrapperEnum name, MyMissionID id, MyTextsWrapperEnum description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, List <uint> toKill, List <uint> toKillSpawnpoints, bool showMarks = true, bool displayObjectivesCount = true, MyDialogueEnum?successDialogID = null, MyDialogueEnum?startDialogID = null)
     : base(name, id, description, icon, parentMission, requiredMissions, null, displayObjectivesCount: displayObjectivesCount, successDialogId: successDialogID, startDialogId: startDialogID)
 {
     m_toKill                 = toKill;
     m_toKillSpawnpoints      = toKillSpawnpoints;
     m_showMarks              = showMarks;
     FailIfEntityDestroyed    = false;
     MakeEntityIndestructible = false;
 }
Пример #20
0
 public MyTimedObjective(StringBuilder name, MyMissionID id, StringBuilder description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, TimeSpan submissionDuration, bool isOn)
     : this(name, id, description, icon, parentMission, requiredMissions, submissionDuration)
 {
     m_isOn         = isOn;
     m_defaultState = m_isOn;
     DisplayCounter = true;
 }
Пример #21
0
        public MyMeetObjective(StringBuilder Name, MyMissionID ID, StringBuilder Description, MyMission ParentMission, MyMissionID[] RequiredMissions, uint?detectorId, uint?botId, float distanceToTalk = 50, float slowdown = 0.25f, MyDialogueEnum?successDialogueId = null, MyDialogueEnum?startDialogueId = null, bool stopFollow = true)
            : base(Name, ID, Description, null, ParentMission, RequiredMissions, null, null, successDialogueId, startDialogueId)
        {
            m_botToTalkId    = botId;
            m_botDetectorId  = detectorId;
            m_distanceToTalk = distanceToTalk;
            m_slowdown       = slowdown;
            //m_detectorDialog = detectorDialogId;

            m_stopFollow = stopFollow;
            FollowMe     = true;
        }
Пример #22
0
        public MyObjectiveRace(MyTextsWrapperEnum Name, MyTextsWrapperEnum PrepareName, MyTextsWrapperEnum goBackToStart,
                               MyMissionID ID, MyTextsWrapperEnum Description, MyTexture2D Icon, MyMission ParentMission,
                               MyMissionID[] RequiredMissions, MyMwcVector3Int sector, List <uint> Checkpoints,
                               uint detectorID, MyDialogueEnum?successDialogId = null,
                               MyDialogueEnum?startDialogId = null, bool displayObjectivesCount = true)
            :
            base(
                PrepareName, ID, Description, Icon, ParentMission, RequiredMissions, null, null, successDialogId,
                startDialogId, displayObjectivesCount)
        {
            Debug.Assert(Checkpoints != null);
            Debug.Assert(Checkpoints.Count > 0);
            m_sector         = sector;
            m_checkpointsIDs = Checkpoints;
            m_detectorID     = detectorID;

            m_normalName  = Name;
            m_prepareName = PrepareName;
            m_goBackName  = goBackToStart;
        }
Пример #23
0
 public MyObjectiveDialog(StringBuilder text, MyMissionID id, StringBuilder description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, Audio.Dialogues.MyDialogueEnum?dialogId = null)
     : base(text, id, description, icon, parentMission, requiredMissions, null, null, dialogId, null)
 {
     ShowNotificationOnSuccess = false;
 }
 public MyObjectiveEnterInventory(MyTextsWrapperEnum Name, MyMissionID ID, MyTextsWrapperEnum Description, MyTexture2D Icon, MyMission ParentMission, MyMissionID[] RequiredMissions, uint ownerId, MyDialogueEnum?successDialogId = null, MyDialogueEnum?startDialogId = null, MyActorEnum[] requiredActors = null, float?radiusOverride = null)
     : base(Name, ID, Description, Icon, ParentMission, RequiredMissions, null, null, successDialogId, startDialogId, requiredActors, radiusOverride)
 {
     MissionEntityIDs = new List <uint> {
         ownerId
     };
 }
 public MyObjectiveDisablePrefabs(MyTextsWrapperEnum name, MyMissionID id, MyTextsWrapperEnum description, MyTexture2D icon, MyMission parentMission,
                                  MyMissionID[] requiredMissions, List <uint> toDisable, List <uint> disableBy, bool displayObjectivesCount = true,
                                  bool markObjectsToDisable = true, MyDialogueEnum?successDialogId = null, MyDialogueEnum?startDialogId = null)
     : base(name, id, description, icon, parentMission, requiredMissions, null, disableBy, successDialogId, startDialogId, displayObjectivesCount: displayObjectivesCount)
 {
     m_toDisable            = toDisable;
     m_markObjectsToDisable = markObjectsToDisable;
     RequiredEntityIDs.AddRange(toDisable);
 }
Пример #26
0
 public MyMultipleObjectives(StringBuilder Name, MyMissionID ID, StringBuilder Description, MyTexture2D Icon, MyMission ParentMission, MyMissionID[] RequiredMissions, MyMissionLocation Location, List <uint> MissionEntityIDs = null, Audio.Dialogues.MyDialogueEnum?successDialogId = null, Audio.Dialogues.MyDialogueEnum?startDialogId = null, bool displayObjectivesCount = true)
     : base(Name, ID, Description, Icon, ParentMission, RequiredMissions, Location, MissionEntityIDs, successDialogId, startDialogId)
 {
     m_displayObjectivesCount = displayObjectivesCount;
     AdditionalHudInformation = new StringBuilder();
 }
Пример #27
0
 public MyObjectiveDefend(StringBuilder name, MyMissionID id, StringBuilder description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, List <uint> toKill, List <uint> toKillSpawnpoints, List <uint> toDefend, bool showMarks = true, bool displayObjectivesCount = true)
     : base(name, id, description, icon, parentMission, requiredMissions, toKill, toKillSpawnpoints, showMarks, displayObjectivesCount)
 {
     m_toDefend = toDefend;
 }
Пример #28
0
        public MyObjectiveRace(MyTextsWrapperEnum Name, MyTextsWrapperEnum PrepareName, MyTextsWrapperEnum goBackToStart,
                               MyMissionID ID, MyTextsWrapperEnum Description, MyTexture2D Icon, MyMission ParentMission,
                               MyMissionID[] RequiredMissions, MyMwcVector3Int sector, List<uint> Checkpoints,
                               uint detectorID, MyDialogueEnum? successDialogId = null,
                               MyDialogueEnum? startDialogId = null, bool displayObjectivesCount = true)
            :
                base(
                PrepareName, ID, Description, Icon, ParentMission, RequiredMissions, null, null, successDialogId,
                startDialogId, displayObjectivesCount)
        {
            Debug.Assert(Checkpoints != null);
            Debug.Assert(Checkpoints.Count > 0);
            m_sector = sector;
            m_checkpointsIDs = Checkpoints;
            m_detectorID = detectorID;

            m_normalName = Name;
            m_prepareName = PrepareName;
            m_goBackName = goBackToStart;
        }
 public MyTimedReachLocationObjective(MyTextsWrapperEnum name, MyMissionID id, MyTextsWrapperEnum description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, TimeSpan submissionDuration, MyMissionLocation location)
     : base(name, id, description, icon, parentMission, requiredMissions, location)
 {
     m_submissionDuration = submissionDuration;
     m_remainingTime = submissionDuration;
 }
Пример #30
0
 public MyObjectiveGetItems(MyTextsWrapperEnum name, MyMissionID id, MyTextsWrapperEnum description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, List <MyItemToGetDefinition> itemsToGet, List <uint> getFrom)
     : base(name, id, description, icon, parentMission, requiredMissions, null, getFrom)
 {
     m_itemsToGet = itemsToGet;
 }
Пример #31
0
 public MyObjectiveGetItems(MyTextsWrapperEnum name, MyMissionID id, MyTextsWrapperEnum description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, List<MyItemToGetDefinition> itemsToGet, List<uint> getFrom)
     : base(name, id, description, icon, parentMission, requiredMissions, null, getFrom)
 {
     m_itemsToGet = itemsToGet;
 }
Пример #32
0
 public MyTimedReachLocationObjective(MyTextsWrapperEnum name, MyMissionID id, MyTextsWrapperEnum description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, TimeSpan submissionDuration, MyMissionLocation location)
     : base(name, id, description, icon, parentMission, requiredMissions, location)
 {
     m_submissionDuration = submissionDuration;
     m_remainingTime      = submissionDuration;
 }
Пример #33
0
        public MyGuiScreenMission(MyMission missionBase, bool canDecline = true)
            : base(new Vector2(0.5f, 0.5f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, new Vector2(0.75f, 0.75f))
        {
            Debug.Assert(missionBase != null);
            m_mission = missionBase;
            m_backgroundTexture = MyTextureManager.GetTexture<MyTexture2D>("Textures\\GUI\\BackgroundScreen\\MissionAcceptBackground", flags: TextureFlags.IgnoreQuality);
            m_size = new Vector2(1010/1600f,855/1200f);

            // Title
            var titleLabel = new MyGuiControlLabel(
                            this,
                            new Vector2(0, -0.3052f),
                            null,
                            MyTextsWrapperEnum.Mission,
                            MyGuiConstants.LABEL_TEXT_COLOR,
                            MyGuiConstants.SCREEN_CAPTION_TEXT_SCALE,
                            MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER);
            // append mission name to the title of the screen
            titleLabel.UpdateParams(new[] { missionBase.Name });
            Controls.Add(titleLabel);

            // mission description on the left
            Controls.Add(new MyGuiControlLabel(
                                this, 
                                new Vector2(-m_size.Value.X / 4.5f, -0.2501f),
                                null, MyTextsWrapperEnum.Description,
                                MyGuiConstants.LABEL_TEXT_COLOR, .8f,
                                MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER));



            var multiLineText = new MyGuiControlMultilineText(
                this,
                new Vector2(-m_size.Value.X/4.5f - 28/1600f, -0.0167f),
                new Vector2(370/1600f, 489/1200f),
                null,
                MyGuiManager.GetFontMinerWarsBlue(), .66f,
                MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP,
                m_mission.DescriptionTemp, false, true);


            Controls.Add(multiLineText);
            multiLineText.ScrollbarOffset = 71/1600f;

  
            // mission objectives (submissions) on the right
            Controls.Add(new MyGuiControlLabel(
                                this,
                                new Vector2(m_size.Value.X / 4.5f, -0.2501f),
                                null, MyTextsWrapperEnum.Objectives,
                                MyGuiConstants.LABEL_TEXT_COLOR, .8f,
                                MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER));

            var objectives = new StringBuilder();
            foreach (MyObjective t in m_mission.Objectives)
            {

                    objectives.Append("- ");
                    objectives.Append(t.DescriptionTemp.ToString());
                    objectives.AppendLine("\n");
                    //objectives.AppendLine();
            }

            var textControl = new MyGuiControlMultilineText(
                this,
                new Vector2(m_size.Value.X/4.5f - 28/1600f, -0.0167f),
                new Vector2(370/1600f, 489/1200f),
                null,
                MyGuiManager.GetFontMinerWarsBlue(), .66f,
                MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP,
                objectives, false, true) {ScrollbarOffset = 64/1600f};


            Controls.Add(textControl);

            textControl.Clear();
            textControl.AppendText(objectives);


            var okButton = new MyGuiControlButton(this, new Vector2(-0.1379f, 0.2489f), MyGuiConstants.OK_BUTTON_SIZE,
               MyGuiConstants.BUTTON_BACKGROUND_COLOR,
               MyGuiManager.GetInventoryScreenButtonTexture(), null, null, MyTextsWrapperEnum.Accept,
               MyGuiConstants.BUTTON_TEXT_COLOR, MyGuiConstants.BUTTON_TEXT_SCALE, MyGuiControlButtonTextAlignment.CENTERED, OnAccept_Click,
               true, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, true, true);
            Controls.Add(okButton);




            // decline button
            if (canDecline)
            {
                var declineButton = new MyGuiControlButton(this, new Vector2(0.1379f, 0.2489f), MyGuiConstants.OK_BUTTON_SIZE,
                   MyGuiConstants.BUTTON_BACKGROUND_COLOR,
                   MyGuiManager.GetInventoryScreenButtonTexture(), null, null, MyTextsWrapperEnum.Decline,
                   MyGuiConstants.BUTTON_TEXT_COLOR, MyGuiConstants.BUTTON_TEXT_SCALE, MyGuiControlButtonTextAlignment.CENTERED, OnDecline_Click,
                   true, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, true, true);
                Controls.Add(declineButton);


            }
            else
            {
                m_closeOnEsc = canDecline;
            }
        }
Пример #34
0
 public MyObjectiveDefend(StringBuilder name, MyMissionID id, StringBuilder description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, List<uint> toKill, List<uint> toKillSpawnpoints, List<uint> toDefend, bool showMarks = true, bool displayObjectivesCount = true)
     : base(name, id, description, icon, parentMission, requiredMissions, toKill, toKillSpawnpoints, showMarks, displayObjectivesCount)
 {
     m_toDefend = toDefend;
 }
Пример #35
0
 public MyTimedObjective(StringBuilder name, MyMissionID id, StringBuilder description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, TimeSpan submissionDuration, MyDialogueEnum? successDialogId = null, MyDialogueEnum? startDialogId = null)
     : base(name, id, description, icon, parentMission, requiredMissions, null, null, successDialogId, startDialogId)
 {
     SubmissionDuration = submissionDuration;
     DisplayCounter = true;
 }
Пример #36
0
 public MyObjectiveDialog(StringBuilder text, MyMissionID id, StringBuilder description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, Audio.Dialogues.MyDialogueEnum? dialogId = null)
     : base(text, id, description, icon, parentMission, requiredMissions, null, null, dialogId, null)
 {
     ShowNotificationOnSuccess = false;
 }
Пример #37
0
        public MyObjective( MyTextsWrapperEnum name,
                            MyMissionID missionId,
                            MyTextsWrapperEnum description,
                            MyTexture2D icon,
                            MyMission parentMission,
                            MyMissionID[] requiredMissions,
                            MyMissionLocation location,
                            List<uint> missionEntityIDs = null,
                            MyDialogueEnum? successDialogId = null,
                            MyDialogueEnum? startDialogId = null,
                            MyActorEnum[] requiredActors = null,
                            float? radiusOverride = null)
            : this(MyTextsWrapper.Get(name), missionId, MyTextsWrapper.Get(description), icon, parentMission, requiredMissions, location, missionEntityIDs, successDialogId,
            startDialogId, requiredActors, radiusOverride)

        {
        }
 public MyObjectiveEnterInventory(MyTextsWrapperEnum Name, MyMissionID ID, MyTextsWrapperEnum Description, MyTexture2D Icon, MyMission ParentMission, MyMissionID[] RequiredMissions, uint ownerId, MyDialogueEnum? successDialogId = null, MyDialogueEnum? startDialogId = null, MyActorEnum[] requiredActors = null, float? radiusOverride = null)
     : base(Name, ID, Description, Icon, ParentMission, RequiredMissions, null, null, successDialogId, startDialogId, requiredActors, radiusOverride)
 {
     MissionEntityIDs = new List<uint> { ownerId };
 }
Пример #39
0
 public MyObjectiveDestroy(MyTextsWrapperEnum name, MyMissionID id, MyTextsWrapperEnum description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, List<uint> toKill, bool displayObjectivesCount = true, MyDialogueEnum? successDialogID = null, MyDialogueEnum? startDialogID = null)
     : this(name, id, description, icon, parentMission, requiredMissions, toKill, new List<uint>(), true, displayObjectivesCount, successDialogID, startDialogID)
 {
 }
Пример #40
0
        //static void Draw()
        //{
        //    // Dont draw cubes in editor etc.
        //    if (!MyGuiScreenGamePlay.Static.IsGameActive())
        //    {
        //        return;
        //    }

        //    Matrix world = Matrix.Identity;
        //    Vector4 vctColorPoly = MyHudConstants.MISSION_CUBE_COLOR;

        //    BoundingBox boundingBox = new BoundingBox(-Vector3.One * MyMissionsConstants.MISSION_CUBE_SIZE_HALF, Vector3.One * MyMissionsConstants.MISSION_CUBE_SIZE_HALF); 
            
        //    // Draw cubes for available missions
        //    var availableMissions = GetAvailableMissions();
        //    foreach (var mission in availableMissions)
        //    {
        //        if (mission.Location != null && 
        //            (MySession.Static == null || mission != MySession.Static.ActiveMission) && 
        //            MyGuiScreenGamePlay.Static.IsCurrentSector(mission.Location.Sector))
        //        {
        //            world = Matrix.CreateTranslation(mission.Location.Location);
        //            MySimpleObjectDraw.DrawTransparentBox(ref world, ref boundingBox, ref vctColorPoly, true, 1);
        //        }
        //    }

        //    // Draw cubes for active submissions
        //    if (MySession.Static != null && MySession.Static.ActiveMission != null)
        //    {
        //        foreach (var activeSubMission in MySession.Static.ActiveMission.ActiveSubmissions)
        //        {
        //            if (activeSubMission.Location != null && MyGuiScreenGamePlay.Static.IsCurrentSector(activeSubMission.Location.Sector))
        //            {
        //                world = Matrix.CreateTranslation(activeSubMission.Location.Location);
        //                MySimpleObjectDraw.DrawTransparentBox(ref world, ref boundingBox, ref vctColorPoly, true, 1);
        //            }
        //        }
        //    }
        //}

        public static void AddMission(MyMission mission)
        {
            Debug.Assert(mission.RequiredMissions != null, "Required mission cannot be null");
            Debug.Assert(mission.IsValid(), "Mission is not valid! For mission without objectives use MyMissionSandboxBase and for mission with objectives use MyMission!");

            // Write a list of missions and objectives into a file.

            //System.IO.StreamWriter file = new System.IO.StreamWriter("c:\\mission_list.txt", append:true);
            //file.WriteLine(MyTextsWrapper.Get(mission.Name) + " (" + mission.DebugName + ")");

            m_missions.Add((int)mission.ID, mission);
            foreach (var objective in mission.Objectives)
            {
                System.Diagnostics.Debug.Assert(!m_missions.ContainsKey((int)objective.ID), string.Format("Objective {0} already added!", objective.NameTemp));
                m_missions.Add((int)objective.ID, objective);
                //file.WriteLine(objective.ID + "\t" + objective.GetType() + "\t" + objective.NameTemp);
            }
            //file.WriteLine("");
            //file.Close();
        }
Пример #41
0
 public MyObjectiveDefend(StringBuilder name, MyMissionID id, StringBuilder description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, List<uint> toKill, List<uint> toDefend, bool displayObjectivesCount = true)
     : this(name, id, description, icon, parentMission, requiredMissions, toKill, new List<uint>(), toDefend, true, displayObjectivesCount)
 {
 }
Пример #42
0
 public static bool IsNewMissionOrObjectiveAvailable()
 {
     if (ActiveMission != null)
     {
         if(ActiveMission.ActiveObjectives.Count > 0 &&
             (ActiveMission.ActiveObjectives[0].GetObjectiveStartTime() + MyMissionsConstants.NEW_OBJECTIVE_FOR_TIME) >= MyMinerGame.TotalGamePlayTimeInMilliseconds)
         {
             return true;
         }
     }
     else
     {
         MyMission firstAvailableMission = GetAvailableMissions().Count > 0 ? GetAvailableMissions()[0] : null;
         if (firstAvailableMission != m_availableMissionLastTime)
         {
             m_availableMissionLastTime = firstAvailableMission;
             m_newMissionAvailableLastTime = MyMinerGame.TotalGamePlayTimeInMilliseconds;
         }
         if (m_availableMissionLastTime != null && m_newMissionAvailableLastTime + MyMissionsConstants.NEW_OBJECTIVE_FOR_TIME >= MyMinerGame.TotalGamePlayTimeInMilliseconds)
         {
             return true;
         }
     }
     return false;
 }
Пример #43
0
 public MyObjectiveDialog(MyMissionID id, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, Audio.Dialogues.MyDialogueEnum? dialogId = null) 
     : base(MyTextsWrapperEnum.Null, id, MyTextsWrapperEnum.Null, icon, parentMission, requiredMissions, null, null, dialogId, null)
 {
     ShowNotificationOnSuccess = false;
 }
Пример #44
0
 public static void AddSandboxMission(MyMission mission)
 {
     Debug.Assert(mission.Location != null, "Sandbox mission must have one location (one sector)");
     m_sandboxMissions.Add(mission.Location.Sector, mission);
 }
Пример #45
0
 public MyObjectiveDialog(MyMissionID id, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, Audio.Dialogues.MyDialogueEnum?dialogId = null)
     : base(MyTextsWrapperEnum.Null, id, MyTextsWrapperEnum.Null, icon, parentMission, requiredMissions, null, null, dialogId, null)
 {
     ShowNotificationOnSuccess = false;
 }
 public MyObjectiveGetToLocations(StringBuilder Name, MyMissionID ID, StringBuilder Description, MyTexture2D Icon, MyMission ParentMission, MyMissionID[] RequiredMissions, List <MyMissionLocation> DummiesToVisit, Audio.Dialogues.MyDialogueEnum?successDialogId = null, Audio.Dialogues.MyDialogueEnum?startDialogId = null, bool displayObjectivesCount = true) :
     base(Name, ID, Description, Icon, ParentMission, RequiredMissions, null, null, successDialogId, startDialogId, displayObjectivesCount)
 {
     Debug.Assert(DummiesToVisit != null);
     Debug.Assert(DummiesToVisit.Count > 0);
     m_dummiesToVisit = DummiesToVisit;
     m_dummiesVisited = new List <MyMissionLocation>();
 }
Пример #47
0
 public MyMeetObjective(MyTextsWrapperEnum Name, MyMissionID ID, MyTextsWrapperEnum Description, MyMission ParentMission, MyMissionID[] RequiredMissions, uint?detectorId, string botName, float distanceToTalk = 50, float slowdown = 0.25f, MyDialogueEnum?successDialogueId = null, MyDialogueEnum?startDialogueId = null, bool stopFollow = true)
     : base(Name, ID, Description, null, ParentMission, RequiredMissions, null, null, successDialogueId, startDialogueId)
 {
     m_botDetectorId  = detectorId;
     m_distanceToTalk = distanceToTalk;
     m_slowdown       = slowdown;
     //m_detectorDialog = detectorDialogId;
     m_stopFollow          = stopFollow;
     m_constructorFromName = true;
     m_botName             = botName;
     FollowMe = true;
 }
Пример #48
0
 public MyTimedObjective(StringBuilder name, MyMissionID id, StringBuilder description, MyTexture2D icon, MyMission parentMission, MyMissionID[] requiredMissions, TimeSpan submissionDuration, MyDialogueEnum?successDialogId = null, MyDialogueEnum?startDialogId = null)
     : base(name, id, description, icon, parentMission, requiredMissions, null, null, successDialogId, startDialogId)
 {
     SubmissionDuration = submissionDuration;
     DisplayCounter     = true;
 }