summaryrefslogtreecommitdiff
path: root/infrastructure/advanced_warning_light.lua
blob: 0ed5b628883bf35641745b7ed3ad8952fed694ff (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
-- Warning light

minetest.register_node("infrastructure:warning_light", {
	description = "Warning light",
	tiles = {
		"infrastructure_warning_light_top.png",
		"infrastructure_warning_light_bottom.png",
		"infrastructure_warning_light_right.png",
		"infrastructure_warning_light_left.png",
		"infrastructure_warning_light_back.png",
		{name="infrastructure_warning_light_front_anim.png",animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=3}},
	},
	drawtype = "nodebox",
	paramtype = "light",
	paramtype2 = "facedir",
	groups = {cracky = 1},
	light_source = WARNING_LIGHT_LIGHT_RANGE,
	node_box = {
		type = "fixed",
			fixed = {
				{-5/16, -3/8, 0, 5/16, 0, 0},

				{-1/4, -5/16, 0, 0, -1/16, 1/8},

				{1/16, -1/2, -1/8, 5/16, -1/4, 1/8},

				{-1/16, -1/2, -1/16, 1/16, -3/8, 1/16}
			}
	},
	selection_box = {
		type = "fixed",
			fixed = {
				{-5/16, -3/8, 0, 5/16, 0, 0},

				{-1/4, -5/16, 0 + 0.01, 0, -1/16, 1/8},

				{1/16, -1/2, -1/8, 5/16, -1/4, 1/8},

				{-1/16, -1/2, -1/16, 1/16, -3/8, 1/16}
			}
	}
})



minetest.register_alias("infrastructure:warning_light_bright", "infrastructure:warning_light")
minetest.register_alias("infrastructure:warning_light_dark", "infrastructure:warning_light")