From a4d4a22967d8f9eab39d97f5a045abf1c0fce049 Mon Sep 17 00:00:00 2001 From: Blank <blank@national.shitposting.agency> Date: Sun, 9 Jun 2019 21:00:51 -0700 Subject: [PATCH] subDebugOption --- src/uncategorized/options.tw | 8 ++++++++ src/uncategorized/storyCaption.tw | 28 +++++++++++++++------------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/uncategorized/options.tw b/src/uncategorized/options.tw index 160137053b3..07490a74dd1 100644 --- a/src/uncategorized/options.tw +++ b/src/uncategorized/options.tw @@ -593,6 +593,14 @@ Assignment performance vignettes on the end week report are <br> <<if ($debugMode == 1)>> Debug Mode is currently @@.cyan;ENABLED.@@ [[Disable|Options][$debugMode = 0]] + <<if ndef $debugModeCustomFunction>> <<set $debugModeCustomFunction = 0>> <</if>> + <br>The custom function part of debug mode is currently + <<if $debugModeCustomFunction > 0>> + @@.cyan;ENABLED.@@ [[Disable|Options][$debugModeCustomFunction = 0]] + <<else>> + @@.red;DISABLED.@@ [[Disable|Options][$debugModeCustomFunction = 1]] + <</if>> + <br> <<else>> Debug Mode is currently @@.red;DISABLED.@@ [[Enable|Options][$debugMode = 1]] //This will add a Display Variables and Bug Report passage to the sidebar.// diff --git a/src/uncategorized/storyCaption.tw b/src/uncategorized/storyCaption.tw index ce8b1670522..02c282dd5e2 100644 --- a/src/uncategorized/storyCaption.tw +++ b/src/uncategorized/storyCaption.tw @@ -832,20 +832,22 @@ <</link>> <br> <<link "Bug Report">><<bugreport>><</link>> - <br> - <<textarea "_customEvalCode" "">> - <<link "Run Custom Function">> - <<if _customEvalCode>> - <<if _customEvalCode.charAt(0) != "(" || $nextLink == ")">> /* second condition is only there for sanityCheck */ - <<set _customEvalCode = "(" + _customEvalCode + ")">> - <</if>> - <<if typeof eval(_customEvalCode) === "function">> - <<run (eval(_customEvalCode))()>> + <<if $debugModeCustomFunction > 0>> + <br> + <<textarea "_customEvalCode" "">> + <<link "Run Custom Function">> + <<if _customEvalCode>> + <<if _customEvalCode.charAt(0) != "(" || $nextLink == ")">> /* second condition is only there for sanityCheck */ + <<set _customEvalCode = "(" + _customEvalCode + ")">> + <</if>> + <<if typeof eval(_customEvalCode) === "function">> + <<run (eval(_customEvalCode))()>> + <</if>> <</if>> - <</if>> - <<goto _Pass>> - <</link>> - <br> + <<goto _Pass>> + <</link>> + <br> + <</if>> <<link "Dump Game State">><<run App.Debug.dumpGameState()>><</link>> <</if>> -- GitLab