1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-12-23 07:10:19 +01:00

Add gunpowder trails

Uses group “connect_to_raillike”
This commit is contained in:
Wuzzy 2015-02-21 01:05:19 +01:00 committed by Novatux
parent 016fa0da40
commit 0aebf864d1
13 changed files with 33 additions and 4 deletions

View File

@ -218,6 +218,8 @@ Use `minetest.raillike_group(<Name>)` to get the group value.
| Node type | Raillike group name | Node type | Raillike group name
+-----------------------+---------------------------------- +-----------------------+----------------------------------
| default:rail | "rail" | default:rail | "rail"
| tnt:gunpowder | "gunpowder"
| tnt:gunpowder_burning | "gunpowder"
Example: Example:
If you want to add a new rail type and want it to connect with default:rail, If you want to add a new rail type and want it to connect with default:rail,

View File

@ -270,14 +270,14 @@ minetest.register_node("tnt:gunpowder", {
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
walkable = false, 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", inventory_image = "tnt_gunpowder_inventory.png",
wield_image = "tnt_gunpowder_inventory.png", wield_image = "tnt_gunpowder_inventory.png",
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, 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(), sounds = default.node_sound_leaves_defaults(),
on_punch = function(pos, node, puncher) on_punch = function(pos, node, puncher)
@ -297,7 +297,34 @@ minetest.register_node("tnt:gunpowder_burning", {
walkable = false, walkable = false,
light_source = 5, light_source = 5,
tiles = {{ 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 = { animation = {
type = "vertical_frames", type = "vertical_frames",
aspect_w = 16, 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}, fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
}, },
drop = "", 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(), sounds = default.node_sound_leaves_defaults(),
on_timer = function(pos, elapsed) on_timer = function(pos, elapsed)
for dx = -1, 1 do for dx = -1, 1 do

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B