Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add KeepBranchesOnMailMissionCompletion #226

Merged
merged 2 commits into from
Nov 18, 2023

Conversation

Fayti1703
Copy link
Contributor

This fixes a base-game issue where completing a branch mission via a MailServer erroneously clears out the branch missions of the next mission.

The short of it is: we delete these lines from Hacknet.MailServer->doRespondDisplay:

          for (int index = 0; index < this.os.branchMissions.Count && !flag; ++index)
          {
            flag = this.attemptCompleteMission(this.os.branchMissions[index]);
            // ------------------------ >8 ------------------------
            if (flag)
              this.os.branchMissions.Clear();
            // ------------------------ >8 ------------------------
          }

Note that if attemptCompleteMission returns true, the OS's activeMission and branchMissions have already been set to the values for the next mission by the mission completion code.


Compatibility impact

The changes from this PR fix an issue with the base game's "ThemeHack"/"Naix" missions.

Extension behavior may also be altered, though I'm not aware of any Extensions intentionally using this behavior. Conversely, I am aware of one in-development Extension that includes a workaround for this issue.

This fixes a base-game issue where completing a branch mission
via a MailServer erroneously clears out the branch missions of the
*next* mission.
@Arkhist Arkhist merged commit 3477a46 into Arkhist:develop Nov 18, 2023
@Arkhist Arkhist added this to the 5.3.3 milestone Jan 26, 2024
@Fayti1703 Fayti1703 deleted the feature/fix-mail-branch branch June 3, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants