Oolite 1.91.0.7646-241128-10e222e
|
import "OOJSSystem.h"
import "OOJavaScriptEngine.h"
import "OOJSVector.h"
import "OOJSQuaternion.h"
import "OOJSEntity.h"
import "OOJSPlayer.h"
import "Universe.h"
import "OOPlanetEntity.h"
import "PlayerEntityScriptMethods.h"
import "OOJSSystemInfo.h"
import "OOCollectionExtractors.h"
import "OOConstToString.h"
import "OOConstToJSString.h"
import "OOEntityFilterPredicate.h"
import "OOFilteringEnumerator.h"
import "OOJSPopulatorDefinition.h"
import "OODebugStandards.h"
import "EntityOOJavaScriptExtensions.h"
Go to the source code of this file.
Functions | |
static BOOL | GetRelativeToAndRange (JSContext *context, NSString *methodName, uintN *ioArgc, jsval **ioArgv, Entity **outRelativeTo, double *outRange) |
static NSArray * | FindJSVisibleEntities (EntityFilterPredicate predicate, void *parameter, Entity *relativeTo, double range) |
static NSArray * | FindShips (EntityFilterPredicate predicate, void *parameter, Entity *relativeTo, double range) |
static NSComparisonResult | CompareEntitiesByDistance (id a, id b, void *relativeTo) |
static JSBool | SystemAddShipsOrGroup (JSContext *context, uintN argc, jsval *vp, BOOL isGroup) |
static JSBool | SystemAddShipsOrGroupToRoute (JSContext *context, uintN argc, jsval *vp, BOOL isGroup) |
static JSBool | SystemGetProperty (JSContext *context, JSObject *this, jsid propID, jsval *value) |
static JSBool | SystemSetProperty (JSContext *context, JSObject *this, jsid propID, JSBool strict, jsval *value) |
static JSBool | SystemToString (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemAddPlanet (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemAddMoon (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemSendAllShipsAway (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemCountShipsWithPrimaryRole (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemCountShipsWithRole (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemCountEntitiesWithScanClass (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemShipsWithPrimaryRole (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemShipsWithRole (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemEntitiesWithScanClass (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemFilteredEntities (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemLocationFromCode (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemAddShips (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemAddGroup (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemAddShipsToRoute (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemAddGroupToRoute (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemAddVisualEffect (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemSetPopulator (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemSetWaypoint (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemLegacyAddShips (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemLegacyAddSystemShips (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemLegacyAddShipsAt (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemLegacyAddShipsAtPrecisely (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemLegacyAddShipsWithinRadius (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemLegacySpawnShip (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemStaticSystemNameForID (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemStaticSystemIDForName (JSContext *context, uintN argc, jsval *vp) |
static JSBool | SystemStaticInfoForSystem (JSContext *context, uintN argc, jsval *vp) |
void | InitOOJSSystem (JSContext *context, JSObject *global) |
Variables | |
static JSObject * | sSystemPrototype |
static JSClass | sSystemClass |
static JSPropertySpec | sSystemProperties [] |
static JSFunctionSpec | sSystemMethods [] |
static JSFunctionSpec | sSystemStaticMethods [] |
anonymous enum |
Definition at line 112 of file OOJSSystem.m.
|
static |
Definition at line 1626 of file OOJSSystem.m.
References OOJS_PROFILE_ENTER, and OOJS_PROFILE_EXIT.
|
static |
Definition at line 1584 of file OOJSSystem.m.
References JSEntityIsJavaScriptSearchablePredicate(), nil, OOJS_PROFILE_ENTER, and OOJS_PROFILE_EXIT.
Referenced by FindShips(), SystemEntitiesWithScanClass(), and SystemFilteredEntities().
|
static |
Definition at line 1611 of file OOJSSystem.m.
References ANDPredicate(), FindJSVisibleEntities(), IsShipPredicate(), OOJS_PROFILE_ENTER, and OOJS_PROFILE_EXIT.
Referenced by SystemShipsWithPrimaryRole(), and SystemShipsWithRole().
|
static |
Definition at line 1549 of file OOJSSystem.m.
References EXPECT_NOT, JSValueToEntity(), nil, OOJS_PROFILE_ENTER, OOJS_PROFILE_EXIT, and OOJSReportBadArguments().
Referenced by SystemCountEntitiesWithScanClass(), SystemCountShipsWithPrimaryRole(), SystemCountShipsWithRole(), SystemEntitiesWithScanClass(), SystemFilteredEntities(), SystemShipsWithPrimaryRole(), and SystemShipsWithRole().
void InitOOJSSystem | ( | JSContext * | context, |
JSObject * | global ) |
Definition at line 227 of file OOJSSystem.m.
References OOJS_PROP_READONLY, OOJSUnconstructableConstruct(), sSystemClass, sSystemMethods, sSystemProperties, sSystemPrototype, and sSystemStaticMethods.
|
static |
Definition at line 951 of file OOJSSystem.m.
References SystemAddShipsOrGroup().
|
static |
Definition at line 965 of file OOJSSystem.m.
References SystemAddShipsOrGroupToRoute().
|
static |
Definition at line 638 of file OOJSSystem.m.
References PlayerEntity::addMoon:, EXPECT_NOT, MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSReportBadArguments(), OOPlayerForScripting(), and OOStringFromJSValue().
|
static |
Definition at line 612 of file OOJSSystem.m.
References PlayerEntity::addPlanet:, EXPECT_NOT, MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSReportBadArguments(), OOPlayerForScripting(), and OOStringFromJSValue().
|
static |
Definition at line 944 of file OOJSSystem.m.
References SystemAddShipsOrGroup().
|
static |
Definition at line 1415 of file OOJSSystem.m.
References count, MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSReportBadArguments(), OOStringFromJSValue(), SCANNER_MAX_RANGE, and VectorFromArgumentListNoError().
Referenced by SystemAddGroup(), and SystemAddShips().
|
static |
Definition at line 1481 of file OOJSSystem.m.
References count, MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSReportBadArguments(), and OOStringFromJSValue().
Referenced by SystemAddGroupToRoute(), and SystemAddShipsToRoute().
|
static |
Definition at line 958 of file OOJSSystem.m.
References SystemAddShipsOrGroupToRoute().
|
static |
Definition at line 1254 of file OOJSSystem.m.
References MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSReportBadArguments(), OOStringFromJSValue(), and VectorFromArgumentListNoError().
|
static |
Definition at line 808 of file OOJSSystem.m.
References EXPECT_NOT, GetRelativeToAndRange(), MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_INT, OOJSReportBadArguments(), and OOScanClassFromJSValue().
|
static |
Definition at line 678 of file OOJSSystem.m.
References EXPECT_NOT, GetRelativeToAndRange(), MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_INT, OOJSReportBadArguments(), and OOStringFromJSValue().
|
static |
Definition at line 710 of file OOJSSystem.m.
References EXPECT_NOT, GetRelativeToAndRange(), MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_INT, OOJSReportBadArguments(), and OOStringFromJSValue().
|
static |
Definition at line 840 of file OOJSSystem.m.
References EXPECT_NOT, FindJSVisibleEntities(), GetRelativeToAndRange(), HasScanClassPredicate(), MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSReportBadArguments(), and OOScanClassFromJSValue().
|
static |
Definition at line 873 of file OOJSSystem.m.
References JSFunctionPredicateParameter::errorFlag, EXPECT_NOT, FindJSVisibleEntities(), GetRelativeToAndRange(), JSFunctionPredicate(), nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSPauseTimeLimiter(), OOJSReportBadArguments(), OOJSResumeTimeLimiter(), and OOJSValueIsFunction().
|
static |
Definition at line 236 of file OOJSSystem.m.
References DESC, EXPECT, GetJSSystemInfoForSystem(), KEY_ECONOMY, KEY_GOVERNMENT, KEY_POPULATION, KEY_PRODUCTIVITY, KEY_TECHLEVEL, kSystem_allDemoShips, kSystem_allShips, kSystem_allVisualEffects, kSystem_ambientLevel, kSystem_breakPattern, kSystem_description, kSystem_economy, kSystem_economyDescription, kSystem_government, kSystem_governmentDescription, kSystem_ID, kSystem_info, kSystem_inhabitantsDescription, kSystem_isInterstellarSpace, kSystem_mainPlanet, kSystem_mainStation, kSystem_name, kSystem_planets, kSystem_population, kSystem_populatorSettings, kSystem_productivity, kSystem_pseudoRandom100, kSystem_pseudoRandom256, kSystem_pseudoRandomNumber, kSystem_stations, kSystem_sun, kSystem_techLevel, kSystem_waypoints, kSystem_wormholes, nil, OODisplayStringFromEconomyID(), OODisplayStringFromGovernmentID(), OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJSReportBadPropertySelector(), OOJSValueFromBOOL(), OOJSValueFromNativeObject(), OOPlayerForScripting(), sSystemProperties, and UNIVERSE.
|
static |
Definition at line 972 of file OOJSSystem.m.
References count, EXPECT_NOT, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_VOID, OOJSReportBadArguments(), OOStandardsDeprecated(), and OOStringFromJSValue().
|
static |
Definition at line 1032 of file OOJSSystem.m.
References PlayerEntity::addShipsAt:, count, EXPECT_NOT, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_VOID, OOJSReportBadArguments(), OOPlayerForScripting(), OOStandardsDeprecated(), OOStringFromJSValue(), and VectorFromArgumentListNoError().
|
static |
Definition at line 1069 of file OOJSSystem.m.
References PlayerEntity::addShipsAtPrecisely:, count, EXPECT_NOT, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_VOID, OOJSReportBadArguments(), OOPlayerForScripting(), OOStandardsDeprecated(), OOStringFromJSValue(), and VectorFromArgumentListNoError().
|
static |
Definition at line 1106 of file OOJSSystem.m.
References PlayerEntity::addShipsWithinRadius:, count, EXPECT_NOT, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_VOID, OOJSReportBadArguments(), OOPlayerForScripting(), OOStandardsDeprecated(), OOStringFromJSValue(), and VectorFromArgumentListNoError().
|
static |
Definition at line 1001 of file OOJSSystem.m.
References count, EXPECT_NOT, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_VOID, OOJSReportBadArguments(), OOStandardsDeprecated(), and OOStringFromJSValue().
|
static |
Definition at line 1146 of file OOJSSystem.m.
References MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_VOID, OOJSReportBadArguments(), OOPlayerForScripting(), OOStandardsDeprecated(), and OOStringFromJSValue().
|
static |
Definition at line 911 of file OOJSSystem.m.
References EXPECT_NOT, kZeroHPVector, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_HPVECTOR, OOJSReportBadArguments(), and OOStringFromJSValue().
|
static |
Definition at line 664 of file OOJSSystem.m.
References OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_VOID, OOPlayerForScripting(), and PlayerEntity::sendAllShipsAway.
|
static |
Definition at line 1289 of file OOJSSystem.m.
References JSValueToVector(), kZeroVector, MIN, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_VOID, OOJSNativeObjectFromJSObject(), OOJSReportBadArguments(), OOStringFromJSValue(), and OOJSPopulatorDefinition::setCallback:.
|
static |
Definition at line 459 of file OOJSSystem.m.
References PlayerEntity::currentGalaxyID, OOJSScript::currentlyRunningScript, PlayerEntity::currentSystemID, kSystem_ambientLevel, kSystem_breakPattern, kSystem_description, kSystem_economy, kSystem_government, kSystem_inhabitantsDescription, kSystem_name, kSystem_population, kSystem_productivity, kSystem_techLevel, nil, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJSReportBadPropertySelector(), OOJSReportBadPropertyValue(), OOPlayerForScripting(), OOStringFromJSValue(), OOJSScript::propertyNamed:, and sSystemProperties.
|
static |
Definition at line 1356 of file OOJSSystem.m.
References JSValueToHPVector(), JSValueToQuaternion(), MIN, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_VOID, OOJSReportBadArguments(), and OOStringFromJSValue().
|
static |
Definition at line 742 of file OOJSSystem.m.
References EXPECT_NOT, FindShips(), GetRelativeToAndRange(), HasPrimaryRolePredicate(), MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSReportBadArguments(), and OOStringFromJSValue().
|
static |
Definition at line 775 of file OOJSSystem.m.
References EXPECT_NOT, FindShips(), GetRelativeToAndRange(), HasRolePredicate(), MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSReportBadArguments(), and OOStringFromJSValue().
|
static |
Definition at line 1223 of file OOJSSystem.m.
References GetJSSystemInfoForSystem(), kOOMaximumGalaxyID, kOOMaximumSystemID, kOOMinimumSystemID, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN, and OOJSReportBadArguments().
|
static |
Definition at line 1196 of file OOJSSystem.m.
References MIN, nil, OOJS_ARGV, OOJS_BEGIN_FULL_NATIVE, OOJS_END_FULL_NATIVE, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_INT, OOJSReportBadArguments(), and OOStringFromJSValue().
|
static |
Definition at line 1174 of file OOJSSystem.m.
References DESC, kOOMaximumSystemID, MIN, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJSReportBadArguments(), and UNIVERSE.
|
static |
Definition at line 597 of file OOJSSystem.m.
References PlayerEntity::currentGalaxyID, PlayerEntity::currentSystemID, nil, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, and OOPlayerForScripting().
|
static |
Definition at line 96 of file OOJSSystem.m.
Referenced by InitOOJSSystem().
|
static |
Definition at line 184 of file OOJSSystem.m.
Referenced by InitOOJSSystem().
|
static |
Definition at line 148 of file OOJSSystem.m.
Referenced by InitOOJSSystem(), SystemGetProperty(), and SystemSetProperty().
|
static |
Definition at line 47 of file OOJSSystem.m.
Referenced by InitOOJSSystem().
|
static |
Definition at line 218 of file OOJSSystem.m.
Referenced by InitOOJSSystem().