Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
OOJSPlayer.h File Reference
import <Foundation/Foundation.h>
#include <jsapi.h>
+ Include dependency graph for OOJSPlayer.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void InitOOJSPlayer (JSContext *context, JSObject *global)
 
JSClass * JSPlayerClass (void)
 
JSObject * JSPlayerPrototype (void)
 
JSObject * JSPlayerObject (void)
 
PlayerEntityOOPlayerForScripting (void)
 

Function Documentation

◆ InitOOJSPlayer()

void InitOOJSPlayer ( JSContext * context,
JSObject * global )

Definition at line 163 of file OOJSPlayer.m.

164{
165 sPlayerPrototype = JS_InitClass(context, global, NULL, &sPlayerClass, OOJSUnconstructableConstruct, 0, sPlayerProperties, sPlayerMethods, NULL, NULL);
167
168 // Create player object as a property of the global object.
169 sPlayerObject = JS_DefineObject(context, global, "player", &sPlayerClass, sPlayerPrototype, OOJS_PROP_READONLY);
170}
static JSClass sPlayerClass
Definition OOJSPlayer.m:67
static JSObject * sPlayerPrototype
Definition OOJSPlayer.m:43
static JSObject * sPlayerObject
Definition OOJSPlayer.m:44
static JSPropertySpec sPlayerProperties[]
Definition OOJSPlayer.m:112
static JSFunctionSpec sPlayerMethods[]
Definition OOJSPlayer.m:141
void OOJSRegisterObjectConverter(JSClass *theClass, OOJSClassConverterCallback converter)
JSBool OOJSUnconstructableConstruct(JSContext *context, uintN argc, jsval *vp)
#define OOJS_PROP_READONLY
id OOJSBasicPrivateObjectConverter(JSContext *context, JSObject *object)

References OOJS_PROP_READONLY, OOJSBasicPrivateObjectConverter(), OOJSRegisterObjectConverter(), OOJSUnconstructableConstruct(), sPlayerClass, sPlayerMethods, sPlayerObject, sPlayerProperties, and sPlayerPrototype.

+ Here is the call graph for this function:

◆ JSPlayerClass()

JSClass * JSPlayerClass ( void )

Definition at line 173 of file OOJSPlayer.m.

174{
175 return &sPlayerClass;
176}

References sPlayerClass.

◆ JSPlayerObject()

JSObject * JSPlayerObject ( void )

Definition at line 185 of file OOJSPlayer.m.

186{
187 return sPlayerObject;
188}

References sPlayerObject.

Referenced by InitOOJSPlayerShip().

+ Here is the caller graph for this function:

◆ JSPlayerPrototype()

JSObject * JSPlayerPrototype ( void )

Definition at line 179 of file OOJSPlayer.m.

180{
181 return sPlayerPrototype;
182}

References sPlayerPrototype.

◆ OOPlayerForScripting()

PlayerEntity * OOPlayerForScripting ( void )

Definition at line 191 of file OOJSPlayer.m.

192{
193 PlayerEntity *player = PLAYER;
194 [player setScriptTarget:player];
195
196 return player;
197}
#define PLAYER

References PLAYER, and PlayerEntity::setScriptTarget:.

Referenced by ClockGetProperty(), EquipmentInfoGetProperty(), GlobalClearExtraGuiScreenKeys(), GlobalGetProperty(), GlobalKeyBindingDescription(), GlobalSetExtraGuiScreenKeys(), JSClockToString(), ManifestGetProperty(), ManifestSetProperty(), MissionAddMessageText(), MissionGetProperty(), MissionMarkSystem(), MissionRunCallback(), MissionRunScreen(), MissionRunShipLibrary(), MissionSetInstructionsInternal(), MissionSetProperty(), MissionUnmarkSystem(), MissionVariablesDeleteProperty(), MissionVariablesGetProperty(), MissionVariablesSetProperty(), PlayerAddMessageToArrivalReport(), PlayerAudioMessage(), PlayerGetProperty(), PlayerReplaceShip(), PlayerSetEscapePodDestination(), PlayerSetPlayerRole(), PlayerSetProperty(), PlayerShipAddParcel(), PlayerShipAddPassenger(), PlayerShipAwardContract(), PlayerShipAwardEquipmentToCurrentPylon(), PlayerShipBeginGalacticHyperspaceCountdown(), PlayerShipBeginHyperspaceCountdown(), PlayerShipCancelDockingRequest(), PlayerShipCancelHyperspaceCountdown(), PlayerShipEngageAutopilotToStation(), PlayerShipGetProperty(), PlayerShipHideHUDSelector(), PlayerShipRemoveAllCargo(), PlayerShipRemoveContract(), PlayerShipRemoveParcel(), PlayerShipRemovePassenger(), PlayerShipRequestDockingClearance(), PlayerShipResetCustomView(), PlayerShipResetScannerZoom(), PlayerShipSetCustomHUDDial(), PlayerShipSetCustomView(), PlayerShipSetMultiFunctionDisplay(), PlayerShipSetMultiFunctionText(), PlayerShipSetPrimedEquipment(), PlayerShipSetProperty(), PlayerShipShowHUDSelector(), PlayerShipTakeInternalDamage(), PlayerShipUseSpecialCargo(), ShipRunLegacyScriptActions(), StationDockPlayer(), SystemAddMoon(), SystemAddPlanet(), SystemGetProperty(), SystemLegacyAddShipsAt(), SystemLegacyAddShipsAtPrecisely(), SystemLegacyAddShipsWithinRadius(), SystemLegacySpawnShip(), SystemSendAllShipsAway(), SystemSetProperty(), SystemToString(), and WorldScriptsGetProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: