Skip to content

Commit

Permalink
Add deprecation warnings for ObjectRef:get/set_attribute (#8443)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClobberXD authored and SmallJoker committed Apr 7, 2019
1 parent 5b8363a commit 3deaa7c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/script/lua_api/l_object.cpp
Expand Up @@ -1239,6 +1239,9 @@ int ObjectRef::l_get_breath(lua_State *L)
// set_attribute(self, attribute, value)
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);
PlayerSAO* co = getplayersao(ref);
if (co == NULL)
Expand All @@ -1257,6 +1260,9 @@ int ObjectRef::l_set_attribute(lua_State *L)
// get_attribute(self, attribute)
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);
PlayerSAO* co = getplayersao(ref);
if (co == NULL)
Expand Down

0 comments on commit 3deaa7c

Please sign in to comment.