Some configurable settings will become available later, can OxpcSettings be used multiple times ?
For the same worldScript with the same ID? No - i don't think so (at least it was never intended this way).
My oxp will have an upgrade path with 5 devices, and after upgrades more configurable options become available.
I can think of 2 options to achieve this :
A. add a separate bitmask with 9 bits ( the 4 booleans + 4 short integers + the 24-bit bitmask) where each bit determines if that value is shown/configurable by user.
create a function to set the bitmask.
B.
create a destroy method for oxpCsettings
Both ways have advantages / disadvantages, but option B (destroy method) seems the most logical choice to me.
Both ways have advantages / disadvantages, but option B (destroy method) seems the most logical choice to me.
Yes, should be possible .-)
I think I'll go for a simple way, rebuilding the searchtree. Set the LeaveData flag and pass the object to the function then.
Will do some tests and give you a call.
Ok, got the color stuff working. OXPConfig defines now an array with 20 elements [ [[c0-color1],[c0-color2]], ... ] and a related missionVariable. A simple example could look like:
The example defines a default array which is used if neither array, nor the related mV is available. Then it checks if OXPConfig is installed - if so it delays the access (here shipWillLaunchFromStation) to avoid loading order stuff without the need of a timer and grabs the reference. If a user changes the settings through OXPConfigs GUI the references will be automagically updated as well without any callback/registering or constant checking (associative array). If no OXPConfig is installed (= array unavailable), it tries to get the data from the mV.
OXPConfig itself does a similiar thing. The default array get defined in the script body. On startUp it tries to read in the mV. If not available the mV gets created. If OXPConfig shuts down this property is not deleted (unlike most other properties) to stay available for other OXPs. The mV gets updated on leaving the color settings.
Changes:
- Added Capt. Murphys coming OXP (I'm sure he'll reveal what it is in the coming days)
- Added Color handling
- Info.plist
- various minor tweaks
- docs updated
For trunk users OXPConfig2.1.1 is online.
Direct link: OXPConfig2.1.1.zip (97 KB)
v2.1.1 uses equipment and HUD to display additional infos.
After a little bit thinking about the difficulty to identify problems in OXPs I've decided to add two new features to OXPConfig. Both are explicitely there to help OXPers in case a user reports trouble.
Changes:
- Added 'Dump missionVariables' in Specials
- Added 'Dump worldScript properties' in Specials
v2.2.2 for trunk is online as well (folder Developers Edge, see signature).