Make wrench usable independently of technic
| | |
| | | default |
| | | technic |
| | | technic_chests |
| | | technic_worldgen |
| | | technic? |
| | | technic_chests? |
| | | technic_worldgen? |
| | | intllib? |
| | | |
| | |
| | | end |
| | | |
| | | function wrench:register_node(name, def) |
| | | self.registered_nodes[name] = def |
| | | if minetest.registered_nodes[name] then |
| | | self.registered_nodes[name] = def |
| | | end |
| | | end |
| | | |
| | |
| | | }) |
| | | end |
| | | |
| | | for tier, _ in pairs(technic.machines) do |
| | | local ltier = tier:lower() |
| | | for i = 0, 8 do |
| | | wrench:register_node("technic:"..ltier.."_battery_box"..i, { |
| | | lists = {"src", "dst"}, |
| | | metas = {infotext = STRING, |
| | | formspec = STRING, |
| | | [tier.."_EU_demand"] = INT, |
| | | [tier.."_EU_supply"] = INT, |
| | | [tier.."_EU_input"] = INT, |
| | | internal_EU_charge = INT, |
| | | last_side_shown = INT}, |
| | | }) |
| | | if minetest.get_modpath("technic") then |
| | | for tier, _ in pairs(technic.machines) do |
| | | local ltier = tier:lower() |
| | | for i = 0, 8 do |
| | | wrench:register_node("technic:"..ltier.."_battery_box"..i, { |
| | | lists = {"src", "dst"}, |
| | | metas = {infotext = STRING, |
| | | formspec = STRING, |
| | | [tier.."_EU_demand"] = INT, |
| | | [tier.."_EU_supply"] = INT, |
| | | [tier.."_EU_input"] = INT, |
| | | internal_EU_charge = INT, |
| | | last_side_shown = INT}, |
| | | }) |
| | | end |
| | | end |
| | | end |
| | | |