Showing 1 changed files with 4 additions and 0 deletions
+4
Nasal/afcs.nas
... ...
@@ -39,6 +39,10 @@ var APClass = {
39 39
 
40 40
         ap_annun = nil;
41 41
         ap_systems = nil;
42
+        # delete unused systems
43
+        foreach (var e; keys(m.systems))
44
+            if (e != m.system)
45
+                delete(m.systems, e);
42 46
 
43 47
         if (contains(m.systems[m.system], 'hook') and typeof(m.systems[m.system].hook) == 'func')
44 48
                 m.systems[m.system].hook();