diff --git a/game_api.txt b/game_api.txt index a3edcfe8..791a7f92 100644 --- a/game_api.txt +++ b/game_api.txt @@ -218,6 +218,8 @@ Use `minetest.raillike_group()` to get the group value. | Node type | Raillike group name +-----------------------+---------------------------------- | default:rail | "rail" +| tnt:gunpowder | "gunpowder" +| tnt:gunpowder_burning | "gunpowder" Example: If you want to add a new rail type and want it to connect with default:rail, diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua index 1554bf23..5eab9eb9 100644 --- a/mods/tnt/init.lua +++ b/mods/tnt/init.lua @@ -270,14 +270,14 @@ minetest.register_node("tnt:gunpowder", { paramtype = "light", sunlight_propagates = true, walkable = false, - tiles = {"tnt_gunpowder.png",}, + tiles = {"tnt_gunpowder_straight.png", "tnt_gunpowder_curved.png", "tnt_gunpowder_t_junction.png", "tnt_gunpowder_crossing.png"}, inventory_image = "tnt_gunpowder_inventory.png", wield_image = "tnt_gunpowder_inventory.png", selection_box = { type = "fixed", fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, }, - groups = {dig_immediate=2,attached_node=1}, + groups = {dig_immediate=2,attached_node=1,connect_to_raillike=minetest.raillike_group("gunpowder")}, sounds = default.node_sound_leaves_defaults(), on_punch = function(pos, node, puncher) @@ -297,7 +297,34 @@ minetest.register_node("tnt:gunpowder_burning", { walkable = false, light_source = 5, tiles = {{ - name = "tnt_gunpowder_burning_animated.png", + name = "tnt_gunpowder_burning_straight_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }, + { + name = "tnt_gunpowder_burning_curved_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }, + { + name = "tnt_gunpowder_burning_t_junction_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }, + { + name = "tnt_gunpowder_burning_crossing_animated.png", animation = { type = "vertical_frames", aspect_w = 16, @@ -310,7 +337,7 @@ minetest.register_node("tnt:gunpowder_burning", { fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, }, drop = "", - groups = {dig_immediate=2,attached_node=1}, + groups = {dig_immediate=2,attached_node=1,connect_to_raillike=minetest.raillike_group("gunpowder")}, sounds = default.node_sound_leaves_defaults(), on_timer = function(pos, elapsed) for dx = -1, 1 do diff --git a/mods/tnt/textures/tnt_gunpowder.png b/mods/tnt/textures/tnt_gunpowder.png deleted file mode 100644 index 52153e92..00000000 Binary files a/mods/tnt/textures/tnt_gunpowder.png and /dev/null differ diff --git a/mods/tnt/textures/tnt_gunpowder_burning.png b/mods/tnt/textures/tnt_gunpowder_burning.png deleted file mode 100644 index fa7d107b..00000000 Binary files a/mods/tnt/textures/tnt_gunpowder_burning.png and /dev/null differ diff --git a/mods/tnt/textures/tnt_gunpowder_burning_animated.png b/mods/tnt/textures/tnt_gunpowder_burning_animated.png deleted file mode 100644 index 5ee24840..00000000 Binary files a/mods/tnt/textures/tnt_gunpowder_burning_animated.png and /dev/null differ diff --git a/mods/tnt/textures/tnt_gunpowder_burning_crossing_animated.png b/mods/tnt/textures/tnt_gunpowder_burning_crossing_animated.png new file mode 100644 index 00000000..a901f7bd Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_burning_crossing_animated.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_burning_curved_animated.png b/mods/tnt/textures/tnt_gunpowder_burning_curved_animated.png new file mode 100644 index 00000000..bc018065 Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_burning_curved_animated.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_burning_straight_animated.png b/mods/tnt/textures/tnt_gunpowder_burning_straight_animated.png new file mode 100644 index 00000000..c860acef Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_burning_straight_animated.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_burning_t_junction_animated.png b/mods/tnt/textures/tnt_gunpowder_burning_t_junction_animated.png new file mode 100644 index 00000000..a556072c Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_burning_t_junction_animated.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_crossing.png b/mods/tnt/textures/tnt_gunpowder_crossing.png new file mode 100644 index 00000000..916c84ee Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_crossing.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_curved.png b/mods/tnt/textures/tnt_gunpowder_curved.png new file mode 100644 index 00000000..cb8b4eac Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_curved.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_straight.png b/mods/tnt/textures/tnt_gunpowder_straight.png new file mode 100644 index 00000000..8ab0e3c8 Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_straight.png differ diff --git a/mods/tnt/textures/tnt_gunpowder_t_junction.png b/mods/tnt/textures/tnt_gunpowder_t_junction.png new file mode 100644 index 00000000..ac997a7a Binary files /dev/null and b/mods/tnt/textures/tnt_gunpowder_t_junction.png differ