Skip to content

attempt to auto figure out good chest texture #2

@wsor4035

Description

@wsor4035

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions