|
|
|
@ -129,41 +129,41 @@ this.defineCompatibilityWriteOnly = function (constructorName, oldName, funcName
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Define a compatibility getter for a property that's moved to another property.
|
|
|
|
|
// Example: to map player.docked to player.ship.docked, this.defineCompatibilitySubGetter("Player", "ship", "docked")
|
|
|
|
|
this.defineCompatibilitySubGetter = function (constructorName, subName, propName)
|
|
|
|
|
// Example: to map player.docked to player.ship.docked, this.defineCompatibilitySubGetter("player", "ship", "docked")
|
|
|
|
|
this.defineCompatibilitySubGetter = function (singletonName, subName, propName)
|
|
|
|
|
{
|
|
|
|
|
let getter = function ()
|
|
|
|
|
{
|
|
|
|
|
special.jsWarning(constructorName + "." + propName + " is deprecated, use " + constructorName + "." + subName + "." + propName + " instead.");
|
|
|
|
|
special.jsWarning(singletonName + "." + propName + " is deprecated, use " + singletonName + "." + subName + "." + propName + " instead.");
|
|
|
|
|
return this[subName][propName];
|
|
|
|
|
}
|
|
|
|
|
global[constructorName].__proto__.__defineGetter__(propName, getter);
|
|
|
|
|
global[singletonName].__defineGetter__(propName, getter);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Define a compatibility setter for a property that's moved to another property.
|
|
|
|
|
this.defineCompatibilitySubSetter = function (constructorName, subName, propName)
|
|
|
|
|
this.defineCompatibilitySubSetter = function (singletonName, subName, propName)
|
|
|
|
|
{
|
|
|
|
|
let setter = function (value)
|
|
|
|
|
{
|
|
|
|
|
special.jsWarning(constructorName + "." + propName + " is deprecated, use " + constructorName + "." + subName + "." + propName + " instead.");
|
|
|
|
|
special.jsWarning(singletonName + "." + propName + " is deprecated, use " + singletonName + "." + subName + "." + propName + " instead.");
|
|
|
|
|
this[subName][propName] = value;
|
|
|
|
|
}
|
|
|
|
|
global[constructorName].__proto__.__defineSetter__(propName, setter);
|
|
|
|
|
global[singletonName].__defineSetter__(propName, setter);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Define a compatibility getter and setter for a property that's moved to another property.
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter = function (constructorName, subName, propName)
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter = function (singletonName, subName, propName)
|
|
|
|
|
{
|
|
|
|
|
this.defineCompatibilitySubGetter(constructorName, subName, propName);
|
|
|
|
|
this.defineCompatibilitySubSetter(constructorName, subName, propName);
|
|
|
|
|
this.defineCompatibilitySubGetter(singletonName, subName, propName);
|
|
|
|
|
this.defineCompatibilitySubSetter(singletonName, subName, propName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Like defineCompatibilitySubGetter() et al, for methods.
|
|
|
|
|
this.defineCompatibilitySubMethod = function (constructorName, subName, methodName)
|
|
|
|
|
this.defineCompatibilitySubMethod = function (singletonName, subName, methodName)
|
|
|
|
|
{
|
|
|
|
|
global[constructorName][methodName] = function ()
|
|
|
|
|
global[singletonName][methodName] = function ()
|
|
|
|
|
{
|
|
|
|
|
special.jsWarning(constructorName + "." + methodName + "() is deprecated, use " + constructorName + "." + subName + "." + methodName + "() instead.");
|
|
|
|
|
special.jsWarning(singletonName + "." + methodName + "() is deprecated, use " + singletonName + "." + subName + "." + methodName + "() instead.");
|
|
|
|
|
let sub = this[subName];
|
|
|
|
|
return sub[methodName].apply(sub, arguments);
|
|
|
|
|
}
|
|
|
|
@ -201,102 +201,102 @@ system.setSunNova = function(delay)
|
|
|
|
|
this.defineCompatibilityGetter("Ship", "maxCargo", "cargoCapacity");
|
|
|
|
|
|
|
|
|
|
// Lots of Player properties, including inherited ones, moved to playerShip
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "fuelLeakRate");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "docked");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "dockedStation");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "specialCargo");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "galacticHyperspaceBehaviour");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "galacticHyperspaceFixedCoords");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "awardEquipment");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "removeEquipment");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "hasEquipment");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "equipmentStatus");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "setEquipmentStatus");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "launch");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "awardCargo");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "canAwardCargo");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "removeAllCargo");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "useSpecialCargo");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "setGalacticHyperspaceBehaviour");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "setGalacticHyperspaceFixedCoords");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "fuelLeakRate");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "docked");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "dockedStation");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "specialCargo");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "galacticHyperspaceBehaviour");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "galacticHyperspaceFixedCoords");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "awardEquipment");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "removeEquipment");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "hasEquipment");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "equipmentStatus");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "setEquipmentStatus");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "launch");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "awardCargo");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "canAwardCargo");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "removeAllCargo");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "useSpecialCargo");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "setGalacticHyperspaceBehaviour");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "setGalacticHyperspaceFixedCoords");
|
|
|
|
|
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "AI");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "AIState");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "beaconCode");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "bounty");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "entityPersonality");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "escorts");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "fuel");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "groupID");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "hasHostileTarget");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "hasSuspendedAI");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "heatInsulation");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isBeacon");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "isCloaked");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isFrangible");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isJamming");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isPirate");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isPirateVictim");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isPlayer");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isPolice");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isThargoid");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isTrader");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "cargoSpaceUsed");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "cargoCapacity");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "availableCargoSpace");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "maxSpeed");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "potentialCollider");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "primaryRole");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "reportAIMessages");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "roleProbabilities");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "roles");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "scannerRange");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "scriptInfo");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "shipDescription");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "shipDisplayName");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "speed");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "desiredSpeed");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "subEntities");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "target");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "temperature");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "weaponRange");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "withinStationAegis");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "trackCloseContacts");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "passengerCount");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "passengerCapacity");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "setScript");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "setAI");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "switchAI");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "exitAI");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "reactToAIMessage");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "deployEscorts");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "dockEscorts");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "hasRole");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "ejectItem");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "ejectSpecificItem");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "dumpCargo");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "runLegacyScriptActions");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "spawn");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "explode");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "AI");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "AIState");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "beaconCode");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "bounty");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "entityPersonality");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "escorts");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "fuel");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "groupID");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "hasHostileTarget");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "hasSuspendedAI");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "heatInsulation");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isBeacon");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "isCloaked");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isFrangible");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isJamming");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isPirate");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isPirateVictim");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isPlayer");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isPolice");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isThargoid");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isTrader");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "cargoSpaceUsed");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "cargoCapacity");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "availableCargoSpace");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "maxSpeed");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "potentialCollider");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "primaryRole");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "reportAIMessages");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "roleProbabilities");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "roles");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "scannerRange");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "scriptInfo");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "shipDescription");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "shipDisplayName");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "speed");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "desiredSpeed");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "subEntities");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "target");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "temperature");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "weaponRange");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "withinStationAegis");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "trackCloseContacts");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "passengerCount");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "passengerCapacity");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "setScript");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "setAI");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "switchAI");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "exitAI");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "reactToAIMessage");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "deployEscorts");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "dockEscorts");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "hasRole");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "ejectItem");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "ejectSpecificItem");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "dumpCargo");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "runLegacyScriptActions");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "spawn");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "explode");
|
|
|
|
|
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "ID");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "position");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "orientation");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "heading");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "status");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "scanClass");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "mass");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "owner");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("Player", "ship", "energy");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "maxEnergy");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isValid");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isShip");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isStation");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isSubEntity");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isPlayer");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isPlanet");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "isSun");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "distanceTravelled");
|
|
|
|
|
this.defineCompatibilitySubGetter("Player", "ship", "spawnTime");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "setPosition");
|
|
|
|
|
this.defineCompatibilitySubMethod("Player", "ship", "setOrientation");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "ID");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "position");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "orientation");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "heading");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "status");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "scanClass");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "mass");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "owner");
|
|
|
|
|
this.defineCompatibilitySubGetterAndSetter("player", "ship", "energy");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "maxEnergy");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isValid");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isShip");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isStation");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isSubEntity");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isPlayer");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isPlanet");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "isSun");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "distanceTravelled");
|
|
|
|
|
this.defineCompatibilitySubGetter("player", "ship", "spawnTime");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "setPosition");
|
|
|
|
|
this.defineCompatibilitySubMethod("player", "ship", "setOrientation");
|
|
|
|
|