mirror of
https://github.com/Ezhh/abriglass.git
synced 2024-08-19 03:14:04 +02:00
Reverted to origin
This commit is contained in:
parent
17d17c4080
commit
69e9b6ff3a
107
crafting.lua
107
crafting.lua
@ -1,107 +0,0 @@
|
|||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'abriglass:clear_glass 4', -- intentional lower yield
|
|
||||||
recipe = {
|
|
||||||
{'default:glass', '', 'default:glass' },
|
|
||||||
{'', 'default:glass', '' },
|
|
||||||
{'default:glass', '', 'default:glass' },
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
local plain_colors = {
|
|
||||||
"green", "blue", "red", "yellow",
|
|
||||||
}
|
|
||||||
--glass lights
|
|
||||||
|
|
||||||
local i
|
|
||||||
for i in ipairs(plain_colors) do
|
|
||||||
local name = plain_colors[i]
|
|
||||||
local nodesuffix = 'glass_light_'..name
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'abriglass:'..nodesuffix..' 4',
|
|
||||||
recipe = {
|
|
||||||
{'abriglass:clear_glass', 'default:torch', 'abriglass:clear_glass' },
|
|
||||||
{'abriglass:clear_glass', 'dye:'..name, 'abriglass:clear_glass' },
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
recipe = "abriglass:"..nodesuffix,
|
|
||||||
output = "abriglass:clear_glass",
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'abriglass:stainedglass_pattern01 9',
|
|
||||||
recipe = {
|
|
||||||
{'abriglass:glass_light_yellow', 'abriglass:glass_light_yellow', 'abriglass:glass_light_yellow' },
|
|
||||||
{'abriglass:glass_light_yellow', 'abriglass:glass_light_blue', 'abriglass:glass_light_yellow' },
|
|
||||||
{'abriglass:glass_light_yellow', 'abriglass:glass_light_yellow', 'abriglass:glass_light_yellow' },
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'abriglass:stainedglass_pattern04 9',
|
|
||||||
recipe = {
|
|
||||||
{'abriglass:glass_light_green', 'abriglass:glass_light_red', 'abriglass:glass_light_green' },
|
|
||||||
{'abriglass:glass_light_red', 'abriglass:glass_light_blue', 'abriglass:glass_light_red' },
|
|
||||||
{'abriglass:glass_light_green', 'abriglass:glass_light_red', 'abriglass:glass_light_green' },
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'abriglass:stainedglass_pattern05 9',
|
|
||||||
recipe = {
|
|
||||||
{'abriglass:glass_light_blue', 'abriglass:glass_light_blue', 'abriglass:glass_light_blue' },
|
|
||||||
{'abriglass:glass_light_blue', 'abriglass:glass_light_green', 'abriglass:glass_light_blue' },
|
|
||||||
{'abriglass:glass_light_blue', 'abriglass:glass_light_blue', 'abriglass:glass_light_blue' },
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
recipe = "abriglass:stainedglass_pattern01",
|
|
||||||
output = "abriglass:clear_glass",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
recipe = "abriglass:stainedglass_pattern02",
|
|
||||||
output = "abriglass:clear_glass",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
recipe = "abriglass:stainedglass_pattern03",
|
|
||||||
output = "abriglass:clear_glass",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
recipe = "abriglass:stainedglass_pattern04",
|
|
||||||
output = "abriglass:clear_glass",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
recipe = "abriglass:stainedglass_pattern05",
|
|
||||||
output = "abriglass:clear_glass",
|
|
||||||
})
|
|
||||||
|
|
||||||
-- missing crafts for:
|
|
||||||
-- ghost_crystal
|
|
||||||
-- stainedglass_tiles_dark, stainedglass_tiles_pale,
|
|
||||||
-- stainedglass_pattern02,
|
|
||||||
-- stainedglass_pattern03,
|
|
||||||
-- oneway_glass_dark
|
|
||||||
-- oneway_glass_pale
|
|
||||||
-- oneway_wall_dark
|
|
||||||
-- oneway_wall_pale
|
|
||||||
-- hidden_light
|
|
||||||
|
|
||||||
-- and missing also recipes for undecorated glass..
|
|
||||||
-- likelly ones without torches in recipe, just glass and dye
|
|
@ -1,2 +1 @@
|
|||||||
default
|
default
|
||||||
dye
|
|
||||||
|
71
init.lua
71
init.lua
@ -6,8 +6,6 @@ Who did it: Shara RedCat.
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
|
|
||||||
local is_darklands = true
|
|
||||||
|
|
||||||
--boring glass because why not?
|
--boring glass because why not?
|
||||||
|
|
||||||
minetest.register_node("abriglass:clear_glass", {
|
minetest.register_node("abriglass:clear_glass", {
|
||||||
@ -21,31 +19,52 @@ minetest.register_node("abriglass:clear_glass", {
|
|||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
local plain_colors = {
|
|
||||||
"green", "blue", "red", "yellow",
|
|
||||||
}
|
|
||||||
--glass lights
|
--glass lights
|
||||||
|
|
||||||
local i
|
minetest.register_node("abriglass:glass_light_green", {
|
||||||
for i in ipairs(plain_colors) do
|
description = "Green Glass Light",
|
||||||
local name = plain_colors[i]
|
tiles = {"abriglass_lightgreen.png"},
|
||||||
local description = name:sub(1,1):upper()..name:sub(2).." Glass Light"
|
groups = {cracky = 3},
|
||||||
|
use_texture_alpha = true,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
light_source = 14,
|
||||||
|
drawtype = "glasslike",
|
||||||
|
sounds = default.node_sound_glass_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
local nodesuffix = 'glass_light_'..name
|
minetest.register_node("abriglass:glass_light_blue", {
|
||||||
|
description = "Blue Glass Light",
|
||||||
|
tiles = {"abriglass_lightblue.png"},
|
||||||
|
groups = {cracky = 3},
|
||||||
|
use_texture_alpha = true,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
light_source = 14,
|
||||||
|
drawtype = "glasslike",
|
||||||
|
sounds = default.node_sound_glass_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
minetest.debug("i="..i..", name="..name..", desc="..description);
|
minetest.register_node("abriglass:glass_light_red", {
|
||||||
|
description = "Red Glass Light",
|
||||||
|
tiles = {"abriglass_lightred.png"},
|
||||||
|
groups = {cracky = 3},
|
||||||
|
use_texture_alpha = true,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
light_source = 14,
|
||||||
|
drawtype = "glasslike",
|
||||||
|
sounds = default.node_sound_glass_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_node("abriglass:"..nodesuffix, {
|
minetest.register_node("abriglass:glass_light_yellow", {
|
||||||
description = description,
|
description = "Yellow Glass Light",
|
||||||
tiles = { "abriglass_light"..name..".png"},
|
tiles = {"abriglass_lightyellow.png"},
|
||||||
groups = {cracky = 3},
|
groups = {cracky = 3},
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = true,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
light_source = (is_darklands and 14 or 4),
|
light_source = 14,
|
||||||
drawtype = "glasslike",
|
drawtype = "glasslike",
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
})
|
})
|
||||||
end
|
|
||||||
|
|
||||||
--crystal, for later use in crafting recipes
|
--crystal, for later use in crafting recipes
|
||||||
|
|
||||||
@ -56,7 +75,7 @@ minetest.register_node("abriglass:ghost_crystal", {
|
|||||||
groups = {cracky = 3},
|
groups = {cracky = 3},
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = true,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
light_source = (is_darklands and 14 or 4),
|
light_source = 14,
|
||||||
drawtype = "glasslike",
|
drawtype = "glasslike",
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
})
|
})
|
||||||
@ -84,7 +103,7 @@ for i in ipairs(pattern_list) do
|
|||||||
groups = {cracky = 3},
|
groups = {cracky = 3},
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = true,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
light_source = (is_darklands and 5 or 4),
|
light_source = 5,
|
||||||
drawtype = "glasslike",
|
drawtype = "glasslike",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
@ -166,7 +185,7 @@ minetest.register_node("abriglass:hidden_light", {
|
|||||||
use_texture_alpha = true,
|
use_texture_alpha = true,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
light_source = (is_darklands and 7 or 4), -- not sure about this one
|
light_source = 7,
|
||||||
drawtype = "glasslike",
|
drawtype = "glasslike",
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -209,6 +228,4 @@ minetest.register_node("abriglass:stained_glass_frosted", {
|
|||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
|
||||||
dofile(modpath.."/crafting.lua")
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user