mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-07 06:06:10 -04:00
Add a minetest_game API documentation
This commit is contained in:
parent
30e57bcc99
commit
7e5dc6c374
2 changed files with 205 additions and 3 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue