stupid git merge/push errors

master
crazyginger72 2014-07-23 23:43:30 -04:00
commit 7238632211
9 changed files with 990 additions and 0 deletions

0
README.md Normal file
View File

97
crafts.lua Normal file
View File

@ -0,0 +1,97 @@
minetest.register_craft({
output = "cg72extra:blinds";
recipe = {
{ "group:stick", "group:stick", "group:stick", },
{ "group:stick", "group:stick", "group:stick", },
{ "group:stick", "group:stick", "group:stick", },
}
})
minetest.register_craft({
output = 'cg72extra:blinds',
type = "shapeless",
recipe = {"cg72extra:blinds_thin", "cg72extra:blinds_thin"}
})
minetest.register_craft({
output = 'cg72extra:blinds_thin 2',
type = "shapeless",
recipe = {'cg72extra:blinds'}
})
minetest.register_craft({
output = "cg72extra:window_plain";
recipe = {
{ "group:stick", "group:stick", "group:stick", },
{ "group:glass", "group:glass", "group:glass", },
{ "group:stick", "group:stick", "group:stick", },
}
})
minetest.register_craft({
output = 'cg72extra:window_closed 2';
type = "shapeless",
recipe = {
{ "cg72extra:window_plain", "cg72extra:window_plain"}
})
minetest.register_craft({
output = "cg72extra:window";
recipe = {
{ "group:stick", "group:stick", "group:stick", },
{ "group:glass", "group:stick", "group:glass", },
{ "group:stick", "group:stick", "group:stick", },
}
})
minetest.register_craft({
output = 'cg72extra:window_sill 12';
recipe = {
{ "", "", "", },
{ "group:wood", "group:wood", "group:wood", },
{ "group:stick", "group:stick", "group:stick", },
}
})
minetest.register_craft({
output = 'cg72extra:window_sill_full',
type = "shapeless",
recipe = {'cg72extra:window_sill'}
})
minetest.register_craft({
output = 'cg72extra:window_sill',
type = "shapeless",
recipe = {'cg72extra:window_sill_full'}
})
minetest.register_craft({
output = "cg72extra:light";
recipe = {
{ "moreblocks:super_glo_glass", "", "", },
{ "moreblocks:super_glo_glass", "", "", },
{ "moreblocks:super_glo_glass", "", "", },
}
})
minetest.register_craft({
output = "cg72extra:light";
recipe = {
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot", },
{ "group:glass", "default:torch", "group:glass", },
{ "group:glass", "default:torch", "group:glass", },
}
})
minetest.register_craft({
output = "cg72extra:light";
recipe = {
{ "homedecor:glowlight_quarter_white", "", "", },
{ "homedecor:glowlight_quarter_white", "", "", },
{ "homedecor:glowlight_quarter_white", "", "", },
}
})

4
init.lua Normal file
View File

@ -0,0 +1,4 @@
dofile(minetest.get_modpath("cg72extra").."/lights.lua")
dofile(minetest.get_modpath("cg72extra").."/window.lua")
dofile(minetest.get_modpath("cg72extra").."/crafts.lua")

536
lights.lua Normal file
View File

@ -0,0 +1,536 @@
minetest.register_node("cg72extra:light_node", {
description = "light node",
drawtype = "airlike",
walkable = false,
pointable = false,
sunlight_propagates = true,
paramtype = 'light',
light_source = 14,
buildable_to = true,
is_ground_content = false,
groups = {unbreakable=1, not_in_creative_inventory = 1},
})
minetest.register_node('cg72extra:light', {
description = "Projection Lighting",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5 , 0.3125, -0.5, 0.5, 0.5, 0.5},
},
},
tiles = { 'cg72_light.png' },
sunlight_propagates = false,
paramtype = 'light',
walkable = true,
light_source = 14,
drop = 'cg72extra:light',
groups = { snappy = 3 },
selection_box = {
type = "fixed",
fixed = {
{-0.5 , 0.3125, -0.5, 0.5, 0.5, 0.5},
},
},
on_place = function(itemstack, placer, pointed_thing)
local pos = pointed_thing.above
local pos2 = {x=pos.x, y=pos.y-1, z=pos.z}
local pos3 = {x=pos.x, y=pos.y-2, z=pos.z}
local pos4 = {x=pos.x, y=pos.y-3, z=pos.z}
local pos5 = {x=pos.x, y=pos.y-4, z=pos.z}
local pos6 = {x=pos.x, y=pos.y-5, z=pos.z}
local pos7 = {x=pos.x, y=pos.y-6, z=pos.z}
local pos8 = {x=pos.x, y=pos.y-7, z=pos.z}
local pos9 = {x=pos.x, y=pos.y-8, z=pos.z}
local pos10 = {x=pos.x, y=pos.y-9, z=pos.z}
local pos11 = {x=pos.x, y=pos.y-10, z=pos.z}
local pos12 = {x=pos.x, y=pos.y-11, z=pos.z}
local pos13 = {x=pos.x, y=pos.y-12, z=pos.z}
local pos14 = {x=pos.x, y=pos.y-13, z=pos.z}
local pos15 = {x=pos.x, y=pos.y-14, z=pos.z}
local pos16 = {x=pos.x, y=pos.y-15, z=pos.z}
local pos17 = {x=pos.x, y=pos.y-16, z=pos.z}
local pos18 = {x=pos.x, y=pos.y-17, z=pos.z}
local pos19 = {x=pos.x, y=pos.y-18, z=pos.z}
local pos20 = {x=pos.x, y=pos.y-19, z=pos.z}
local pos21 = {x=pos.x, y=pos.y-20, z=pos.z}
local pos22 = {x=pos.x, y=pos.y-21, z=pos.z}
local pos23 = {x=pos.x, y=pos.y-22, z=pos.z}
local pos24 = {x=pos.x, y=pos.y-23, z=pos.z}
local pos25 = {x=pos.x, y=pos.y-24, z=pos.z}
local pos26 = {x=pos.x, y=pos.y-25, z=pos.z}
local pos27 = {x=pos.x, y=pos.y-26, z=pos.z}
local pos28 = {x=pos.x, y=pos.y-27, z=pos.z}
local pos29 = {x=pos.x, y=pos.y-28, z=pos.z}
local pos30 = {x=pos.x, y=pos.y-29, z=pos.z}
local pos31 = {x=pos.x, y=pos.y-30, z=pos.z}
local pos32 = {x=pos.x, y=pos.y-31, z=pos.z}
local pos33 = {x=pos.x, y=pos.y-32, z=pos.z}
local pos34 = {x=pos.x, y=pos.y-33, z=pos.z}
local pos35 = {x=pos.x, y=pos.y-34, z=pos.z}
local pos36 = {x=pos.x, y=pos.y-35, z=pos.z}
local pos37 = {x=pos.x, y=pos.y-36, z=pos.z}
local pos38 = {x=pos.x, y=pos.y-37, z=pos.z}
local pos39 = {x=pos.x, y=pos.y-38, z=pos.z}
local pos40 = {x=pos.x, y=pos.y-39, z=pos.z}
local pos41 = {x=pos.x, y=pos.y-40, z=pos.z}
if minetest.get_node(pos2).name == "air" then
minetest.add_node(pos2, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos3).name == "air" and minetest.get_node(pos2).name == "cg72extra:light_node" then
minetest.add_node(pos3, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos4).name == "air" and minetest.get_node(pos3).name == "cg72extra:light_node" then
minetest.add_node(pos4, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos5).name == "air" and minetest.get_node(pos4).name == "cg72extra:light_node" then
minetest.add_node(pos5, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos6).name == "air" and minetest.get_node(pos5).name == "cg72extra:light_node" then
minetest.add_node(pos6, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos7).name == "air" and minetest.get_node(pos6).name == "cg72extra:light_node" then
minetest.add_node(pos7, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos8).name == "air" and minetest.get_node(pos7).name == "cg72extra:light_node" then
minetest.add_node(pos8, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos9).name == "air" and minetest.get_node(pos8).name == "cg72extra:light_node" then
minetest.add_node(pos9, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos10).name == "air" and minetest.get_node(pos9).name == "cg72extra:light_node" then
minetest.add_node(pos10, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos11).name == "air" and minetest.get_node(pos10).name == "cg72extra:light_node" then
minetest.add_node(pos11, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos12).name == "air" and minetest.get_node(pos11).name == "cg72extra:light_node" then
minetest.add_node(pos12, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos13).name == "air" and minetest.get_node(pos12).name == "cg72extra:light_node" then
minetest.add_node(pos13, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos14).name == "air" and minetest.get_node(pos13).name == "cg72extra:light_node" then
minetest.add_node(pos14, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos15).name == "air" and minetest.get_node(pos14).name == "cg72extra:light_node" then
minetest.add_node(pos15, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos16).name == "air" and minetest.get_node(pos15).name == "cg72extra:light_node" then
minetest.add_node(pos16, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos17).name == "air" and minetest.get_node(pos16).name == "cg72extra:light_node" then
minetest.add_node(pos17, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos18).name == "air" and minetest.get_node(pos17).name == "cg72extra:light_node" then
minetest.add_node(pos18, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos19).name == "air" and minetest.get_node(pos18).name == "cg72extra:light_node" then
minetest.add_node(pos19, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos20).name == "air" and minetest.get_node(pos19).name == "cg72extra:light_node" then
minetest.add_node(pos20, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos21).name == "air" and minetest.get_node(pos20).name == "cg72extra:light_node" then
minetest.add_node(pos21, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos22).name == "air" and minetest.get_node(pos21).name == "cg72extra:light_node" then
minetest.add_node(pos23, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos23).name == "air" and minetest.get_node(pos22).name == "cg72extra:light_node" then
minetest.add_node(pos23, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos24).name == "air" and minetest.get_node(pos23).name == "cg72extra:light_node" then
minetest.add_node(pos24, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos25).name == "air" and minetest.get_node(pos24).name == "cg72extra:light_node" then
minetest.add_node(pos25, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos26).name == "air" and minetest.get_node(pos25).name == "cg72extra:light_node" then
minetest.add_node(pos26, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos27).name == "air" and minetest.get_node(pos26).name == "cg72extra:light_node" then
minetest.add_node(pos27, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos28).name == "air" and minetest.get_node(pos27).name == "cg72extra:light_node" then
minetest.add_node(pos28, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos29).name == "air" and minetest.get_node(pos28).name == "cg72extra:light_node" then
minetest.add_node(pos29, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos30).name == "air" and minetest.get_node(pos29).name == "cg72extra:light_node" then
minetest.add_node(pos30, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos31).name == "air" and minetest.get_node(pos30).name == "cg72extra:light_node" then
minetest.add_node(pos31, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos32).name == "air" and minetest.get_node(pos31).name == "cg72extra:light_node" then
minetest.add_node(pos32, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos33).name == "air" and minetest.get_node(pos32).name == "cg72extra:light_node" then
minetest.add_node(pos33, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos34).name == "air" and minetest.get_node(pos33).name == "cg72extra:light_node" then
minetest.add_node(pos34, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos35).name == "air" and minetest.get_node(pos34).name == "cg72extra:light_node" then
minetest.add_node(pos35, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos36).name == "air" and minetest.get_node(pos35).name == "cg72extra:light_node" then
minetest.add_node(pos36, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos37).name == "air" and minetest.get_node(pos36).name == "cg72extra:light_node" then
minetest.add_node(pos37, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos38).name == "air" and minetest.get_node(pos37).name == "cg72extra:light_node" then
minetest.add_node(pos38, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos39).name == "air" and minetest.get_node(pos38).name == "cg72extra:light_node" then
minetest.add_node(pos39, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos40).name == "air" and minetest.get_node(pos39).name == "cg72extra:light_node" then
minetest.add_node(pos40, {name = "cg72extra:light_node"} )
end
if minetest.get_node(pos41).name == "air" and minetest.get_node(pos40).name == "cg72extra:light_node" then
minetest.add_node(pos41, {name = "cg72extra:light_node"} )
end
return minetest.item_place(itemstack, placer, pointed_thing)
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
local pos2 = {x=pos.x, y=pos.y-1, z=pos.z}
local pos3 = {x=pos.x, y=pos.y-2, z=pos.z}
local pos4 = {x=pos.x, y=pos.y-3, z=pos.z}
local pos5 = {x=pos.x, y=pos.y-4, z=pos.z}
local pos6 = {x=pos.x, y=pos.y-5, z=pos.z}
local pos7 = {x=pos.x, y=pos.y-6, z=pos.z}
local pos8 = {x=pos.x, y=pos.y-7, z=pos.z}
local pos9 = {x=pos.x, y=pos.y-8, z=pos.z}
local pos10 = {x=pos.x, y=pos.y-9, z=pos.z}
local pos11 = {x=pos.x, y=pos.y-10, z=pos.z}
local pos12 = {x=pos.x, y=pos.y-11, z=pos.z}
local pos13 = {x=pos.x, y=pos.y-12, z=pos.z}
local pos14 = {x=pos.x, y=pos.y-13, z=pos.z}
local pos15 = {x=pos.x, y=pos.y-14, z=pos.z}
local pos16 = {x=pos.x, y=pos.y-15, z=pos.z}
local pos17 = {x=pos.x, y=pos.y-16, z=pos.z}
local pos18 = {x=pos.x, y=pos.y-17, z=pos.z}
local pos19 = {x=pos.x, y=pos.y-18, z=pos.z}
local pos20 = {x=pos.x, y=pos.y-19, z=pos.z}
local pos21 = {x=pos.x, y=pos.y-20, z=pos.z}
local pos22 = {x=pos.x, y=pos.y-21, z=pos.z}
local pos23 = {x=pos.x, y=pos.y-22, z=pos.z}
local pos24 = {x=pos.x, y=pos.y-23, z=pos.z}
local pos25 = {x=pos.x, y=pos.y-24, z=pos.z}
local pos26 = {x=pos.x, y=pos.y-25, z=pos.z}
local pos27 = {x=pos.x, y=pos.y-26, z=pos.z}
local pos28 = {x=pos.x, y=pos.y-27, z=pos.z}
local pos29 = {x=pos.x, y=pos.y-28, z=pos.z}
local pos30 = {x=pos.x, y=pos.y-29, z=pos.z}
local pos31 = {x=pos.x, y=pos.y-30, z=pos.z}
local pos32 = {x=pos.x, y=pos.y-31, z=pos.z}
local pos33 = {x=pos.x, y=pos.y-32, z=pos.z}
local pos34 = {x=pos.x, y=pos.y-33, z=pos.z}
local pos35 = {x=pos.x, y=pos.y-34, z=pos.z}
local pos36 = {x=pos.x, y=pos.y-35, z=pos.z}
local pos37 = {x=pos.x, y=pos.y-36, z=pos.z}
local pos38 = {x=pos.x, y=pos.y-37, z=pos.z}
local pos39 = {x=pos.x, y=pos.y-38, z=pos.z}
local pos40 = {x=pos.x, y=pos.y-39, z=pos.z}
local pos41 = {x=pos.x, y=pos.y-40, z=pos.z}
if minetest.get_node(pos).name == "cg72extra:light" then
minetest.add_node(pos, {name = "air"} )
end
if minetest.get_node(pos2).name == "cg72extra:light_node" then
minetest.add_node(pos2, {name = "air"} )
elseif minetest.get_node(pos2).name == "cg72extra:light" then
return
end
if minetest.get_node(pos3).name == "cg72extra:light_node" then
minetest.add_node(pos3, {name = "air"} )
elseif minetest.get_node(pos3).name == "cg72extra:light" then
return
end
if minetest.get_node(pos4).name == "cg72extra:light_node" then
minetest.add_node(pos4, {name = "air"} )
elseif minetest.get_node(pos4).name == "cg72extra:light" then
return
end
if minetest.get_node(pos5).name == "cg72extra:light_node" then
minetest.add_node(pos5, {name = "air"} )
elseif minetest.get_node(pos5).name == "cg72extra:light" then
return
end
if minetest.get_node(pos6).name == "cg72extra:light_node" then
minetest.add_node(pos6, {name = "air"} )
elseif minetest.get_node(pos6).name == "cg72extra:light" then
return
end
if minetest.get_node(pos7).name == "cg72extra:light_node" then
minetest.add_node(pos7, {name = "air"} )
elseif minetest.get_node(pos7).name == "cg72extra:light" then
return
end
if minetest.get_node(pos8).name == "cg72extra:light_node" then
minetest.add_node(pos8, {name = "air"} )
elseif minetest.get_node(pos8).name == "cg72extra:light" then
return
end
if minetest.get_node(pos9).name == "cg72extra:light_node" then
minetest.add_node(pos9, {name = "air"} )
elseif minetest.get_node(pos9).name == "cg72extra:light" then
return
end
if minetest.get_node(pos10).name == "cg72extra:light_node" then
minetest.add_node(pos10, {name = "air"} )
elseif minetest.get_node(pos10).name == "cg72extra:light" then
return
end
if minetest.get_node(pos11).name == "cg72extra:light_node" then
minetest.add_node(pos11, {name = "air"} )
elseif minetest.get_node(pos11).name == "cg72extra:light" then
return
end
if minetest.get_node(pos12).name == "cg72extra:light_node" then
minetest.add_node(pos12, {name = "air"} )
elseif minetest.get_node(pos12).name == "cg72extra:light" then
return
end
if minetest.get_node(pos13).name == "cg72extra:light_node" then
minetest.add_node(pos13, {name = "air"} )
elseif minetest.get_node(pos13).name == "cg72extra:light" then
return
end
if minetest.get_node(pos14).name == "cg72extra:light_node" then
minetest.add_node(pos14, {name = "air"} )
elseif minetest.get_node(pos14).name == "cg72extra:light" then
return
end
if minetest.get_node(pos15).name == "cg72extra:light_node" then
minetest.add_node(pos15, {name = "air"} )
elseif minetest.get_node(pos15).name == "cg72extra:light" then
return
end
if minetest.get_node(pos16).name == "cg72extra:light_node" then
minetest.add_node(pos16, {name = "air"} )
elseif minetest.get_node(pos16).name == "cg72extra:light" then
return
end
if minetest.get_node(pos17).name == "cg72extra:light_node" then
minetest.add_node(pos17, {name = "air"} )
elseif minetest.get_node(pos17).name == "cg72extra:light" then
return
end
if minetest.get_node(pos18).name == "cg72extra:light_node" then
minetest.add_node(pos18, {name = "air"} )
elseif minetest.get_node(pos18).name == "cg72extra:light" then
return
end
if minetest.get_node(pos19).name == "cg72extra:light_node" then
minetest.add_node(pos19, {name = "air"} )
elseif minetest.get_node(pos19).name == "cg72extra:light" then
return
end
if minetest.get_node(pos20).name == "cg72extra:light_node" then
minetest.add_node(pos20, {name = "air"} )
elseif minetest.get_node(pos20).name == "cg72extra:light" then
return
end
if minetest.get_node(pos21).name == "cg72extra:light_node" then
minetest.add_node(pos21, {name = "air"} )
elseif minetest.get_node(pos21).name == "cg72extra:light" then
return
end
if minetest.get_node(pos22).name == "cg72extra:light_node" then
minetest.add_node(pos22, {name = "air"} )
elseif minetest.get_node(pos22).name == "cg72extra:light" then
return
end
if minetest.get_node(pos23).name == "cg72extra:light_node" then
minetest.add_node(pos23, {name = "air"} )
elseif minetest.get_node(pos23).name == "cg72extra:light" then
return
end
if minetest.get_node(pos24).name == "cg72extra:light_node" then
minetest.add_node(pos24, {name = "air"} )
elseif minetest.get_node(pos24).name == "cg72extra:light" then
return
end
if minetest.get_node(pos25).name == "cg72extra:light_node" then
minetest.add_node(pos25, {name = "air"} )
elseif minetest.get_node(pos25).name == "cg72extra:light" then
return
end
if minetest.get_node(pos26).name == "cg72extra:light_node" then
minetest.add_node(pos26, {name = "air"} )
elseif minetest.get_node(pos26).name == "cg72extra:light" then
return
end
if minetest.get_node(pos27).name == "cg72extra:light_node" then
minetest.add_node(pos27, {name = "air"} )
elseif minetest.get_node(pos27).name == "cg72extra:light" then
return
end
if minetest.get_node(pos28).name == "cg72extra:light_node" then
minetest.add_node(pos28, {name = "air"} )
elseif minetest.get_node(pos28).name == "cg72extra:light" then
return
end
if minetest.get_node(pos29).name == "cg72extra:light_node" then
minetest.add_node(pos29, {name = "air"} )
elseif minetest.get_node(pos29).name == "cg72extra:light" then
return
end
if minetest.get_node(pos30).name == "cg72extra:light_node" then
minetest.add_node(pos30, {name = "air"} )
elseif minetest.get_node(pos30).name == "cg72extra:light" then
return
end
if minetest.get_node(pos31).name == "cg72extra:light_node" then
minetest.add_node(pos31, {name = "air"} )
elseif minetest.get_node(pos31).name == "cg72extra:light" then
return
end
if minetest.get_node(pos32).name == "cg72extra:light_node" then
minetest.add_node(pos32, {name = "air"} )
elseif minetest.get_node(pos32).name == "cg72extra:light" then
return
end
if minetest.get_node(pos33).name == "cg72extra:light_node" then
minetest.add_node(pos33, {name = "air"} )
elseif minetest.get_node(pos33).name == "cg72extra:light" then
return
end
if minetest.get_node(pos34).name == "cg72extra:light_node" then
minetest.add_node(pos34, {name = "air"} )
elseif minetest.get_node(pos34).name == "cg72extra:light" then
return
end
if minetest.get_node(pos35).name == "cg72extra:light_node" then
minetest.add_node(pos35, {name = "air"} )
elseif minetest.get_node(pos35).name == "cg72extra:light" then
return
end
if minetest.get_node(pos36).name == "cg72extra:light_node" then
minetest.add_node(pos36, {name = "air"} )
elseif minetest.get_node(pos36).name == "cg72extra:light" then
return
end
if minetest.get_node(pos37).name == "cg72extra:light_node" then
minetest.add_node(pos37, {name = "air"} )
elseif minetest.get_node(pos37).name == "cg72extra:light" then
return
end
if minetest.get_node(pos38).name == "cg72extra:light_node" then
minetest.add_node(pos38, {name = "air"} )
elseif minetest.get_node(pos38).name == "cg72extra:light" then
return
end
if minetest.get_node(pos39).name == "cg72extra:light_node" then
minetest.add_node(pos39, {name = "air"} )
elseif minetest.get_node(pos39).name == "cg72extra:light" then
return
end
if minetest.get_node(pos40).name == "cg72extra:light_node" then
minetest.add_node(pos40, {name = "air"} )
elseif minetest.get_node(pos40).name == "cg72extra:light" then
return
end
if minetest.get_node(pos41).name == "cg72extra:light_node" then
minetest.add_node(pos41, {name = "air"} )
elseif minetest.get_node(pos41).name == "cg72extra:light" then
return
end
end,
})

BIN
textures/cg72_light.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

BIN
textures/cg72_window.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

BIN
textures/cg72_window_s.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

353
window.lua Normal file
View File

@ -0,0 +1,353 @@
minetest.register_node("cg72extra:window", {
description = "Window",
tiles = {"cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window.png","cg72_window.png"},
paramtype = "light",
paramtype2 = "facedir",
--use_texture_alpha = true,
walkable = true,
is_ground_content = true,
groups = {crumbly=3},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.025, 0.5, 0.5, 0}, -- NodeBox1
{-0.5, 0.4375, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox2
{-0.5, -0.5, -0.0625, 0.5, -0.4375, 0.0625}, -- NodeBox3
{-0.5, 0, -0.0625, 0.5, 0.0625, 0.0625}, -- NodeBox4
{0.4375, -0.5, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox5
{-0.5, -0.5, -0.0625, -0.4375, 0.5, 0.0625}, -- NodeBox6
{0, -0.5, -0.0625, 0.0625, 0.5, 0.0625}, -- NodeBox7
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.025, 0.5, 0.5, 0}, -- NodeBox1
{-0.5, 0.4375, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox2
{-0.5, -0.5, -0.0625, 0.5, -0.4375, 0.0625}, -- NodeBox3
--{-0.5, 0, -0.0625, 0.5, 0.0625, 0.0625}, -- NodeBox4
{0.4375, -0.5, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox5
{-0.5, -0.5, -0.0625, -0.4375, 0.5, 0.0625}, -- NodeBox6
--{0, -0.5, -0.0625, 0.0625, 0.5, 0.0625}, -- NodeBox7
},
},
})
minetest.register_node("cg72extra:window_plain", {
description = "Window",
tiles = {"cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_plain.png","cg72_window_plain.png"},
paramtype = "light",
paramtype2 = "facedir",
--use_texture_alpha = true,
walkable = true,
is_ground_content = true,
groups = {crumbly=3},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.025, 0.5, 0.5, 0}, -- NodeBox1
{-0.5, 0.4375, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox2
{-0.5, -0.5, -0.0625, 0.5, -0.4375, 0.0625}, -- NodeBox3
{0.4375, -0.5, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox5
{-0.5, -0.5, -0.0625, -0.4375, 0.5, 0.0625}, -- NodeBox6
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.025, 0.5, 0.5, 0}, -- NodeBox1
{-0.5, 0.4375, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox2
{-0.5, -0.5, -0.0625, 0.5, -0.4375, 0.0625}, -- NodeBox3
{0.4375, -0.5, -0.0625, 0.5, 0.5, 0.0625}, -- NodeBox5
{-0.5, -0.5, -0.0625, -0.4375, 0.5, 0.0625}, -- NodeBox6
},
},
})
minetest.register_node("cg72extra:blinds", {
description = "Window Blinds",
tiles = {"cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png"},
paramtype = "light",
paramtype2 = "facedir",
--use_texture_alpha = true,
walkable = true,
is_ground_content = true,
groups = {crumbly=3},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.527123, 0.375, 0.3125, 0.523585, 0.5, 0.5}, -- NodeBox1
{-0.5, 0.304245, 0.3125, 0.5, 0.3125, 0.5}, -- NodeBox2
{-0.5, 0.244104, 0.3125, 0.5, 0.25, 0.5}, -- NodeBox3
{-0.5, 0.180424, 0.3125, 0.5, 0.1875, 0.5}, -- NodeBox4
{-0.5, 0.116745, 0.3125, 0.5, 0.125, 0.5}, -- NodeBox5
{-0.5, 0.0566037, 0.3125, 0.5, 0.0625, 0.5}, -- NodeBox6
{-0.5, -0.00707551, 0.3125, 0.5, 0, 0.5}, -- NodeBox7
{-0.5, -0.0707547, 0.3125, 0.5, -0.0625, 0.5}, -- NodeBox8
{-0.5, -0.130896, 0.3125, 0.5, -0.125, 0.5}, -- NodeBox9
{-0.5, -0.194576, 0.3125, 0.5, -0.1875, 0.5}, -- NodeBox10
{-0.5, -0.258255, 0.3125, 0.5, -0.25, 0.5}, -- NodeBox11
{-0.5, -0.318396, 0.3125, 0.5, -0.3125, 0.5}, -- NodeBox12
{-0.5, -0.5, 0.3125, 0.5, -0.4375, 0.5}, -- NodeBox13
{-0.5, -0.378538, 0.3125, 0.5, -0.375, 0.5}, -- NodeBox14
{-0.375, -0.5, 0.367925, -0.367925, 0.4375, 0.445755}, -- NodeBox15
{0.367924, -0.5, 0.367925, 0.375, 0.5, 0.445755}, -- NodeBox16
{0.375, 0.375, 0.25, 0.4375, 0.4375, 0.3125}, -- NodeBox17
{0.396226, -0.325, 0.268868, 0.417453, 0.375, 0.290094}, -- NodeBox18
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.527123, 0.375, 0.3125, 0.523585, 0.5, 0.5}, -- NodeBox1
{-0.5, 0.304245, 0.3125, 0.5, 0.3125, 0.5}, -- NodeBox2
{-0.5, 0.244104, 0.3125, 0.5, 0.25, 0.5}, -- NodeBox3
{-0.5, 0.180424, 0.3125, 0.5, 0.1875, 0.5}, -- NodeBox4
{-0.5, 0.116745, 0.3125, 0.5, 0.125, 0.5}, -- NodeBox5
{-0.5, 0.0566037, 0.3125, 0.5, 0.0625, 0.5}, -- NodeBox6
{-0.5, -0.00707551, 0.3125, 0.5, 0, 0.5}, -- NodeBox7
{-0.5, -0.0707547, 0.3125, 0.5, -0.0625, 0.5}, -- NodeBox8
{-0.5, -0.130896, 0.3125, 0.5, -0.125, 0.5}, -- NodeBox9
{-0.5, -0.194576, 0.3125, 0.5, -0.1875, 0.5}, -- NodeBox10
{-0.5, -0.258255, 0.3125, 0.5, -0.25, 0.5}, -- NodeBox11
{-0.5, -0.318396, 0.3125, 0.5, -0.3125, 0.5}, -- NodeBox12
{-0.5, -0.5, 0.3125, 0.5, -0.4375, 0.5}, -- NodeBox13
{-0.5, -0.378538, 0.3125, 0.5, -0.375, 0.5}, -- NodeBox14
{-0.375, -0.5, 0.367925, -0.367925, 0.4375, 0.445755}, -- NodeBox15
{0.367924, -0.5, 0.367925, 0.375, 0.5, 0.445755}, -- NodeBox16
},
},
})
minetest.register_node("cg72extra:blinds_thin", {
description = "Window Blinds",
tiles = {"cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png"},
paramtype = "light",
paramtype2 = "facedir",
--use_texture_alpha = true,
walkable = true,
is_ground_content = true,
groups = {crumbly=3},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.52, 0.375, 0.4375, 0.52, 0.5, 0.5}, -- NodeBox1
{-0.5, 0.304245, 0.4375, 0.5, 0.3125, 0.5}, -- NodeBox2
{-0.5, 0.244104, 0.4375, 0.5, 0.25, 0.5}, -- NodeBox3
{-0.5, 0.180424, 0.43755, 0.5, 0.1875, 0.5}, -- NodeBox4
{-0.5, 0.116745, 0.4375, 0.5, 0.125, 0.5}, -- NodeBox5
{-0.5, 0.0566037, 0.4375, 0.5, 0.0625, 0.5}, -- NodeBox6
{-0.5, -0.00707551, 0.4375, 0.5, 0, 0.5}, -- NodeBox7
{-0.5, -0.0707547, 0.4375, 0.5, -0.0625, 0.5}, -- NodeBox8
{-0.5, -0.130896, 0.4375, 0.5, -0.125, 0.5}, -- NodeBox9
{-0.5, -0.194576, 0.4375, 0.5, -0.1875, 0.5}, -- NodeBox10
{-0.5, -0.258255, 0.4375, 0.5, -0.25, 0.5}, -- NodeBox11
{-0.5, -0.318396, 0.4375, 0.5, -0.3125, 0.5}, -- NodeBox12
{-0.5, -0.5, 0.4375, 0.5, -0.4375, 0.5}, -- NodeBox13
{-0.5, -0.378538, 0.4375, 0.5, -0.375, 0.5}, -- NodeBox14
{-0.375, -0.49, 0.4575, -0.367925, 0.4375, 0.48}, -- NodeBox15
{0.367924, -0.49, 0.4575, 0.375, 0.5, 0.48}, -- NodeBox16
{0.375, 0.375, 0.375, 0.4375, 0.4375, 0.4375}, -- NodeBox17
{0.396226, -0.325, 0.4, 0.417453, 0.375, 0.42}, -- NodeBox18
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.52, 0.375, 0.4375, 0.52, 0.5, 0.5}, -- NodeBox1
{-0.5, 0.304245, 0.4375, 0.5, 0.3125, 0.5}, -- NodeBox2
{-0.5, 0.244104, 0.4375, 0.5, 0.25, 0.5}, -- NodeBox3
{-0.5, 0.180424, 0.43755, 0.5, 0.1875, 0.5}, -- NodeBox4
{-0.5, 0.116745, 0.4375, 0.5, 0.125, 0.5}, -- NodeBox5
{-0.5, 0.0566037, 0.4375, 0.5, 0.0625, 0.5}, -- NodeBox6
{-0.5, -0.00707551, 0.4375, 0.5, 0, 0.5}, -- NodeBox7
{-0.5, -0.0707547, 0.4375, 0.5, -0.0625, 0.5}, -- NodeBox8
{-0.5, -0.130896, 0.4375, 0.5, -0.125, 0.5}, -- NodeBox9
{-0.5, -0.194576, 0.4375, 0.5, -0.1875, 0.5}, -- NodeBox10
{-0.5, -0.258255, 0.4375, 0.5, -0.25, 0.5}, -- NodeBox11
{-0.5, -0.318396, 0.4375, 0.5, -0.3125, 0.5}, -- NodeBox12
{-0.5, -0.5, 0.4375, 0.5, -0.4375, 0.5}, -- NodeBox13
{-0.5, -0.378538, 0.4375, 0.5, -0.375, 0.5}, -- NodeBox14
{-0.375, -0.49, 0.4575, -0.367925, 0.4375, 0.48}, -- NodeBox15
{0.367924, -0.49, 0.4575, 0.375, 0.49, 0.48}, -- NodeBox16
},
},
})
minetest.register_node("cg72extra:window_closed", {
description = "Openable Window",
tiles = {"cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png"},
paramtype = "light",
paramtype2 = "facedir",
--use_texture_alpha = true,
walkable = true,
is_ground_content = true,
groups = {crumbly=3},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, 0.4375, 0, 0.5, 0.5, 0.0625}, -- NodeBox1
{-0.5, 0, 0, 0.5, 0.0625, 0.0625}, -- NodeBox2
{-0.5, 0.0625, 0, -0.4375, 0.4375, 0.0625}, -- NodeBox3
{0.4375, 0.0625, 0, 0.5, 0.4375, 0.0625}, -- NodeBox4
{-0.5, -0.5, -0.0625, 0.5, -0.4375, 0}, -- NodeBox6
{-0.5, 0, -0.0625, 0.5, 0.0625, 0}, -- NodeBox7
{-0.5, -0.4375, -0.0625, -0.4375, 0, 0}, -- NodeBox8
{0.4375, -0.4375, -0.0625, 0.5, 0, 0}, -- NodeBox9
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0.4375, 0, 0.5, 0.5, 0.0625}, -- NodeBox1
{-0.5, 0, 0, 0.5, 0.0625, 0.0625}, -- NodeBox2
{-0.5, 0.0625, 0, -0.4375, 0.4375, 0.0625}, -- NodeBox3
{0.4375, 0.0625, 0, 0.5, 0.4375, 0.0625}, -- NodeBox4
{-0.4375, 0.0625, 0.0219939, 0.4375, 0.4375, 0.0340182}, -- NodeBox5
{-0.5, -0.5, -0.0625, 0.5, -0.4375, 0}, -- NodeBox6
{-0.5, 0, -0.0625, 0.5, 0.0625, 0}, -- NodeBox7
{-0.5, -0.4375, -0.0625, -0.4375, 0, 0}, -- NodeBox8
{0.4375, -0.4375, -0.0625, 0.5, 0, 0}, -- NodeBox9
{-0.4375, -0.4375, -0.0441391, 0.4375, 0, -0.032115}, -- NodeBox10
},
},
on_rightclick = function ( pos, node, clicker, itemstack)
node.name = "cg72extra:window_open";
minetest.set_node(pos, node);
nodeupdate(pos)
end
})
minetest.register_node("cg72extra:window_open", {
description = "Openable Window",
tiles = {"cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png"},
paramtype = "light",
paramtype2 = "facedir",
--use_texture_alpha = true,
walkable = true,
is_ground_content = true,
groups = {crumbly=3,not_in_creative_inventory=1},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, 0.4375, 0, 0.5, 0.5, 0.0625}, -- NodeBox1
{-0.5, 0, 0, 0.5, 0.0625, 0.0625}, -- NodeBox2
{-0.5, 0.0625, 0, -0.4375, 0.4375, 0.0625}, -- NodeBox3
{0.4375, 0.0625, 0, 0.5, 0.4375, 0.0625}, -- NodeBox4
{-0.5, -0.0625, -0.0625, 0.5, 0, 0}, -- NodeBox6
{-0.5, 0.4375, -0.0625, 0.5, 0.5, 0}, -- NodeBox7
{-0.5, 0, -0.0625, -0.4375, 0.4375, 0}, -- NodeBox8
{0.4375, 0, -0.0625, 0.5, 0.4375, 0}, -- NodeBox9
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0.4375, 0, 0.5, 0.5, 0.0625}, -- NodeBox1
{-0.5, 0, 0, 0.5, 0.0625, 0.0625}, -- NodeBox2
{-0.5, 0.0625, 0, -0.4375, 0.4375, 0.0625}, -- NodeBox3
{0.4375, 0.0625, 0, 0.5, 0.4375, 0.0625}, -- NodeBox4
{-0.4375, 0.0625, 0.0219939, 0.4375, 0.4375, 0.0340182}, -- NodeBox5
{-0.5, -0.0625, -0.0625, 0.5, 0, 0}, -- NodeBox6
{-0.5, 0.4375, -0.0625, 0.5, 0.5, 0}, -- NodeBox7
{-0.5, 0, -0.0625, -0.4375, 0.4375, 0}, -- NodeBox8
{0.4375, 0, -0.0625, 0.5, 0.4375, 0}, -- NodeBox9
{-0.4375, 0, -0.0441391, 0.4375, 0.4375, -0.032115}, -- NodeBox10
},
},
on_rightclick = function ( pos, node, clicker, itemstack)
node.name = "cg72extra:window_closed";
minetest.set_node(pos, node);
nodeupdate(pos)
end
})
minetest.register_node("cg72extra:window_sill", {
description = "Window Sill",
tiles = {"cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png"},
paramtype = "light",
paramtype2 = "facedir",
--use_texture_alpha = true,
walkable = true,
is_ground_content = true,
groups = {crumbly=3},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5625, 0.4375, 0.3125, 0.5625, 0.5, 0.5}, -- NodeBox1
{-0.5, 0.25, 0.4375, 0.5, 0.4375, 0.5},
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5625, 0.4375, 0.3125, 0.5625, 0.5, 0.5}, -- NodeBox1
{-0.5, 0.25, 0.4375, 0.5, 0.4375, 0.5},
},
},
})
minetest.register_node("cg72extra:window_sill_full", {
description = "Window Sill",
tiles = {"cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png","cg72_window_s.png"},
paramtype = "light",
paramtype2 = "facedir",
--use_texture_alpha = true,
walkable = true,
is_ground_content = true,
groups = {crumbly=3},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5625, 0.4375, 0.3125, 0.5625, 0.5, 0.5}, -- NodeBox1
{-0.5, 0.25, 0.4375, 0.5, 0.4375, 0.5},
{-0.5, 0.492, 0.5, 0.5, 0.5001, 1.5},
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5625, 0.4375, 0.3125, 0.5625, 0.5, 0.5}, -- NodeBox1
{-0.5, 0.25, 0.4375, 0.5, 0.4375, 0.5},
{-0.5, 0.492, 0.5, 0.5, 0.5001, 1.5},
},
},
})