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
A -> archive bit set
U -> user archive bit set
P -> preserved bit set (value is preserved on sim-reset)
T -> property is "tied"
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 A = p.getAttribute("archive") ? "A" : "";
var U = p.getAttribute("userarchive") ? "U" : "";
var P = p.getAttribute("preserve") ? "P" : "";
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();
if (size(attr))
type ~= ", " ~ attr;

View file

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