pipeworks has button on/off, button label, and button "base" cached

used them wherever possible
This commit is contained in:
Vanessa Ezekowitz
2017-04-11 19:16:50 -04:00
parent 54004f4951
commit fab2c492c4
5 changed files with 42 additions and 42 deletions

View File

@ -168,13 +168,13 @@ function technic.register_base_machine(data)
if not string.find(node.name, ":lv_") then
form_buttons = fs_helpers.cycling_button(
meta,
"image_button[0,4.3;1,0.6",
pipeworks.button_base,
"splitstacks",
{
{text="", texture="pipeworks_button_off.png", addopts="false;false;pipeworks_button_interm.png"},
{text="", texture="pipeworks_button_on.png", addopts="false;false;pipeworks_button_interm.png"}
pipeworks.button_off,
pipeworks.button_on
}
).."label[0.9,4.31;Allow splitting incoming stacks from tubes]"
)..pipeworks.button_label
end
meta:set_string("infotext", machine_desc:format(tier))
@ -202,13 +202,13 @@ function technic.register_base_machine(data)
if not string.find(node.name, ":lv_") then
form_buttons = fs_helpers.cycling_button(
meta,
"image_button[0,4.3;1,0.6",
pipeworks.button_base,
"splitstacks",
{
{text="", texture="pipeworks_button_off.png", addopts="false;false;pipeworks_button_interm.png"},
{text="", texture="pipeworks_button_on.png", addopts="false;false;pipeworks_button_interm.png"}
pipeworks.button_off,
pipeworks.button_on
}
).."label[0.9,4.31;Allow splitting incoming stacks from tubes]"
)..pipeworks.button_label
end
meta:set_string("formspec", formspec..form_buttons)
end,
@ -246,13 +246,13 @@ function technic.register_base_machine(data)
if not string.find(node.name, ":lv_") then
form_buttons = fs_helpers.cycling_button(
meta,
"image_button[0,4.3;1,0.6",
pipeworks.button_base,
"splitstacks",
{
{text="", texture="pipeworks_button_off.png", addopts="false;false;pipeworks_button_interm.png"},
{text="", texture="pipeworks_button_on.png", addopts="false;false;pipeworks_button_interm.png"}
pipeworks.button_off,
pipeworks.button_on
}
).."label[0.9,4.31;Allow splitting incoming stacks from tubes]"
)..pipeworks.button_label
end
meta:set_string("formspec", formspec..form_buttons)
end,