Skip to content

Commit

Permalink
Fix difficulty resetting when going into options from pause
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahJack committed Dec 22, 2023
1 parent 63a4a64 commit 1dbf9a8
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Assets/Scripts/MainMenuHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -498,22 +498,18 @@ void Update() {
}

UpdateConfigTabTextColor();
Const.a.difficultyCombat = combat.difficultySetting;
Const.a.difficultyMission = mission.difficultySetting;
Const.a.difficultyPuzzle = puzzle.difficultySetting;
Const.a.difficultyCyber = cyber.difficultySetting;
}

public void StartGame (bool isNew) {
Utils.PlayOneShotSavable(StartSFX,StartGameSFX);
Const.a.difficultyCombat = combat.difficultySetting;
Const.a.difficultyMission = mission.difficultySetting;
Const.a.difficultyPuzzle = puzzle.difficultySetting;
Const.a.difficultyCyber = cyber.difficultySetting;
if (isNew) {
string pname = newgamePage.GetComponentInChildren<InputField>(true).text;
if (string.IsNullOrWhiteSpace(pname)) pname = "Hacker";
Const.a.playerName = pname;
Const.a.difficultyCombat = combat.difficultySetting;
Const.a.difficultyMission = mission.difficultySetting;
Const.a.difficultyPuzzle = puzzle.difficultySetting;
Const.a.difficultyCyber = cyber.difficultySetting;
Const.a.NewGame();
}

Expand Down

0 comments on commit 1dbf9a8

Please sign in to comment.