It is almost the same script as the original SR script of SR1.2. Probably you compared with that of 1.0
Me neither. The zero is added because he always adds 1 to the system ID and than the first entry is skipped. Mometimes it makes code more readable bus as the galaxy ID stays zero based I see no benefits.
Yes that check is wrong as I mentioned elsewhere. It only checks if the player once had famous planets installed, not if it is still installed.
And as you say, your proposal only works for FP 1.0. FP 2.0 contains much more planets to exclude. But the script name has changed so you now can use both checks:
Code: Select all
var excl = new Array();
if (worldScripts['Famous Planets Launch Script']) {
excl.push(8, 130, 40, 125, 247, 101, 56, 155, 149, 142);
}
if (worldScripts['Famous Planets 2 Launch Script']) {
excl.push(7, 129, 39, 124, 246, 99, 55, 154, 147, 141, 73, 50, 89, 35, 227, 250, 188, 111, 186, 101, 222, 29, 23, 177, 93, 131, 42, 21, 100, 28, 16, 221, 36, 198, 150, 62, 172, 241, 200, 18, 86, 126, 3, 153, 132, 90, 44, 228, 13,
458,370,298,365,383,463,392,262,280,304,309,334,460,449,477,492,322,314,344,396,445,321,400,434,301,369,371,313,350,285,289,330,378,310,279,444,338,
570,677,618,710,676,
781,815,898,786,890,
1040,1217,1255,1116,1033,
1431,1286,1365,1426,1520,
1725,1682,1666,1654,1573,
1969,1823,2003,1949,1812);
}
for (var i = 0; i < excl.length; i++) this.system_info[excl[i]] = 0;
You see, the amount of planets has grown. NB, not tested, but the numbers were calculated based on what the FP script had defined so it should not contain wrong systems.
But it would probably better to not hard code the array in the script but get the list from "worldScripts['Famous Planets 2 Launch Script'].planetList[galaxy][system.ID]" directly. That way you stay correct if FP would be updated.