| | |
| | | for k, v in pairs(groups) do active_groups[k] = v end |
| | | |
| | | local generator_formspec = |
| | | "invsize[8,9;]".. |
| | | "size[8,9;]".. |
| | | "label[0,0;"..S("Fuel-Fired %s Generator"):format(tier).."]".. |
| | | "list[current_name;src;3,1;1,1;]".. |
| | | "image[4,1;1,1;default_furnace_fire_bg.png]".. |
| | |
| | | -- Burn another piece of fuel |
| | | if burn_time == 0 then |
| | | local inv = meta:get_inventory() |
| | | if not inv:is_empty("src") then |
| | | if not inv:is_empty("src") then |
| | | local fuellist = inv:get_list("src") |
| | | local fuel |
| | | local afterfuel |
| | |
| | | } |
| | | )..pipeworks.button_label |
| | | end |
| | | meta:set_string("formspec", |
| | | meta:set_string("formspec", |
| | | "size[8, 9]".. |
| | | "label[0, 0;"..minetest.formspec_escape(desc).."]".. |
| | | "list[current_name;src;3, 1;1, 1;]".. |
| | |
| | | ) |
| | | end |
| | | |
| | | local tentry = tube_entry |
| | | if ltier == "lv" then tentry = "" end |
| | | |
| | | minetest.register_node("technic:"..ltier.."_generator", { |
| | | description = desc, |
| | | tiles = { |
| | | "technic_"..ltier.."_generator_top.png"..tube_entry, |
| | | "technic_machine_bottom.png"..tube_entry, |
| | | "technic_"..ltier.."_generator_side.png"..tube_entry, |
| | | "technic_"..ltier.."_generator_side.png"..tube_entry, |
| | | "technic_"..ltier.."_generator_side.png"..tube_entry, |
| | | "technic_"..ltier.."_generator_top.png"..tentry, |
| | | "technic_machine_bottom.png"..tentry, |
| | | "technic_"..ltier.."_generator_side.png"..tentry, |
| | | "technic_"..ltier.."_generator_side.png"..tentry, |
| | | "technic_"..ltier.."_generator_side.png"..tentry, |
| | | "technic_"..ltier.."_generator_front.png" |
| | | }, |
| | | }, |
| | | paramtype2 = "facedir", |
| | | groups = groups, |
| | | connect_sides = {"bottom", "back", "left", "right"}, |
| | |
| | | } |
| | | )..pipeworks.button_label |
| | | end |
| | | meta:set_string("formspec", |
| | | meta:set_string("formspec", |
| | | "size[8, 9]".. |
| | | "label[0, 0;"..minetest.formspec_escape(desc).."]".. |
| | | "list[current_name;src;3, 1;1, 1;]".. |
| | |
| | | local burn_time = meta:get_int("burn_time") |
| | | local percent = math.floor(burn_time / burn_totaltime * 100) |
| | | |
| | | meta:set_string("formspec", |
| | | meta:set_string("formspec", |
| | | "size[8, 9]".. |
| | | "label[0, 0;"..minetest.formspec_escape(desc).."]".. |
| | | "list[current_name;src;3, 1;1, 1;]".. |