Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempt to auto figure out good chest texture #2

Open
wsor4035 opened this issue Feb 14, 2023 · 0 comments
Open

attempt to auto figure out good chest texture #2

wsor4035 opened this issue Feb 14, 2023 · 0 comments

Comments

@wsor4035
Copy link
Contributor

trying to do this so dont have to hardcoded texture support for games, was using this for mcl before giving up

if not minetest.get_modpath("default") then
	minetest.register_on_mods_loaded(function()
		local top_chest_tex
		for name, def in pairs(minetest.registered_nodes) do
			if string.match((name:split(":")[2] or ""), "chest") and def.tiles and not def.mesh then
				top_chest_tex = def.tiles[1]
			end
		end
		if top_chest_tex then
			minetest.override_item("bridges:bridge_auto", {tiles = {top_chest_tex}})
		end
	end)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant