1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
local sbox = {
type = "fixed",
fixed = {
{-0.45, -0.45, -0.45, 0.45, 0.45, 0.45}
}
}
local cbox = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
}
}
local blocks = {
{"Floor", "floor", "floor","floor",0,true},
{"Wall", "wall", "wall","floor",11,true},
{"Wallc", "wallc", "wallc","floor",11,true},
{"Walle", "walle", "walle","floor",11,true},
{"Wall Walkthrough","walk_wall","wall","floor",11,false},
}
for i in ipairs(blocks) do
local des = blocks[i][1]
local itm = blocks[i][2]
local i1 = blocks[i][3]
local i2 = blocks[i][4]
local lit = blocks[i][5]
local tf = blocks[i][6]
minetest.register_node("mypacman:"..itm, {
description = des,
tiles = {
"mypacman_"..i1..".png",
"mypacman_"..i2..".png",
"mypacman_walls.png",
"mypacman_walls.png",
"mypacman_walls.png",
"mypacman_walls.png",
},
drawtype = "normal",
paramtype = "light",
paramtype2 = "facedir",
light_source = lit,
walkable = tf,
groups = {disable_jump = 1, immortal=1, not_in_creative_inventory = 1},
selection_box = sbox,
collision_box = cbox,
})
end
--Glass
minetest.register_node("mypacman:glass", {
description = "glass",
tiles = {"mypacman_glass.png"},
drawtype = "glasslike",
paramtype = "light",
paramtype2 = "facedir",
groups = {immortal=1,not_in_creative_inventory = 1},
selection_box = cbox,
collision_box = cbox,
})
minetest.register_node("mypacman:glassw", {
description = "glassw",
tiles = {"mypacman_glass.png"},
drawtype = "glasslike",
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = {immortal=1,not_in_creative_inventory = 1},
selection_box = cbox,
colision_box = cbox,
})
|