summaryrefslogtreecommitdiff
path: root/infrastructure/advanced_aircraft_warning_light.lua
blob: c07e8c087b9cba3fde30301cd2613c2c47e8f20b (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
-- Aircraft warning light
minetest.register_node("infrastructure:aircraft_warning_light", {
	description = "Aircraft warning light",
	tiles = {
		{name="infrastructure_aircraft_warning_light_top_anim.png",animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=4}},
		"infrastructure_traffic_lights_side.png",
		{name="infrastructure_aircraft_warning_light_side_anim.png",animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=4}},
		{name="infrastructure_aircraft_warning_light_side_anim.png",animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=4}},
		{name="infrastructure_aircraft_warning_light_side_anim.png",animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=4}},
		{name="infrastructure_aircraft_warning_light_side_anim.png",animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=4}}
	},
	use_texture_alpha = "clip",
	drawtype = "nodebox",
	paramtype = "light",
	groups = {cracky = 1},
	light_source = AIRCRAFT_WARNING_LIGHT_LIGHT_RANGE,
	node_box = {
		type = "fixed",
			fixed = {
				{-1/128, 1/4, -1/128, 1/128, 3/8, 1/128},

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

				{-1/16, -1/8, -1/16, 1/16, 1/16, 1/16},

				{-1/4, -1/4, -1/8, 1/4, -1/8, 1/8},
				{-1/8, -1/4, -1/4, 1/8, -1/8, 1/4},

				{-1/8, -3/8, -1/8, 1/8, -1/4, 1/8},

				{-3/16, -1/2, -3/16, 3/16, -3/8, 3/16}
			}
	},
	selection_box = {
		type = "fixed",
			fixed = {
				{-1/128, 1/4, -1/128, 1/128, 3/8, 1/128},

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

				{-1/16, -1/8, -1/16, 1/16, 1/16, 1/16},

				{-1/4, -1/4, -1/8, 1/4, -1/8, 1/8},
				{-1/8, -1/4, -1/4, 1/8, -1/8, 1/4},

				{-1/8, -3/8, -1/8, 1/8, -1/4, 1/8},

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

minetest.register_alias("infrastructure:aircraft_warning_light_bright", "infrastructure:aircraft_warning_light")
minetest.register_alias("infrastructure:aircraft_warning_light_dark", "infrastructure:aircraft_warning_light")