summaryrefslogtreecommitdiff
path: root/common.lua
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-01-27 23:14:05 +0100
committerest31 <MTest31@outlook.com>2015-01-27 23:17:10 +0100
commit52cfe9f2779df9c15a931fec33507ccc355964f3 (patch)
tree857cea97a1f64e65f255902db9d15c3bce9105a9 /common.lua
parent8b22593f5528e2d493d5dcb577634d3f7a1ce967 (diff)
downloadpipeworks-52cfe9f2779df9c15a931fec33507ccc355964f3.tar
pipeworks-52cfe9f2779df9c15a931fec33507ccc355964f3.tar.gz
pipeworks-52cfe9f2779df9c15a931fec33507ccc355964f3.tar.bz2
pipeworks-52cfe9f2779df9c15a931fec33507ccc355964f3.tar.xz
pipeworks-52cfe9f2779df9c15a931fec33507ccc355964f3.zip
Add intermediate button state for sorttube enabler
Image supplied by VanessaE.
Diffstat (limited to 'common.lua')
-rwxr-xr-xcommon.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/common.lua b/common.lua
index 9be13d0..1ee734f 100755
--- a/common.lua
+++ b/common.lua
@@ -129,15 +129,17 @@ function fs_helpers.cycling_button(meta, base, meta_name, values)
local val = values[current_value + 1]
local text
local texture_name = nil
+ local addopts = nil
--when we get a table, we know the caller wants an image_button
if type(val) == "table" then
text = val["text"]
texture_name = val["texture"]
+ addopts = val["addopts"]
else
text = val
end
local field = "fs_helpers_cycling:"..new_value..":"..meta_name
- return base..";"..(texture_name and texture_name..";" or "")..field..";"..minetest.formspec_escape(text).."]"
+ return base..";"..(texture_name and texture_name..";" or "")..field..";"..minetest.formspec_escape(text)..(addopts and ";"..addopts or "").."]"
end
---------