itemstackmetadata.cpp--Minetest
--Copyright (C) 2013 sapier----This program is free software; you can redistribute it and/or modify--it under the terms of the GNU Lesser General Public License as published by--the Free Software Foundation; either version 2.1 of the License, or--(at your option) any later version.----This program is distributed in the hope that it will be useful,--but WITHOUT ANY WARRANTY; without even the implied warranty of--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the--GNU Lesser General Public License for more details.----You should have received a copy of the GNU Lesser General Public License along--with this program; if not, write to the Free Software Foundation, Inc.,--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
mm_texture = {}--------------------------------------------------------------------------------function mm_texture.init()
mm_texture.defaulttexturedir = core.get_texturepath() .. DIR_DELIM .."base"..
DIR_DELIM .."pack".. DIR_DELIM
mm_texture.basetexturedir = mm_texture.defaulttexturedir
mm_texture.texturepack = core.setting_get("texture_path")
mm_texture.gameid =nilend--------------------------------------------------------------------------------function mm_texture.update(tab,gamedetails)if tab ~="singleplayer"then
mm_texture.reset()returnendif gamedetails ==nil thenreturnend
mm_texture.update_game(gamedetails)end--------------------------------------------------------------------------------function mm_texture.reset()
mm_texture.gameid =nillocal have_bg =falselocal have_overlay = mm_texture.set_generic("overlay")if not have_overlay then
have_bg = mm_texture.set_generic("background")end
mm_texture.clear("header")
mm_texture.clear("footer")
core.set_clouds(false