Page 2 of 2

Re: Lengthy planet descriptions

Posted: Thu Apr 03, 2025 9:11 am
by Cholmondely
Wildeblood wrote: Wed Apr 02, 2025 4:04 am
...Middlemap...
...regex...
?

Revisions of "Oolite JavaScript Reference: SystemInfo"

Posted: Wed May 07, 2025 6:54 am
by Wildeblood
This was added to https://wiki.alioth.net/index.php/Oolit ... SystemInfo during development of Oolite 1.81:
Revision as of 20:36, 4 July 2015

Line 70:

=== <code>setProperty</code> ===

{{oolite-method-added|1.81}}

function '''setProperty'''(key : String, value: String, layer: Number [, manifest: String])

This lets you set properties with more control than provided by writing directly to <code>systemInfo.property</code>. <code>layer</code> is the layer from 0 to 3 that the change should be applied at, as in [[planetinfo.plist]]. Layer 2 is the default layer for Javascript-initiated changes, but 3 may be used for changes absolutely crucial for OXP functionality.
Almost three and a half years later, this change was made:

Revision as of 00:24, 16 November 2018

function '''setProperty'''(key : String, value: String, layer: Number [, manifest: String])
+
function '''setProperty'''(layer: Number, key : String, value: String [, manifest: String])

My question is, did the implementation of this method change, or was the wiki showing incorrect information for more than three years?

Re: System statistics

Posted: Wed May 07, 2025 7:05 am
by another_commander
layer has been the first parameter in this method since its entry into the codebase in October 2014. It looks like the wiki had it wrong for a while.

Edit: Also, key is named property in the code.

Spurious Planetinfo.plist descriptions?

Posted: Wed May 07, 2025 6:45 pm
by Wildeblood
Thank you, a_c.

Moving on to planetinfo.plist, and...

https://wiki.alioth.net/index.php/Planetinfo.plist mentions properties of:-
6.9 Percent Cloud
6.10 Percent Ice
6.11 Percent Land

But, Resources/Config/planetinfo.plist contains:-
cloud_fraction
no mention of ice
land_fraction

And, I can also see a polar_cloud_color, which isn't mentioned on the wiki page?

Re: Spurious Planetinfo.plist descriptions?

Posted: Wed May 07, 2025 7:09 pm
by Cholmondely
Wildeblood wrote: Wed May 07, 2025 6:45 pm
Thank you, a_c.

Moving on to planetinfo.plist, and...

https://wiki.alioth.net/index.php/Planetinfo.plist mentions properties of:-
6.9 Percent Cloud
6.10 Percent Ice
6.11 Percent Land

But, Resources/Config/planetinfo.plist contains:-
cloud_fraction
no mention of ice
land_fraction

And, I can also see a polar_cloud_color, which isn't mentioned on the wiki page?
If you dig around inside SOTL Altmap, there might be other unmentioned goodies in there too.

Re: Spurious Planetinfo.plist descriptions?

Posted: Wed May 07, 2025 7:37 pm
by Wildeblood
Cholmondely wrote: Wed May 07, 2025 7:09 pm
If you dig around inside SOTL Altmap, there might be other unmentioned goodies in there too.
Ya, ones cim made up. :mrgreen: (I have the impression it's little understood that one can store any arbitrary information one wants to in planetinfo/system.info, as an alternative to mission variables. I'll have some suggestions for possibilities later in this topic.)

I'm hoping to make a definitive list of properties actually implemented in Oolite as of 1.90/1.91, and correct/update the wiki in the process. Really, if someone could point me to where in the Oolite source planetinfo.plist gets parsed, that would be neato.

(And, I can honestly say that is the first time in my life I've ever written "neato", in any context.)