diff options
author | Tim <t4im@users.noreply.github.com> | 2015-01-31 14:47:06 +0100 |
---|---|---|
committer | Tim <t4im@users.noreply.github.com> | 2015-01-31 14:47:06 +0100 |
commit | 810ae99008667209508f553e6b08e53e63bf1029 (patch) | |
tree | e7252426166658fc833b7e5d956d9eadd2935d15 /signal_tubes.lua | |
parent | 4dc3f159c9114d65571122909e252167579dc90b (diff) |
reduce texturename repetition via __index
Diffstat (limited to 'signal_tubes.lua')
-rw-r--r-- | signal_tubes.lua | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/signal_tubes.lua b/signal_tubes.lua index 44605c8..75a1159 100644 --- a/signal_tubes.lua +++ b/signal_tubes.lua @@ -1,6 +1,5 @@ if pipeworks.enable_detector_tube then - local detector_plain_textures = {"pipeworks_detector_tube_plain.png", "pipeworks_detector_tube_plain.png", "pipeworks_detector_tube_plain.png", - "pipeworks_detector_tube_plain.png", "pipeworks_detector_tube_plain.png", "pipeworks_detector_tube_plain.png"} + local detector_plain_textures = { "pipeworks_detector_tube_plain.png" } local detector_inv_texture = "pipeworks_detector_tube_inv.png" local detector_tube_step = 2 * tonumber(minetest.setting_get("dedicated_server_step")) pipeworks.register_tube("pipeworks:detector_tube_on", "Detecting Pneumatic Tube Segment on (you hacker you)", @@ -65,21 +64,15 @@ if pipeworks.enable_detector_tube then end if pipeworks.enable_conductor_tube then - local conductor_plain_textures = {"pipeworks_conductor_tube_plain.png", "pipeworks_conductor_tube_plain.png", "pipeworks_conductor_tube_plain.png", - "pipeworks_conductor_tube_plain.png", "pipeworks_conductor_tube_plain.png", "pipeworks_conductor_tube_plain.png"} - local conductor_noctr_textures = {"pipeworks_conductor_tube_noctr.png", "pipeworks_conductor_tube_noctr.png", "pipeworks_conductor_tube_noctr.png", - "pipeworks_conductor_tube_noctr.png", "pipeworks_conductor_tube_noctr.png", "pipeworks_conductor_tube_noctr.png"} - local conductor_end_textures = {"pipeworks_conductor_tube_end.png", "pipeworks_conductor_tube_end.png", "pipeworks_conductor_tube_end.png", - "pipeworks_conductor_tube_end.png", "pipeworks_conductor_tube_end.png", "pipeworks_conductor_tube_end.png"} + local conductor_plain_textures = { "pipeworks_conductor_tube_plain.png" } + local conductor_noctr_textures = { "pipeworks_conductor_tube_noctr.png" } + local conductor_end_textures = { "pipeworks_conductor_tube_end.png" } local conductor_short_texture = "pipeworks_conductor_tube_short.png" local conductor_inv_texture = "pipeworks_conductor_tube_inv.png" - local conductor_on_plain_textures = {"pipeworks_conductor_tube_on_plain.png", "pipeworks_conductor_tube_on_plain.png", "pipeworks_conductor_tube_on_plain.png", - "pipeworks_conductor_tube_on_plain.png", "pipeworks_conductor_tube_on_plain.png", "pipeworks_conductor_tube_on_plain.png"} - local conductor_on_noctr_textures = {"pipeworks_conductor_tube_on_noctr.png", "pipeworks_conductor_tube_on_noctr.png", "pipeworks_conductor_tube_on_noctr.png", - "pipeworks_conductor_tube_on_noctr.png", "pipeworks_conductor_tube_on_noctr.png", "pipeworks_conductor_tube_on_noctr.png"} - local conductor_on_end_textures = {"pipeworks_conductor_tube_on_end.png", "pipeworks_conductor_tube_on_end.png", "pipeworks_conductor_tube_on_end.png", - "pipeworks_conductor_tube_on_end.png", "pipeworks_conductor_tube_on_end.png", "pipeworks_conductor_tube_on_end.png"} + local conductor_on_plain_textures = { "pipeworks_conductor_tube_on_plain.png" } + local conductor_on_noctr_textures = { "pipeworks_conductor_tube_on_noctr.png" } + local conductor_on_end_textures = { "pipeworks_conductor_tube_on_end.png" } pipeworks.register_tube("pipeworks:conductor_tube_off", "Conducting Pneumatic Tube Segment", conductor_plain_textures, conductor_noctr_textures, conductor_end_textures, conductor_short_texture, conductor_inv_texture, |