From 13d661ec6eb260b02f00ef14d5fde4e4a2ad4f01 Mon Sep 17 00:00:00 2001 From: Blank_Alt <12406-Blank_Alt@users.noreply.gitgud.io> Date: Tue, 18 May 2021 15:50:34 +1200 Subject: [PATCH] debugModeEventSelection --- js/003-data/gameVariableData.js | 1 + src/002-config/fc-version.js | 2 +- src/events/nonRandomEvent.js | 2 +- src/gui/options/options.js | 10 ++++++++-- src/uncategorized/randomIndividualEvent.tw | 2 +- src/uncategorized/randomNonindividualEvent.tw | 2 +- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index e1cebc9bf31..ce97e37f3e6 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -76,6 +76,7 @@ App.Data.defaultGameStateVariables = { dangerousPregnancy: 0, debugMode: 0, debugModeCustomFunction: 0, + debugModeEventSelection: 0, difficultySwitch: 0, disableLisping: 0, displayAssignments: 1, diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js index 5d0c318ff34..b51ecbc0720 100644 --- a/src/002-config/fc-version.js +++ b/src/002-config/fc-version.js @@ -2,5 +2,5 @@ App.Version = { base: "0.10.7.1", // The vanilla version the mod is based off of, this should never be changed. pmod: "3.9.6", commitHash: null, - release: 1128 // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. + release: 1129 // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. }; diff --git a/src/events/nonRandomEvent.js b/src/events/nonRandomEvent.js index 7f4d2661dc7..279e9a13162 100644 --- a/src/events/nonRandomEvent.js +++ b/src/events/nonRandomEvent.js @@ -155,7 +155,7 @@ App.Events.playNonrandomEvent = function() { V.event.execute(d); V.passageSwitchHandler = clearEvent; } else { - if (V.cheatMode) { + if (V.debugMode > 0 && V.debugModeEventSelection) { V.nextButton = "Refresh"; // show all the scheduled, nonrandom, and queued events, and allow the cheater to play them in any order and skip the remainder App.UI.DOM.appendNewElement("h2", d, "Scheduled and Nonrandom Events"); diff --git a/src/gui/options/options.js b/src/gui/options/options.js index 6a7cffa5646..a7f30d1f456 100644 --- a/src/gui/options/options.js +++ b/src/gui/options/options.js @@ -507,13 +507,19 @@ App.UI.optionsPassage = function() { options.addOption("DebugMode is", "debugMode") .addValue("Enabled", 1).on().addValue("Disabled", 0).off() - .addComment("This will add a Display Variables and Bug Report passage to the sidebar."); + .addComment("This will add passages to Display Variables and create Bug Reports to the sidebar."); + el.append(options.render()); if (V.debugMode > 0) { + options = new App.UI.OptionsGroup(); options.addOption("The custom function part of debug mode is", "debugModeCustomFunction") .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + options.addOption("Event selection is", "debugModeEventSelection") + .addValue("Manual", 1).on().addValue("Automatic", 0).off(); + App.UI.DOM.appendNewElement("div", el, options.render(), "indent"); } + options = new App.UI.OptionsGroup(); option = options.addCustomOption("Genetics array") .addButton("Run test", () => { }, "test genetics"); if (V.cheatMode === 1) { @@ -536,7 +542,7 @@ App.UI.optionsPassage = function() { options.addOption("CheatMode is", "cheatMode") .addValue("Enabled", 1).on().addValue("Disabled", 0).off() - .addComment("This will allow manual selection of events and unlock some options that would usually be restricted by progress."); + .addComment("This will unlock some options that would usually be restricted by progress."); if (V.cheatMode === 0) { el.append(options.render()); diff --git a/src/uncategorized/randomIndividualEvent.tw b/src/uncategorized/randomIndividualEvent.tw index fca571696d4..6b15291a9f4 100644 --- a/src/uncategorized/randomIndividualEvent.tw +++ b/src/uncategorized/randomIndividualEvent.tw @@ -1,7 +1,7 @@ :: Random Individual Event [nobr] <<if $eventSlave == 0>> - <<if $cheatMode == 1>> + <<if $debugMode > 0 && $debugModeEventSelection == 1>> <<set $nextButton = "Refresh", $nextLink = "Random Individual Event", $returnTo = "Random Individual Event", $encyclopedia = "Random Events">> <<link "Skip week-end events" "Next Week">><</link>> diff --git a/src/uncategorized/randomNonindividualEvent.tw b/src/uncategorized/randomNonindividualEvent.tw index dc7ae13b84a..dc1466a307a 100644 --- a/src/uncategorized/randomNonindividualEvent.tw +++ b/src/uncategorized/randomNonindividualEvent.tw @@ -2,7 +2,7 @@ <<if $eventSlave == 0>> <<set $eventSlave = $slaves.random()>> - <<if $cheatMode == 1>> + <<if $debugMode > 0 && $debugModeEventSelection == 1>> <<set $nextButton = "Refresh", $nextLink = "Random Nonindividual Event", $returnTo = "Random Nonindividual Event", $encyclopedia = "Random Events">> <<link "Skip week-end events" "Next Week">><</link>> -- GitLab