diff --git a/cannon.lua b/cannon.lua index 034bd13..df9fa7b 100644 --- a/cannon.lua +++ b/cannon.lua @@ -98,20 +98,22 @@ local register_spacecannon = function(def) end }) - + -- top, bottom + local textures = { + "cannon_blank.png" .. cable_entry, + "cannon_front_" .. def.color .. ".png", + "cannon_blank.png" .. cable_entry, + "cannon_blank.png" .. cable_entry, + "cannon_blank.png" .. cable_entry, + "cannon_blank.png" .. cable_entry + } + if def.textures then + textures = def.textures + end minetest.register_node("spacecannon:cannon_" .. def.color, { description = def.name .. " (" .. def.desc .. ")", - - -- top, bottom - tiles = { - "cannon_blank.png" .. cable_entry, - "cannon_front_" .. def.color .. ".png", - "cannon_blank.png" .. cable_entry, - "cannon_blank.png" .. cable_entry, - "cannon_blank.png" .. cable_entry, - "cannon_blank.png" .. cable_entry - }, + tiles = textures, groups = {cracky=3,oddly_breakable_by_hand=3,technic_machine = 1, technic_hv = 1}, drop = "spacecannon:cannon_" .. def.color, @@ -286,6 +288,14 @@ register_spacecannon({ color = "blue", name = "Railgun cannon", desc = "fast, 2x penetrating damage", + textures = { + "railgun_blank.png" .. cable_entry, + "railgun_front.png", + "railgun_blank.png" .. cable_entry, + "railgun_blank.png" .. cable_entry, + "railgun_top_bottom.png", + "railgun_top_bottom.png", + }, is_th = false, range = 0, storage_require_mod = 1, @@ -302,6 +312,14 @@ register_spacecannon({ color = "purple", name = "Helical railgun cannon", desc = "fast, 4x penetrating damage", + textures = { + "railgun_blank.png" .. cable_entry, + "helical_railgun_front.png", + "railgun_blank.png" .. cable_entry, + "railgun_blank.png" .. cable_entry, + "helical_railgun_top_bottom.png", + "helical_railgun_top_bottom.png", + }, is_th = false, range = 0, storage_require_mod = 1.5, diff --git a/textures/helical_railgun_front.png b/textures/helical_railgun_front.png new file mode 100755 index 0000000..ed1df7b Binary files /dev/null and b/textures/helical_railgun_front.png differ diff --git a/textures/helical_railgun_top_bottom.png b/textures/helical_railgun_top_bottom.png new file mode 100755 index 0000000..ce6dda6 Binary files /dev/null and b/textures/helical_railgun_top_bottom.png differ diff --git a/textures/railgun_blank.png b/textures/railgun_blank.png new file mode 100755 index 0000000..a85a222 Binary files /dev/null and b/textures/railgun_blank.png differ diff --git a/textures/railgun_front.png b/textures/railgun_front.png new file mode 100755 index 0000000..03409b1 Binary files /dev/null and b/textures/railgun_front.png differ diff --git a/textures/railgun_top_bottom.png b/textures/railgun_top_bottom.png new file mode 100755 index 0000000..f519d23 Binary files /dev/null and b/textures/railgun_top_bottom.png differ