Re: [nbos] [AS2] Brad Fletcher: TradeRoutes V3Alan Bartholet Sat Feb 13th, 2010
I did some checking and your script does indeed have the same
problem with the routes not being flagged to be saved to an already
existing sector file. There is also another similar problem with the
sphere's of influence not being saved as well.
In order to fix the route problem is after you create the route you
need to set the Modified property to true, I do this after I add the
route to the sector but you could probably do it any time after
creating the route object.
In order to fix sphere of influence problem you need to call the
ModifySystem method on the body you added the sphere to. I suspect
there is a similar undocumented Modified property for bodies as well
that you could probably set to true and it would do the same thing but
this method is documented and it's what I use in all my scripts.
On Sat, Feb 13, 2010 at 7:57 AM, Shade Tree <shadetreeii-at-hotmail.com> wrote:
> Thanks for the heads up. I won't be able to poke around in it for a few
>> Date: Sat, 13 Feb 2010 04:01:09 -0700
>> From: alan.bartholet-at-gmail.com
>> To: nbossoftware-at-nbos.com
>> Subject: [nbos] [AS2] Brad Fletcher: TradeRoutes V3
>> Hello Brad,
>> Thanks to Alvin Plummer I was able to identify a bug in my Plot
>> Jump Routes plugin that I believe also affects your Trade Routes
>> plugin. The Route class has an undocumented Property called Modified,
>> this needs to be set to true otherwise AS will not save the new route
>> if the sector has been previously saved. I haven't tested this on
>> yours yet but this is the basic rundown of what was happening to mine.
>> 1) Generated a new sector.
>> 2) Added some routes with my plugin.
>> 3) Saved the sector.
>> 4) Loaded the sector, the routes I had created were still there.
>> 5) Added some more routes with my plugin.
>> 6) Saved the sector.
>> 7) Loaded the sector, the old routes were still there but the new ones
>> hadn't been saved.
>> 8) Added new routes again with my plugin.
>> 9) Used "Save as..." to save the sector as a new file.
>> 10) Loaded the new sector file, both old and new routes were saved.
>> So the new routes were not getting flagged as needing to be saved when
>> saving to the same sector file. After much poking around I found the
>> Modified Property and after setting it to true the routes now save
>> properly. Hope this helps you out.
>> Best Regards,
>> Alan Bartholet
>> Nbossoftware mailing list
> Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up
> Nbossoftware mailing list
Nbossoftware mailing list