From bd8c792fb0da2792d3df4d3cd5f66d10ee1c6ca6 Mon Sep 17 00:00:00 2001 From: mrkubax10 Date: Wed, 29 Mar 2023 10:27:02 +0200 Subject: [PATCH] Add solar panels crafts --- machines.lua | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/machines.lua b/machines.lua index 8764284..42703ad 100644 --- a/machines.lua +++ b/machines.lua @@ -382,6 +382,7 @@ local function registerSolarPanelGenerator(config) definition.groups._industrialtest_wrenchUnmountable=1 minetest.register_node("industrialtest:"..config.name,definition) end + registerSolarPanelGenerator({ name="solar_panel", displayName="Solar Panel", @@ -397,25 +398,54 @@ minetest.register_craft({ {"industrialtest:insulated_copper_cable","industrialtest:generator","industrialtest:insulated_copper_cable"} } }) + registerSolarPanelGenerator({ name="lv_solar_array", displayName="LV Solar Array", capacity=industrialtest.api.lvPowerFlow*4, flow=industrialtest.api.lvPowerFlow*2 }) +minetest.register_craft({ + type="shaped", + output="industrialtest:lv_solar_array", + recipe={ + {"industrialtest:solar_panel","industrialtest:solar_panel","industrialtest:solar_panel"}, + {"industrialtest:solar_panel","industrialtest:lv_transformer","industrialtest:solar_panel"}, + {"industrialtest:solar_panel","industrialtest:solar_panel","industrialtest:solar_panel"} + } +}) + registerSolarPanelGenerator({ name="mv_solar_array", displayName="MV Solar Array", capacity=industrialtest.api.mvPowerFlow*2, flow=industrialtest.api.mvPowerFlow }) +minetest.register_craft({ + type="shaped", + output="industrialtest:mv_solar_array", + recipe={ + {"industrialtest:lv_solar_array","industrialtest:lv_solar_array","industrialtest:lv_solar_array"}, + {"industrialtest:lv_solar_array","industrialtest:mv_transformer","industrialtest:lv_solar_array"}, + {"industrialtest:lv_solar_array","industrialtest:lv_solar_array","industrialtest:lv_solar_array"} + } +}) + registerSolarPanelGenerator({ name="hv_solar_array", displayName="HV Solar Array", capacity=industrialtest.api.hvPowerFlow*2, flow=industrialtest.api.hvPowerFlow }) --- TODO: Crafts for solar arrays +minetest.register_craft({ + type="shaped", + output="industrialtest:hv_solar_array", + recipe={ + {"industrialtest:mv_solar_array","industrialtest:mv_solar_array","industrialtest:mv_solar_array"}, + {"industrialtest:mv_solar_array","industrialtest:hv_transformer","industrialtest:mv_solar_array"}, + {"industrialtest:mv_solar_array","industrialtest:mv_solar_array","industrialtest:mv_solar_array"} + } +}) -- Item processing machines local function registerSimpleElectricItemProcessor(config)