Remove references to m_sUrl; disable GetUrl with a warning; add a missing brace to IsZero() since we removed a URL variable from it

This commit is contained in:
sukibaby
2025-01-26 01:48:59 -08:00
committed by teejusb
parent cc5670e8d1
commit 200a44d8a1
2 changed files with 12 additions and 11 deletions
+11 -9
View File
@@ -60,7 +60,6 @@ void GameCommand::Init()
m_iGoalCalories = -1;
m_GoalType = GoalType_Invalid;
m_sProfileID = "";
m_sUrl = "";
m_bUrlExits = true;
m_bInsertCredit = false;
@@ -402,8 +401,7 @@ void GameCommand::LoadOne( const Command& cmd )
else if( sName == "url" )
{
m_sUrl = sValue;
m_bUrlExits = true;
// url usage has been deprecated. This block exists for backwards compatibility.
}
else if( sName == "sound" )
@@ -439,8 +437,7 @@ void GameCommand::LoadOne( const Command& cmd )
// sm-ssc additions begin:
else if( sName == "urlnoexit" )
{
m_sUrl = sValue;
m_bUrlExits = false;
// url usage has been deprecated. This block exists for backwards compatibility.
}
else if( sName == "setpref" )
@@ -897,10 +894,11 @@ bool GameCommand::IsZero() const
m_iWeightPounds != -1 ||
m_iGoalCalories != -1 ||
m_GoalType != GoalType_Invalid ||
!m_sProfileID.empty() ||
!m_sUrl.empty() )
!m_sProfileID.empty() )
{
return false;
}
return true;
}
@@ -927,7 +925,11 @@ public:
static int GetTrail( T* p, lua_State *L ) { if(p->m_pTrail== nullptr) lua_pushnil(L); else p->m_pTrail->PushSelf(L); return 1; }
static int GetCharacter( T* p, lua_State *L ) { if(p->m_pCharacter== nullptr) lua_pushnil(L); else p->m_pCharacter->PushSelf(L); return 1; }
static int GetSongGroup( T* p, lua_State *L ) { lua_pushstring(L, p->m_sSongGroup ); return 1; }
static int GetUrl( T* p, lua_State *L ) { lua_pushstring(L, p->m_sUrl ); return 1; }
static int GetUrl(T* p, lua_State* L)
{
LOG->Warn("GetUrl usage has been deprecated.");
return 1;
}
static int GetAnnouncer( T* p, lua_State *L ) { lua_pushstring(L, p->m_sAnnouncer ); return 1; }
static int GetPreferredModifiers( T* p, lua_State *L ) { lua_pushstring(L, p->m_sPreferredModifiers ); return 1; }
static int GetStageModifiers( T* p, lua_State *L ) { lua_pushstring(L, p->m_sStageModifiers ); return 1; }