mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Add deprecation warnings for ObjectRef:get/set_attribute (#8443)
This commit is contained in:
parent
5b8363af00
commit
3deaa7cf57
1 changed files with 6 additions and 0 deletions
|
@ -1239,6 +1239,9 @@ int ObjectRef::l_get_breath(lua_State *L)
|
||||||
// set_attribute(self, attribute, value)
|
// set_attribute(self, attribute, value)
|
||||||
int ObjectRef::l_set_attribute(lua_State *L)
|
int ObjectRef::l_set_attribute(lua_State *L)
|
||||||
{
|
{
|
||||||
|
log_deprecated(L,
|
||||||
|
"Deprecated call to set_attribute, use MetaDataRef methods instead.");
|
||||||
|
|
||||||
ObjectRef *ref = checkobject(L, 1);
|
ObjectRef *ref = checkobject(L, 1);
|
||||||
PlayerSAO* co = getplayersao(ref);
|
PlayerSAO* co = getplayersao(ref);
|
||||||
if (co == NULL)
|
if (co == NULL)
|
||||||
|
@ -1257,6 +1260,9 @@ int ObjectRef::l_set_attribute(lua_State *L)
|
||||||
// get_attribute(self, attribute)
|
// get_attribute(self, attribute)
|
||||||
int ObjectRef::l_get_attribute(lua_State *L)
|
int ObjectRef::l_get_attribute(lua_State *L)
|
||||||
{
|
{
|
||||||
|
log_deprecated(L,
|
||||||
|
"Deprecated call to get_attribute, use MetaDataRef methods instead.");
|
||||||
|
|
||||||
ObjectRef *ref = checkobject(L, 1);
|
ObjectRef *ref = checkobject(L, 1);
|
||||||
PlayerSAO* co = getplayersao(ref);
|
PlayerSAO* co = getplayersao(ref);
|
||||||
if (co == NULL)
|
if (co == NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue