mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-01-31 09:57:14 +01:00
Adjust the Checkpoint entity methods to use the new method of receiving formatted strings.
This commit is contained in:
parent
85079a28d2
commit
5669802169
@ -64,9 +64,23 @@ const String & CCheckpoint::GetTag() const
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CCheckpoint::SetTag(CSStr tag)
|
||||
void CCheckpoint::SetTag(const StackStrF & tag)
|
||||
{
|
||||
m_Tag.assign(tag);
|
||||
if (tag.mLen > 0)
|
||||
{
|
||||
m_Tag.assign(tag.mPtr, tag.mLen);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Tag.clear();
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CCheckpoint & CCheckpoint::ApplyTag(StackStrF & tag)
|
||||
{
|
||||
SetTag(tag);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@ -521,6 +535,7 @@ void Register_CCheckpoint(HSQUIRRELVM vm)
|
||||
.Prop(_SC("Active"), &CCheckpoint::IsActive)
|
||||
// Core Methods
|
||||
.Func(_SC("Bind"), &CCheckpoint::BindEvent)
|
||||
.FmtFunc(_SC("SetTag"), &CCheckpoint::ApplyTag)
|
||||
.Func(_SC("CustomEvent"), &CCheckpoint::CustomEvent)
|
||||
// Core Overloads
|
||||
.Overload< bool (CCheckpoint::*)(void) >(_SC("Destroy"), &CCheckpoint::Destroy)
|
||||
|
@ -140,7 +140,12 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
void SetTag(CSStr tag);
|
||||
void SetTag(const StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
CCheckpoint & ApplyTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the associated user data.
|
||||
|
Loading…
x
Reference in New Issue
Block a user