diff --git a/Docs/README.checklists b/Docs/README.checklists
index 18cf1db59..17c97e7f3 100644
--- a/Docs/README.checklists
+++ b/Docs/README.checklists
@@ -12,10 +12,12 @@ or /sim/checklists/group[n]/checklist[m]
with the following tags
- Name of the checklist
+ - Whether a tutorial should be automatically generated (true, default)
+ or not (false).
- Zero or more pages for the checklist containing:
- - One or more checklist items containing:
- name of the checklist item (e.g. Carb Heat), to appear on the left
- - One or more values for the checklist item, to appear on the right
+ - One or more values for the checklist item, to appear on the right
hand side
- A tutorial marker (displayed when the user presses the ? button)
This can be easily placed using the Help->Display Tutorial Marker.
@@ -29,16 +31,21 @@ with the following tags
The tag may be omitted for single-page checklists, with the
- tags
immediately under the node.
+Tutorial auto-generation of all checklists can be disabled by setting
+/sim/checklists/auto-tutorials=false.
+
Checklists may be grouped under nodes with a tag decribing the
group. For example
Emergency
+ false
...
...
Normal
+ true
...
...
diff --git a/Nasal/checklist.nas b/Nasal/checklist.nas
index 569230fa7..85c5ebeba 100644
--- a/Nasal/checklist.nas
+++ b/Nasal/checklist.nas
@@ -4,6 +4,8 @@
var convert_checklists = func {
if (props.globals.getNode("/sim/checklists") == nil) return;
+ var autoTutorials = props.globals.getNode("/sim/checklists/auto-tutorials");
+ if (autoTutorials != nil and !autoTutorials.getBoolValue()) return;
var tutorials = props.globals.getNode("/sim/tutorials", 1);
var groups = props.globals.getNode("/sim/checklists").getChildren("group");
@@ -11,6 +13,9 @@ var convert_checklists = func {
if (size(groups) > 0) {
foreach (var grp; groups) {
+ var allowed = grp.getNode("auto-tutorial");
+ if (allowed != nil and !allowed.getBoolValue()) continue;
+
var checks = grp.getChildren("checklist");
foreach (var chk; checks) {
append(checklists, chk);
@@ -21,10 +26,13 @@ var convert_checklists = func {
}
if (size(checklists) == 0) return;
-
foreach (var ch; checklists) {
var name = ch.getNode("title", 1).getValue();
- var tutorial = tutorials.getNode("tutorial[" ~ size(tutorials.getChildren("tutorial")) ~ "]", 1);
+
+ var allowed = ch.getNode("auto-tutorial");
+ if (allowed != nil and !allowed.getBoolValue()) continue;
+
+ var tutorial = tutorials.addChild("tutorial");
# Initial high level config
tutorial.getNode("name", 1).setValue("Checklist: " ~ name);