Added material options in lua

- added object material changing in lua
- added material flags through lua
- added texture setting through lua
- removed useless/unused lines of code