summaryrefslogtreecommitdiff
path: root/wrench/technic.lua
diff options
context:
space:
mode:
Diffstat (limited to 'wrench/technic.lua')
-rw-r--r--wrench/technic.lua28
1 files changed, 15 insertions, 13 deletions
diff --git a/wrench/technic.lua b/wrench/technic.lua
index c07e3d7..c404180 100644
--- a/wrench/technic.lua
+++ b/wrench/technic.lua
@@ -323,19 +323,21 @@ for i = 1, 15 do
})
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