From 45b166414786a535883b55593d25797ef3035d9c Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 10 Jan 2011 16:49:41 -0600 Subject: [PATCH] [Character] Added GetDisplayName Lua binding. --- Docs/Changelog_sm-ssc.txt | 6 +++++- src/Character.cpp | 7 +++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 58b9569bee..e4ae9fb431 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -10,9 +10,13 @@ supported but exist anyways.) _____________________________________________________________________________ ================================================================================ -sm-ssc in development | 20110??? +sm-ssc v1.2.1 | 20110??? -------------------------------------------------------------------------------- +20110110 +-------- +* [Character] Added GetDisplayName Lua binding. [freem] + 20110109 -------- * Add the semicolon and apostrophe keys as alternatives to the Page Up and Page diff --git a/src/Character.cpp b/src/Character.cpp index e158089ffc..ac8a8da14d 100644 --- a/src/Character.cpp +++ b/src/Character.cpp @@ -17,7 +17,6 @@ bool Character::Load( RString sCharDir ) sCharDir += "/"; m_sCharDir = sCharDir; - // save ID { vector as; @@ -61,7 +60,7 @@ bool Character::Load( RString sCharDir ) // get optional display name ini.GetValue( "Character", "DisplayName", m_sDisplayName ); - + // get optional InitCommand RString s; ini.GetValue( "Character", "InitCommand", s ); @@ -70,7 +69,6 @@ bool Character::Load( RString sCharDir ) return true; } - RString GetRandomFileInDir( RString sDir ) { vector asFiles; @@ -81,7 +79,6 @@ RString GetRandomFileInDir( RString sDir ) return asFiles[RandomInt(asFiles.size())]; } - RString Character::GetModelPath() const { RString s = m_sCharDir + "model.txt"; @@ -214,6 +211,7 @@ public: static int GetDanceAnimationPath( T* p, lua_State *L ) { lua_pushstring(L, p->GetDanceAnimationPath() ); return 1; } static int GetCharacterDir( T* p, lua_State *L ) { lua_pushstring(L, p->m_sCharDir ); return 1; } static int GetCharacterID( T* p, lua_State *L ) { lua_pushstring(L, p->m_sCharacterID ); return 1; } + static int GetDisplayName( T* p, lua_State *L ) { lua_pushstring(L, p->GetDisplayName() ); return 1; } LunaCharacter() { @@ -228,6 +226,7 @@ public: ADD_METHOD( GetDanceAnimationPath ); ADD_METHOD( GetCharacterDir ); ADD_METHOD( GetCharacterID ); + ADD_METHOD( GetDisplayName ); } };