mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-29 18:43:53 +01:00
Added further textures to the Gate Block
This commit is contained in:
parent
0e1bd6f52d
commit
58ed780c13
@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## V1.16.3 (2018-09-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
- Added further textures to the Gate Block
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## V1.16.2 (2018-09-22)
|
## V1.16.2 (2018-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,22 +12,27 @@
|
|||||||
|
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
|
local NUM_TEXTURES = 20
|
||||||
|
|
||||||
local sTextures = "Wood,Aspen Wood,Jungle Wood,Pine Wood,"..
|
local sTextures = "Wood,Aspen Wood,Jungle Wood,Pine Wood,"..
|
||||||
"Cobblestone,Sandstone,Stone,Desert Sandstone,"..
|
"Cobblestone,Sandstone,Stone,Desert Sandstone,"..
|
||||||
|
"Desert Stone,Silver Sandstone,Mossy Cobble,Desert Cobble,"..
|
||||||
"Copper,Steel,Tin,Coral,"..
|
"Copper,Steel,Tin,Coral,"..
|
||||||
"Glas,Obsidian Glas,Gate Wood"
|
"Glas,Obsidian Glas,Ice,Gate Wood"
|
||||||
|
|
||||||
local tTextures = {
|
local tTextures = {
|
||||||
["Wood"]=1, ["Aspen Wood"]=2, ["Jungle Wood"]=3, ["Pine Wood"]=4,
|
["Wood"]=1, ["Aspen Wood"]=2, ["Jungle Wood"]=3, ["Pine Wood"]=4,
|
||||||
["Cobblestone"]=5, ["Sandstone"]=6, ["Stone"]=7, ["Desert Sandstone"]=8,
|
["Cobblestone"]=5, ["Sandstone"]=6, ["Stone"]=7, ["Desert Sandstone"]=8,
|
||||||
["Copper"]=9, ["Steel"]=10, ["Tin"]=11, ["Coral"]=12,
|
["Desert Stone"]=9, ["Silver Sandstone"]=10, ["Mossy Cobble"]=11, ["Desert Cobble"]=12,
|
||||||
["Glas"]=13, ["Obsidian Glas"]=14, ["Gate Wood"]=15,
|
["Copper"]=13, ["Steel"]=14, ["Tin"]=15, ["Coral"]=16,
|
||||||
|
["Glas"]=17, ["Obsidian Glas"]=18, ["Ice"]=19, ["Gate Wood"]=20,
|
||||||
}
|
}
|
||||||
|
|
||||||
local tPgns = {"default_wood.png", "default_aspen_wood.png", "default_junglewood.png", "default_pine_wood.png",
|
local tPgns = {"default_wood.png", "default_aspen_wood.png", "default_junglewood.png", "default_pine_wood.png",
|
||||||
"default_cobble.png", "default_sandstone.png", "default_stone.png", "default_desert_sandstone.png",
|
"default_cobble.png", "default_sandstone.png", "default_stone.png", "default_desert_sandstone.png",
|
||||||
|
"default_desert_stone_block.png", "default_silver_sandstone.png", "default_mossycobble.png", "default_desert_cobble.png",
|
||||||
"default_copper_block.png", "default_steel_block.png", "default_tin_block.png", "default_coral_skeleton.png",
|
"default_copper_block.png", "default_steel_block.png", "default_tin_block.png", "default_coral_skeleton.png",
|
||||||
"default_glass.png", "default_obsidian_glass.png", "tubelib_addon2_gate.png"}
|
"default_glass.png", "default_obsidian_glass.png", "default_ice.png", "tubelib_addon2_gate.png"}
|
||||||
|
|
||||||
for idx,pgn in ipairs(tPgns) do
|
for idx,pgn in ipairs(tPgns) do
|
||||||
minetest.register_node("tubelib_addons2:gateblock"..idx, {
|
minetest.register_node("tubelib_addons2:gateblock"..idx, {
|
||||||
@ -40,7 +45,7 @@ for idx,pgn in ipairs(tPgns) do
|
|||||||
meta:set_string("infotext", "Tubelib Gate Block "..number)
|
meta:set_string("infotext", "Tubelib Gate Block "..number)
|
||||||
meta:set_string("formspec", "size[3,2]"..
|
meta:set_string("formspec", "size[3,2]"..
|
||||||
"label[0,0;Select texture]"..
|
"label[0,0;Select texture]"..
|
||||||
"dropdown[0,0.5;3;type;"..sTextures..";15]"..
|
"dropdown[0,0.5;3;type;"..sTextures..";"..NUM_TEXTURES.."]"..
|
||||||
"button_exit[0.5,1.5;2,1;exit;Save]")
|
"button_exit[0.5,1.5;2,1;exit;Save]")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
@ -66,7 +71,7 @@ for idx,pgn in ipairs(tPgns) do
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
groups = {cracky=2, choppy=2, crumbly=2, not_in_creative_inventory = idx==15 and 0 or 1},
|
groups = {cracky=2, choppy=2, crumbly=2, not_in_creative_inventory = idx==NUM_TEXTURES and 0 or 1},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
drop = "tubelib_addons2:gateblock15",
|
drop = "tubelib_addons2:gateblock15",
|
||||||
})
|
})
|
||||||
@ -90,7 +95,7 @@ for idx,pgn in ipairs(tPgns) do
|
|||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "tubelib_addons2:gateblock15",
|
output = "tubelib_addons2:gateblock"..NUM_TEXTURES,
|
||||||
recipe = {
|
recipe = {
|
||||||
{"group:wood", "", ""},
|
{"group:wood", "", ""},
|
||||||
{"tubelib:wlanchip", "", ""},
|
{"tubelib:wlanchip", "", ""},
|
||||||
|
Loading…
Reference in New Issue
Block a user