Add a minetest_game API documentation

This commit is contained in:
webdesigner97 2014-07-05 22:45:46 +02:00 committed by BlockMen
parent 30e57bcc99
commit 7e5dc6c374
2 changed files with 205 additions and 3 deletions

View file

@ -1,3 +1,5 @@
xpanes = {}
local function rshift(x, by)
return math.floor(x / 2 ^ by)
end
@ -61,7 +63,7 @@ local sb_full_blocks = {
{-0.06, -0.5, -0.5, 0.06, 0.5, 0.5}
}
--register panes and bars
local function register_panes(name, def)
function xpanes.register_pane(name, def)
for i = 1, 15 do
local need = {}
local cnt = 0
@ -122,7 +124,7 @@ end
minetest.register_on_placenode(update_nearby)
minetest.register_on_dignode(update_nearby)
register_panes("pane", {
xpanes.register_pane("pane", {
description = "Glass Pane",
tiles = {"xpanes_space.png"},
drawtype = "airlike",
@ -147,7 +149,7 @@ register_panes("pane", {
}
})
register_panes("bar", {
xpanes.register_pane("bar", {
description = "Iron bar",
tiles = {"xpanes_space.png"},
drawtype = "airlike",