|
From: Wayne B. <kil...@co...> - 2023-07-02 23:39:00
|
> Oh, I get what you mean ! :) A version check would be good indeed. This is something we have had to deal with for some time and are currently coming up against in some new c172p updates. These updates are going to require a reset of aircraft saved date to avoid throwing an error. I personally haven’t tested to see the order of aircraft persistent data loading against option that we might take such as wiping the save data cache once a version change has been detected. We can theoretically already add nasal code to compare current version against last version and catch any new version loading for the first time. The question is can we wipe the cache after this check but before the persistent data is loaded? I know from working with startup states and persistent data that the startup state instructions were followed by the persistent data loading as that was a problem for me when trying to design some startup states. I don’t think I ever tried to wipe the cache though when loading from a startup state. That would be a good thing to test. This may already all be possible and just needs an aircraft developer to write the logic for it. Wayne From: TheFGFSEagle Sent: Friday, June 30, 2023 5:44 PM To: FlightGear developers discussions Subject: Re: [Flightgear-devel] loading aircraft-data/foo.xml or not... Oh, I get what you mean ! :) A version check would be good indeed. Am Sa., 1. Juli 2023 um 00:29 Uhr schrieb <wki...@gm...>: On 6/30/23 6:12 PM, TheFGFSEagle wrote: > Well, you always can read the data file outside the aircraft.data mechanism by > using io.read_properties. is that a nasal thing? i know some craft do something like this with specific files in the craft's directory... the next thing is that apparently FG loads this file in question (aircraft-data/foo.xml) automatically so the problem is how to handle this decision /before/ FG loads the file... i'm thinking that maybe there could be some hooks in the loader of this file that we can use via XML options in the -set.xml or -main.xml... something to compare the (eg) aircraft-version before allowing the rest or some of the parts of the file to be loaded and maybe a hook using something to tell the loader to load or ignore the file... i know what i'm trying to say but i'm having some trouble to convey it, i think... it has been another very long day for me... thanks for your comments! :) > Am Fr., 30. Juni 2023 um 17:48 Uhr schrieb <wki...@gm...>: > > > is there some way to read a property (eg: aircraft-version) from the > aircraft-data/foo.xml file before deciding to load it in its entirety, to load > certain specific properties from it, or to ignore it completely? > > the reason i ask is that sometimes when craft get updated, there may be > properties (or missing properties) in the file that cause problems for a craft > that has been updated... in all the cases i'm aware of, the fix was for the > user > to go behind the scenes and manually delete this file so the craft could start > clean... but that's not always a GoodThing<tm> because there may be data in the > file that is desirable (eg: hobbs clock) and doesn't cause problems... > > my idea is for the craft to somehow be able to handle this situation itself > without the user having to get involved behind the scenes or maybe think the > craft is just broken and go complaining about it... or not... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list unless* *a signed and pre-paid contract is in effect with us.* _______________________________________________ Flightgear-devel mailing list Fli...@li... https://lists.sourceforge.net/lists/listinfo/flightgear-devel |