summaryrefslogtreecommitdiff
path: root/mario/blocks.lua
blob: 7005de34490689fe2b41da331f158654e615f00a (plain)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
minetest.register_node("mario:platform",{
	description = "Platform",
	tiles = {
			"mario_blue.png",
			},
	drawtype = "normal",
	paramtype = "light",
	groups = {cracky = 3},
})
minetest.register_node("mario:grey",{
	description = "Grey",
	tiles = {
			"mario_grey.png",
			},
	drawtype = "normal",
	paramtype = "light",
	light_source = 14,
	groups = {cracky = 3},
})
minetest.register_node("mario:border",{
	description = "Border",
	tiles = {
			"mario_border.png",
			},
	drawtype = "normal",
	paramtype = "light",
	groups = {cracky = 3},
})
minetest.register_node("mario:brick",{
	description = "Brick",
	tiles = {
			"mario_brick.png",
			},
	drawtype = "normal",
	paramtype = "light",
	groups = {cracky = 3},
})
minetest.register_node("mario:glass", {
	description = "Glass",
	tiles = {"mario_grey.png","mario_glass.png"},
	drawtype = "glasslike_framed",
	paramtype = "light",
	groups = {cracky = 2},
})
minetest.register_node("mario:coin", {
	description = "Coin",
	tiles = {"mario_coin.png"},
	drawtype = "plantlike",
	paramtype = "light",
	walkable = false,
	groups = {cracky = 2},
	on_destruct = function(pos)
		minetest.sound_play("mario-coin", {pos = pos,max_hear_distance = 40,gain = 10.0,})
	end,
})

local nbox = {
		type = "fixed",
		fixed = {
			{-0.25, -0.5, -0.25, 0.25, -0.0625, 0.25},
			{-0.3125, -0.4375, -0.3125, 0.3125, 0.4375, 0.3125},
			{-0.375, -0.375, -0.375, 0.375, 0.375, 0.375},
			{-0.375, -0.1875, -0.4375, 0.375, 0.3125, 0.4375},
			{-0.4375, -0.1875, -0.5, 0.4375, 0.1875, 0.5},
			{-0.1875, 0.4375, -0.1875, 0.1875, 0.5, 0.1875},
			{-0.5, -0.1875, -0.4375, 0.5, 0.1875, 0.4375},
			{-0.4375, -0.1875, -0.375, 0.4375, 0.3125, 0.375},
		}
	}

minetest.register_node("mario:mushroom",{
	description = "Mushroom",
	tiles = {
			"mario_mushroom_top.png",
			"mario_mushroom_bottom.png",
			"mario_mushroom.png",
			"mario_mushroom.png",
			"mario_mushroom.png",
			"mario_mushroom.png",
			},
	drawtype = "nodebox",
	paramtype = "light",
	groups = {cracky = 3},
	node_box = nbox,
	on_destruct = function(pos)
		minetest.sound_play("mario-bonus", {pos = pos,max_hear_distance = 40,gain = 10.0,})
	end,
})

minetest.register_node("mario:mushroom_green",{
	description = "Green Mushroom",
	tiles = {
			"mario_mushroom_top_g.png",
			"mario_mushroom_bottom.png",
			"mario_mushroom_g.png",
			"mario_mushroom_g.png",
			"mario_mushroom_g.png",
			"mario_mushroom_g.png",
			},
	drawtype = "nodebox",
	paramtype = "light",
	groups = {cracky = 3},
	node_box = nbox,
	on_destruct = function(pos)
		minetest.sound_play("mario-1-up", {pos = pos,max_hear_distance = 40,gain = 10.0,})
	end,
})