summaryrefslogtreecommitdiff
path: root/infrastructure
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2016-01-14 13:12:59 -0600
committercheapie <no-email-for-you@example.com>2016-01-14 13:12:59 -0600
commit37fa30cb0f3b3afd701b0ce63500164a5c5dc998 (patch)
treea86b466ce0ac5156f298add16caa6c4c67df1686 /infrastructure
parent08a391e4ccb78ed6be7ae4a710b146b7890ddce9 (diff)
downloadroads-37fa30cb0f3b3afd701b0ce63500164a5c5dc998.tar
roads-37fa30cb0f3b3afd701b0ce63500164a5c5dc998.tar.gz
roads-37fa30cb0f3b3afd701b0ce63500164a5c5dc998.tar.bz2
roads-37fa30cb0f3b3afd701b0ce63500164a5c5dc998.tar.xz
roads-37fa30cb0f3b3afd701b0ce63500164a5c5dc998.zip
Convert aircraft warning light to animated textures
Diffstat (limited to 'infrastructure')
-rw-r--r--infrastructure/advanced_aircraft_warning_light.lua172
-rw-r--r--infrastructure/textures/infrastructure_aircraft_warning_light_side_anim.pngbin0 -> 550 bytes
-rw-r--r--infrastructure/textures/infrastructure_aircraft_warning_light_side_bright.pngbin399 -> 0 bytes
-rw-r--r--infrastructure/textures/infrastructure_aircraft_warning_light_side_dark.pngbin411 -> 0 bytes
-rw-r--r--infrastructure/textures/infrastructure_aircraft_warning_light_top_anim.pngbin0 -> 701 bytes
-rw-r--r--infrastructure/textures/infrastructure_aircraft_warning_light_top_bright.pngbin597 -> 0 bytes
-rw-r--r--infrastructure/textures/infrastructure_aircraft_warning_light_top_dark.pngbin601 -> 0 bytes
7 files changed, 54 insertions, 118 deletions
diff --git a/infrastructure/advanced_aircraft_warning_light.lua b/infrastructure/advanced_aircraft_warning_light.lua
index c46edd4..1361f7b 100644
--- a/infrastructure/advanced_aircraft_warning_light.lua
+++ b/infrastructure/advanced_aircraft_warning_light.lua
@@ -1,119 +1,55 @@
-- Aircraft warning light
- minetest.register_abm( {
- nodenames = {"infrastructure:aircraft_warning_light_bright", "infrastructure:aircraft_warning_light_dark"},
- interval = 2,
- chance = 1,
- action = function(pos, node)
- local node = minetest.env:get_node(pos)
- if node.name == "infrastructure:aircraft_warning_light_bright" then
- minetest.swap_node(pos, {name = "infrastructure:aircraft_warning_light_dark", param2 = node.param2})
- elseif node.name == "infrastructure:aircraft_warning_light_dark" then
- minetest.swap_node(pos, {name = "infrastructure:aircraft_warning_light_bright", param2 = node.param2})
- end
- end
- })
-
- minetest.register_node("infrastructure:aircraft_warning_light_bright", {
- description = "Aircraft warning light",
- tiles = {
- "infrastructure_aircraft_warning_light_top_bright.png",
- "infrastructure_traffic_lights_side.png",
- "infrastructure_aircraft_warning_light_side_bright.png",
- "infrastructure_aircraft_warning_light_side_bright.png",
- "infrastructure_aircraft_warning_light_side_bright.png",
- "infrastructure_aircraft_warning_light_side_bright.png"
- },
- 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_node("infrastructure:aircraft_warning_light_dark", {
- tiles = {
- "infrastructure_aircraft_warning_light_top_dark.png",
- "infrastructure_traffic_lights_side.png",
- "infrastructure_aircraft_warning_light_side_dark.png",
- "infrastructure_aircraft_warning_light_side_dark.png",
- "infrastructure_aircraft_warning_light_side_dark.png",
- "infrastructure_aircraft_warning_light_side_dark.png"
- },
- drawtype = "nodebox",
- paramtype = "light",
- groups = {cracky = 1, not_in_creative_inventory = 1},
- drop = "infrastructure:aircraft_warning_light_bright",
- 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", "infrastructure:aircraft_warning_light_bright")
+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}}
+ },
+ 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")
diff --git a/infrastructure/textures/infrastructure_aircraft_warning_light_side_anim.png b/infrastructure/textures/infrastructure_aircraft_warning_light_side_anim.png
new file mode 100644
index 0000000..40c1558
--- /dev/null
+++ b/infrastructure/textures/infrastructure_aircraft_warning_light_side_anim.png
Binary files differ
diff --git a/infrastructure/textures/infrastructure_aircraft_warning_light_side_bright.png b/infrastructure/textures/infrastructure_aircraft_warning_light_side_bright.png
deleted file mode 100644
index 3105665..0000000
--- a/infrastructure/textures/infrastructure_aircraft_warning_light_side_bright.png
+++ /dev/null
Binary files differ
diff --git a/infrastructure/textures/infrastructure_aircraft_warning_light_side_dark.png b/infrastructure/textures/infrastructure_aircraft_warning_light_side_dark.png
deleted file mode 100644
index a696f31..0000000
--- a/infrastructure/textures/infrastructure_aircraft_warning_light_side_dark.png
+++ /dev/null
Binary files differ
diff --git a/infrastructure/textures/infrastructure_aircraft_warning_light_top_anim.png b/infrastructure/textures/infrastructure_aircraft_warning_light_top_anim.png
new file mode 100644
index 0000000..8f223dc
--- /dev/null
+++ b/infrastructure/textures/infrastructure_aircraft_warning_light_top_anim.png
Binary files differ
diff --git a/infrastructure/textures/infrastructure_aircraft_warning_light_top_bright.png b/infrastructure/textures/infrastructure_aircraft_warning_light_top_bright.png
deleted file mode 100644
index a71f59b..0000000
--- a/infrastructure/textures/infrastructure_aircraft_warning_light_top_bright.png
+++ /dev/null
Binary files differ
diff --git a/infrastructure/textures/infrastructure_aircraft_warning_light_top_dark.png b/infrastructure/textures/infrastructure_aircraft_warning_light_top_dark.png
deleted file mode 100644
index b3d91a6..0000000
--- a/infrastructure/textures/infrastructure_aircraft_warning_light_top_dark.png
+++ /dev/null
Binary files differ