diff options
author | Tim <t4im@users.noreply.github.com> | 2015-01-29 22:36:16 +0100 |
---|---|---|
committer | Tim <t4im@users.noreply.github.com> | 2015-01-29 22:38:01 +0100 |
commit | 5a79a60e0f592e34433139c16bb02aca65e38d63 (patch) | |
tree | e6edad62ac93647dc6416f8b620a0a317a66511e /tubes.lua | |
parent | a98af7bf159a06bb1fd26902ef4c91105aabe2a0 (diff) |
use the default tube textures as fallback for any missing textures during tube registration
Diffstat (limited to 'tubes.lua')
-rw-r--r-- | tubes.lua | 39 |
1 files changed, 17 insertions, 22 deletions
@@ -10,7 +10,24 @@ local REGISTER_COMPATIBILITY = true local vti = {4, 3, 2, 1, 6, 5} +local default_textures = { + noctrs = { "pipeworks_tube_noctr.png", "pipeworks_tube_noctr.png", "pipeworks_tube_noctr.png", + "pipeworks_tube_noctr.png", "pipeworks_tube_noctr.png", "pipeworks_tube_noctr.png"}, + plain = { "pipeworks_tube_plain.png", "pipeworks_tube_plain.png", "pipeworks_tube_plain.png", + "pipeworks_tube_plain.png", "pipeworks_tube_plain.png", "pipeworks_tube_plain.png"}, + ends = { "pipeworks_tube_end.png", "pipeworks_tube_end.png", "pipeworks_tube_end.png", + "pipeworks_tube_end.png", "pipeworks_tube_end.png", "pipeworks_tube_end.png"}, + short = "pipeworks_tube_short.png", + inv = "pipeworks_tube_inv.png", +} + local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, ends, short, inv, special, connects, style) + noctrs = noctrs or default_textures.noctrs + plain = plain or default_textures.plain + ends = ends or default_textures.ends + short = short or default_textures.short + inv = inv or default_textures.inv + local outboxes = {} local outsel = {} local outimgs = {} @@ -215,25 +232,3 @@ if REGISTER_COMPATIBILITY then end }) end - - --- the default tube and default textures -pipeworks.noctr_textures = {"pipeworks_tube_noctr.png", "pipeworks_tube_noctr.png", "pipeworks_tube_noctr.png", - "pipeworks_tube_noctr.png", "pipeworks_tube_noctr.png", "pipeworks_tube_noctr.png"} -pipeworks.plain_textures = {"pipeworks_tube_plain.png", "pipeworks_tube_plain.png", "pipeworks_tube_plain.png", - "pipeworks_tube_plain.png", "pipeworks_tube_plain.png", "pipeworks_tube_plain.png"} -pipeworks.end_textures = {"pipeworks_tube_end.png", "pipeworks_tube_end.png", "pipeworks_tube_end.png", - "pipeworks_tube_end.png", "pipeworks_tube_end.png", "pipeworks_tube_end.png"} -pipeworks.short_texture = "pipeworks_tube_short.png" -pipeworks.inv_texture = "pipeworks_tube_inv.png" - -pipeworks.register_tube("pipeworks:tube", "Pneumatic tube segment", pipeworks.plain_textures, pipeworks.noctr_textures, pipeworks.end_textures, pipeworks.short_texture, pipeworks.inv_texture) - -minetest.register_craft( { - output = "pipeworks:tube_1 6", - recipe = { - { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }, - { "", "", "" }, - { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" } - }, -}) |