lua/wrappers/game/lua_item.cpp
/**
	 * Sets the description of the item.
	 *
	 * @param string description The description to set the item.
	 * @returns am.item This.
	 */
Sets the description of the item.
@param string description The description to set the item.
Sets the description of the item . @param string description The description to set the item .
int Item_description(lua_State *lua)
	{
		Item *item = castUData<Item>(lua, 1);
		if (item)
		{
			if (lua_gettop(lua) == 1)
			{
				lua_pushstring(lua, item->getDescription().c_str());
				return 1;
			}
			else if (lua_isstr(lua, 2))
			{
				const char *description = lua_tostring(lua, 2);
				if (description)
				{
					item->setDescription(description);
				}
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "description", "string description");
		}
		return LuaState::expectedContext(lua, "description", "am.item");
	}
int Item_description ( lua_State * lua ) { Item * item = castUData < Item > ( lua , 1 ) ; if ( item ) { if ( lua_gettop ( lua ) == 1 ) { lua_pushstring ( lua , item -> getDescription ( ) . c_str ( ) ) ; return 1 ; } else if ( lua_isstr ( lua , 2 ) ) { const char * description = lua_tostring ( lua , 2 ) ; if ( description ) { item -> setDescription ( description ) ; } lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the description of the item.
Sets the description of the item .