1
0
Fork 0

Introduce "PRESERVE" flag to protect properties on sim reset.

Protect values of some specific properties on sim-reset.
This commit is contained in:
ThorstenB 2011-06-12 20:40:11 +02:00
parent f84ce36d90
commit b8eecab9cf
3 changed files with 12 additions and 10 deletions

View file

@ -400,6 +400,7 @@ The flags printed after the node type have the following meaning:
W -> trace write operations W -> trace write operations
A -> archive bit set A -> archive bit set
U -> user archive bit set U -> user archive bit set
P -> preserved bit set (value is preserved on sim-reset)
T -> property is "tied" T -> property is "tied"
Ln -> number of listeners attached to this node Ln -> number of listeners attached to this node

View file

@ -134,8 +134,9 @@ var attributes = func(p, verbose = 1) {
var W = p.getAttribute("trace-write") ? "W" : ""; var W = p.getAttribute("trace-write") ? "W" : "";
var A = p.getAttribute("archive") ? "A" : ""; var A = p.getAttribute("archive") ? "A" : "";
var U = p.getAttribute("userarchive") ? "U" : ""; var U = p.getAttribute("userarchive") ? "U" : "";
var P = p.getAttribute("preserve") ? "P" : "";
var T = p.getAttribute("tied") ? "T" : ""; var T = p.getAttribute("tied") ? "T" : "";
var attr = r ~ w ~ R ~ W ~ A ~ U ~ T; var attr = r ~ w ~ R ~ W ~ A ~ U ~ P ~ T;
var type = "(" ~ p.getType(); var type = "(" ~ p.getType();
if (size(attr)) if (size(attr))
type ~= ", " ~ attr; type ~= ", " ~ attr;

View file

@ -39,29 +39,29 @@ Started September 2000 by David Megginson, david@megginson.com
<intl include="Translations/locale.xml"/> <intl include="Translations/locale.xml"/>
<aircraft>c172p</aircraft> <aircraft>c172p</aircraft>
<virtual-cockpit type="bool">false</virtual-cockpit> <virtual-cockpit type="bool">false</virtual-cockpit>
<presets> <presets preserve="y">
<airport-id>KSFO</airport-id> <airport-id>KSFO</airport-id>
<runway></runway> <runway></runway>
<trim type="bool">true</trim> <trim type="bool">true</trim>
</presets> </presets>
<startup> <startup>
<xsize type="int">800</xsize> <xsize type="int" preserve="y">800</xsize>
<ysize type="int">600</ysize> <ysize type="int" preserve="y">600</ysize>
<splash-screen type="bool">true</splash-screen> <splash-screen type="bool">true</splash-screen>
<splash-progress type="bool">true</splash-progress> <splash-progress type="bool">true</splash-progress>
<splash-title> <splash-title>
<!-- --> <!-- -->
</splash-title> </splash-title>
<intro-music type="bool">false</intro-music> <intro-music type="bool">false</intro-music>
<game-mode type="bool">false</game-mode> <game-mode type="bool" preserve="y">false</game-mode>
<fullscreen type="bool">false</fullscreen> <fullscreen type="bool" preserve="y">false</fullscreen>
<units>feet</units> <units>feet</units>
<save-on-exit type="bool" <save-on-exit type="bool"
userarchive="y">true</save-on-exit> userarchive="y">true</save-on-exit>
<browser-app write="n">firefox -new-tab "%u"</browser-app> <browser-app write="n">firefox -new-tab "%u"</browser-app>
<!-- help viewer; only used under Unix --> <!-- help viewer; only used under Unix -->
<terminal-ansi-colors type="bool">true</terminal-ansi-colors> <terminal-ansi-colors type="bool">true</terminal-ansi-colors>
<season type="string">summer</season> <season type="string" preserve="y">summer</season>
</startup> </startup>
<rendering> <rendering>
<debug type="bool">false</debug> <debug type="bool">false</debug>
@ -655,7 +655,7 @@ Started September 2000 by David Megginson, david@megginson.com
</autovisibility> </autovisibility>
</menubar> </menubar>
<gui> <gui preserve="y">
<current-style type="int" <current-style type="int"
userarchive="y">1</current-style> userarchive="y">1</current-style>
<style n="0" <style n="0"
@ -722,7 +722,7 @@ Started September 2000 by David Megginson, david@megginson.com
</ai> </ai>
<multiplay> <multiplay>
<chat type="string">Hello</chat> <chat type="string" preserve="y">Hello</chat>
<transmission-freq-hz type="string">118500000</transmission-freq-hz> <transmission-freq-hz type="string">118500000</transmission-freq-hz>
<chat-display type="bool" <chat-display type="bool"
userarchive="y">true</chat-display> userarchive="y">true</chat-display>
@ -732,7 +732,7 @@ Started September 2000 by David Megginson, david@megginson.com
</multiplay> </multiplay>
<user> <user>
<callsign type="string">Golf Foxtrot Sierra</callsign> <callsign type="string" preserve="y">Golf Foxtrot Sierra</callsign>
</user> </user>
<timing-statistics> <timing-statistics>