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