remove the weird ice redefinition, fix readme and use minetest.override_item to short the code
parent
9fd8949d05
commit
2762c7be13
|
@ -1,3 +1,2 @@
|
|||
TODO:
|
||||
— add titanium glass
|
||||
— add more glass
|
||||
|
|
30
init.lua
30
init.lua
|
@ -1,18 +1,4 @@
|
|||
local load_time_start = os.clock()
|
||||
local function connect_glass(node, img)
|
||||
local tmp = minetest.registered_nodes[node]
|
||||
if not tmp then
|
||||
return
|
||||
end
|
||||
if tmp.tile_images then
|
||||
tmp.tile_images = img
|
||||
else
|
||||
tmp.tiles = img
|
||||
end
|
||||
tmp.drawtype = "glasslike_framed"
|
||||
minetest.register_node(":"..node, tmp)
|
||||
end
|
||||
|
||||
|
||||
local glass_list = {
|
||||
["default:glass"] = {"default_glass.png", "connected_textures_glass_stripes.png"},
|
||||
|
@ -27,18 +13,10 @@ local glass_list = {
|
|||
["titanium:glass"] = {"titanium_glass.png", "connected_textures_titanium_glass_stripes.png"},
|
||||
}
|
||||
|
||||
for nd,tex in pairs(glass_list) do
|
||||
connect_glass(nd, tex)
|
||||
for node,img in pairs(glass_list) do
|
||||
if minetest.registered_nodes[node] then
|
||||
minetest.override_item(node, {tiles = img, drawtype = "glasslike_framed"})
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
minetest.register_node(":default:ice", {
|
||||
description = "Ice",
|
||||
tiles = {"connected_textures_ice.png"},
|
||||
is_ground_content = true,
|
||||
use_texture_alpha = true,
|
||||
paramtype = "light",
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
print(string.format("[connected_textures] loaded after ca. %.2fs", os.clock() - load_time_start))
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 656 B |
Loading…
Reference in New Issue