Still not working ... though now the brackets work.
I modified the systemredux js to create up to four additional planets with stations and beacons - two inside the main planets' orbit and two outside.
The main planet has been shoved to about 30 planetary diametres outwards via farsun (triple normal distance).
My code looks like this:
Code: Select all
this.addPlanets = function()
{
var sys_info = this.system_info[galaxyNumber * 256 + system.ID + 1] & (0xF0 >> (4 - this.max_planets));
if (sys_info & 0x10) {
system.addPlanet("planet1");
system.legacy_addShipsAt('coriolis', 1, 'spp', [-8, 0, -8]);
system.legacy_addShipsAt('planetarybuoy', 1, 'spp', [-8.1, 0, -8.1]);
}
if (sys_info & 0x20) {
system.addPlanet("planet2");
system.legacy_addShipsAt('dodecahedron', 1, 'spp', [16, 0, 16]);
system.legacy_addShipsAt('planetarybuoy', 1, 'spp', [16.1, 0, 16.1]);
}
if (sys_info & 0x40) {
system.addPlanet("planet3");
system.legacy_addShipsAt('rockhermit', 1, 'spp', [-61, 0, 61]);
system.legacy_addShipsAt('planetarybuoy', 1, 'spp', [-61.1, 0, 61.1]);
}
if (sys_info & 0x80) {
system.addPlanet("planet4");
system.legacy_addShipsAt('SIRF-YARD', 1, 'spp', [101, 0, -101]);
system.legacy_addShipsAt('planetarybuoy', 1, 'spp', [101.1, 0, -101.1]);
}
}
... but for some reason, it's not working.
What I changed from original system redux are the positions of the up to four additional planets, and added stations and a beacon to these new positions, too. Everything else I left the way it is.
Can somebody point out what might be going wrong here, while keeping in mind that my idea of js is rather limited?