[antum_glass] Add 'Green Glass' node & craft recipe.

master
AntumDeluge 2016-09-02 23:36:14 -07:00
parent bb898668ff
commit f42f070532
3 changed files with 29 additions and 30 deletions

View File

@ -25,14 +25,12 @@
--]]
minetest.register_craftitem('glass:green', {
description = 'Green Glass',
}
)
minetest.register_craft({
output = 'glass:green',
type = 'shapeless',
recipe = {'default:glass', 'dye:green'},
}
)
for I in pairs(antum.glass.colors) do
local color = antum.glass.colors[I]
minetest.register_craft({
output = 'glass:' .. color,
type = 'shapeless',
recipe = {'default:glass', 'dye:' .. color},
})
end

View File

@ -25,15 +25,12 @@
--]]
-- DISABLED
do return end
antum.glass = {}
antum.glass.modpath = minetest.get_current_modpath()
antum.glass.modname = minetest.get_current_modname()
antum.glass.modpath = minetest.get_modpath(antum.glass.modname)
local colors = {"green"}
antum.glass.colors = {"green"}
dofile(modpath .. "/nodes.lua")
dofile(modpath .. "/crafting.lua")
dofile(antum.glass.modpath .. "/nodes.lua")
dofile(antum.glass.modpath .. "/crafting.lua")

View File

@ -24,14 +24,18 @@
--]]
minetest.register_node('glass:green', {
description = 'Green Glass',
drawtype = 'glasslike_framed_optional',
tiles = {'glass/green', 'glass/green_detail'},
paramtype = 'light',
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
}
)
for I in pairs(antum.glass.colors) do
local color = antum.glass.colors[I]
minetest.register_node(':glass:' .. color, {
description = color:gsub('^%l', string.upper) .. ' Glass',
drawtype = 'glasslike_framed_optional',
tiles = {'glass_' .. color .. '.png', 'glass_' .. color .. '_detail.png'},
paramtype = 'light',
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
})
end