Already existed as a property.

This was SVN commit r6256.
This commit is contained in:
freenity 2008-07-19 02:43:35 +00:00
parent 9c8069631e
commit 6eb29f76d3
2 changed files with 1 additions and 8 deletions

View File

@ -71,7 +71,6 @@ void CPlayer::ScriptingInit()
AddMethod<jsval_t, &CPlayer::JSI_GetColour>("getColour", 0);
AddMethod<void, &CPlayer::JSI_SetDiplomaticStance>("setDiplomaticStance", 2);
AddMethod<jsval_t, &CPlayer::JSI_GetDiplomaticStance>("getDiplomaticStance", 1);
AddMethod<CStrW, &CPlayer::JSI_GetName>("getName", 0);
AddProperty( L"id", &CPlayer::m_PlayerID, true );
// MT: Work out how this fits with the Synched stuff...
@ -177,9 +176,4 @@ jsval_t CPlayer::JSI_GetDiplomaticStance(JSContext *cx, uintN UNUSED(argc), jsva
JS_ReportError( cx, "Could not convert argument 1 to a Player object" );
return JSVAL_VOID;
}
}
CStrW CPlayer::JSI_GetName(JSContext* UNUSED(cx), uintN UNUSED(argc), jsval* UNUSED(argv))
{
return m_Name;
}
}

View File

@ -97,7 +97,6 @@ public:
jsval_t JSI_GetColour(JSContext *context, uintN argc, jsval *argv);
void JSI_SetDiplomaticStance(JSContext *context, uintN argc, jsval *argv);
jsval_t JSI_GetDiplomaticStance(JSContext *context, uintN argc, jsval *argv);
CStrW JSI_GetName(JSContext* UNUSED(cx), uintN UNUSED(argc), jsval* UNUSED(argv));
static void ScriptingInit();
};