@@ -98,20 +98,22 @@ local register_spacecannon = function(def)
98
98
end
99
99
})
100
100
101
-
101
+ -- top, bottom
102
+ local textures = {
103
+ " cannon_blank.png" .. cable_entry ,
104
+ " cannon_front_" .. def .color .. " .png" ,
105
+ " cannon_blank.png" .. cable_entry ,
106
+ " cannon_blank.png" .. cable_entry ,
107
+ " cannon_blank.png" .. cable_entry ,
108
+ " cannon_blank.png" .. cable_entry
109
+ }
110
+ if def .textures then
111
+ textures = def .textures
112
+ end
102
113
103
114
minetest .register_node (" spacecannon:cannon_" .. def .color , {
104
115
description = def .name .. " (" .. def .desc .. " )" ,
105
-
106
- -- top, bottom
107
- tiles = {
108
- " cannon_blank.png" .. cable_entry ,
109
- " cannon_front_" .. def .color .. " .png" ,
110
- " cannon_blank.png" .. cable_entry ,
111
- " cannon_blank.png" .. cable_entry ,
112
- " cannon_blank.png" .. cable_entry ,
113
- " cannon_blank.png" .. cable_entry
114
- },
116
+ tiles = textures ,
115
117
116
118
groups = {cracky = 3 ,oddly_breakable_by_hand = 3 ,technic_machine = 1 , technic_hv = 1 },
117
119
drop = " spacecannon:cannon_" .. def .color ,
@@ -286,6 +288,14 @@ register_spacecannon({
286
288
color = " blue" ,
287
289
name = " Railgun cannon" ,
288
290
desc = " fast, 2x penetrating damage" ,
291
+ textures = {
292
+ " railgun_blank.png" .. cable_entry ,
293
+ " railgun_front.png" ,
294
+ " railgun_blank.png" .. cable_entry ,
295
+ " railgun_blank.png" .. cable_entry ,
296
+ " railgun_top_bottom.png" ,
297
+ " railgun_top_bottom.png" ,
298
+ },
289
299
is_th = false ,
290
300
range = 0 ,
291
301
storage_require_mod = 1 ,
@@ -302,6 +312,14 @@ register_spacecannon({
302
312
color = " purple" ,
303
313
name = " Helical railgun cannon" ,
304
314
desc = " fast, 4x penetrating damage" ,
315
+ textures = {
316
+ " railgun_blank.png" .. cable_entry ,
317
+ " helical_railgun_front.png" ,
318
+ " railgun_blank.png" .. cable_entry ,
319
+ " railgun_blank.png" .. cable_entry ,
320
+ " helical_railgun_top_bottom.png" ,
321
+ " helical_railgun_top_bottom.png" ,
322
+ },
305
323
is_th = false ,
306
324
range = 0 ,
307
325
storage_require_mod = 1.5 ,
0 commit comments