From 45f1701687a4d94aa0846e66df1f42df80ec7194 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Tue, 6 Feb 2018 19:45:31 -0500 Subject: [PATCH] A3XX: Update Error system --- AircraftConfig/acconfig.nas | 13 +- AircraftConfig/error-mismatch.xml | 58 +-- Models/FlightDeck/a320.flightdeck.xml | 48 -- Models/Instruments/Common/res/mismatch.svg | 485 +++++++++++++++++++++ Models/Instruments/PFD/Mismatch.xml | 20 - Models/Instruments/PFD/PFD.nas | 135 ++++-- Models/Instruments/PFD/res/mismatch.ac | 23 - Models/Instruments/PFD/res/mismatch.png | Bin 18754 -> 0 bytes revision.txt | 2 +- 9 files changed, 609 insertions(+), 175 deletions(-) create mode 100644 Models/Instruments/Common/res/mismatch.svg delete mode 100644 Models/Instruments/PFD/Mismatch.xml delete mode 100644 Models/Instruments/PFD/res/mismatch.ac delete mode 100644 Models/Instruments/PFD/res/mismatch.png diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index 5ce8569d..76f32e84 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -115,18 +115,25 @@ setlistener("/systems/acconfig/new-revision", func { var mismatch_chk = func { if (num(string.replace(getprop("/sim/version/flightgear"),".","")) < 201730) { setprop("/systems/acconfig/mismatch-code", "0x121"); - setprop("/systems/acconfig/mismatch-reason", "FGFS version older than 2017.3.0, please update FlightGear"); + setprop("/systems/acconfig/mismatch-reason", "FGFS version older than 2017.3.0, please update FlightGear."); if (getprop("/systems/acconfig/out-of-date") != 1) { error_mismatch.open(); } print("Mismatch: 0x121"); - } else if (getprop("/gear/gear[0]/wow") == 0 or getprop("/position/altitude-ft") >= 50000 or getprop("/systems/acconfig/libraries-loaded") != 1) { + } else if (getprop("/gear/gear[0]/wow") == 0 or getprop("/position/altitude-ft") >= 15000) { setprop("/systems/acconfig/mismatch-code", "0x223"); - setprop("/systems/acconfig/mismatch-reason", "Aircraft initialization failed"); + setprop("/systems/acconfig/mismatch-reason", "The aircraft position is invalid for initialization. Check your scenery."); if (getprop("/systems/acconfig/out-of-date") != 1) { error_mismatch.open(); } print("Mismatch: 0x223"); + } else if (getprop("/systems/acconfig/libraries-loaded") != 1) { + setprop("/systems/acconfig/mismatch-code", "0x247"); + setprop("/systems/acconfig/mismatch-reason", "System files are missing or damaged. Please download a new copy of the aircraft."); + if (getprop("/systems/acconfig/out-of-date") != 1) { + error_mismatch.open(); + } + print("Mismatch: 0x247"); } } diff --git a/AircraftConfig/error-mismatch.xml b/AircraftConfig/error-mismatch.xml index b2bd8c4a..f0da0ce8 100644 --- a/AircraftConfig/error-mismatch.xml +++ b/AircraftConfig/error-mismatch.xml @@ -41,11 +41,11 @@ left - + left - + @@ -88,32 +88,6 @@ 1 - - - - 1.0 - 1.0 - 1.0 - 0.9 - - - - - left - - - - left - - - - left - - - - left - - @@ -127,38 +101,16 @@ hbox - -