A32X: Save suprise

This commit is contained in:
Joshua Davidson 2017-10-05 13:09:50 -04:00
parent 53886bd79c
commit df94b3892e
3 changed files with 9 additions and 2 deletions

View file

@ -592,6 +592,7 @@
<tray n="0">
<lefttrayext type="double">0</lefttrayext>
<righttrayext type="double">0</righttrayext>
<suprise userarchive="y" type="bool">0</suprise>
</tray>
</controls>

View file

@ -99,7 +99,7 @@ var error_mismatch = gui.Dialog.new("sim/gui/dialogs/acconfig/error/mismatch/dia
spinning.start();
init_dlg.open();
http.load("https://raw.githubusercontent.com/it0uchpods/A320Family/master/revision.txt").done(func(r) setprop("/systems/acconfig/new-revision", r.response));
http.load("https://raw.githubusercontent.com/it0uchpods/IDG-A32X/master/revision.txt").done(func(r) setprop("/systems/acconfig/new-revision", r.response));
var revisionFile = (getprop("/sim/aircraft-dir")~"/revision.txt");
var current_revision = io.readfile(revisionFile);
@ -143,7 +143,7 @@ setlistener("/sim/signals/fdm-initialized", func {
});
var saveSettings = func {
aircraft.data.add("/options/system/keyboard-mode", "/controls/adirs/skip");
aircraft.data.add("/options/system/keyboard-mode", "/controls/adirs/skip", "/controls/tray/surprise");
aircraft.data.save();
}

View file

@ -5845,6 +5845,12 @@
<command>property-toggle</command>
<property>controls/tray/surprise</property>
</binding>
<binding>
<command>nasal</command>
<script>
acconfig.saveSettings();
</script>
</binding>
</action>
</animation>