PS.takeInternalDamage()
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5096 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
725bd11ad9
commit
afbd5950f5
@ -64,6 +64,8 @@ static JSBool PlayerShipRemovePassenger(JSContext *context, uintN argc, jsval *v
|
||||
static JSBool PlayerShipAwardContract(JSContext *context, uintN argc, jsval *vp);
|
||||
static JSBool PlayerShipSetCustomView(JSContext *context, uintN argc, jsval *vp);
|
||||
static JSBool PlayerShipResetCustomView(JSContext *context, uintN argc, jsval *vp);
|
||||
static JSBool PlayerShipTakeInternalDamage(JSContext *context, uintN argc, jsval *vp);
|
||||
|
||||
|
||||
static BOOL ValidateContracts(JSContext *context, uintN argc, jsval *vp, BOOL isCargo, OOSystemID *start, OOSystemID *destination, double *eta, double *fee);
|
||||
|
||||
@ -174,6 +176,7 @@ static JSFunctionSpec sPlayerShipMethods[] =
|
||||
{ "removePassenger", PlayerShipRemovePassenger, 1 },
|
||||
{ "resetCustomView", PlayerShipResetCustomView, 0 },
|
||||
{ "setCustomView", PlayerShipSetCustomView, 2 },
|
||||
{ "takeInternalDamage", PlayerShipTakeInternalDamage, 0 },
|
||||
{ "useSpecialCargo", PlayerShipUseSpecialCargo, 1 },
|
||||
{ 0 }
|
||||
};
|
||||
@ -883,6 +886,19 @@ static JSBool PlayerShipResetCustomView(JSContext *context, uintN argc, jsval *v
|
||||
}
|
||||
|
||||
|
||||
static JSBool PlayerShipTakeInternalDamage(JSContext *context, uintN argc, jsval *vp)
|
||||
{
|
||||
OOJS_NATIVE_ENTER(context)
|
||||
|
||||
PlayerEntity *player = OOPlayerForScripting();
|
||||
|
||||
BOOL took = [player takeInternalDamage];
|
||||
|
||||
OOJS_RETURN_BOOL(took);
|
||||
OOJS_NATIVE_EXIT
|
||||
}
|
||||
|
||||
|
||||
static BOOL ValidateContracts(JSContext *context, uintN argc, jsval *vp, BOOL isCargo, OOSystemID *start, OOSystemID *destination, double *eta, double *fee)
|
||||
{
|
||||
OOJS_PROFILE_ENTER
|
||||
|
Loading…
x
Reference in New Issue
Block a user