Add solar panels crafts

This commit is contained in:
mrkubax10 2023-03-29 10:27:02 +02:00
parent e64e3a1fcf
commit bd8c792fb0

View File

@ -382,6 +382,7 @@ local function registerSolarPanelGenerator(config)
definition.groups._industrialtest_wrenchUnmountable=1 definition.groups._industrialtest_wrenchUnmountable=1
minetest.register_node("industrialtest:"..config.name,definition) minetest.register_node("industrialtest:"..config.name,definition)
end end
registerSolarPanelGenerator({ registerSolarPanelGenerator({
name="solar_panel", name="solar_panel",
displayName="Solar Panel", displayName="Solar Panel",
@ -397,25 +398,54 @@ minetest.register_craft({
{"industrialtest:insulated_copper_cable","industrialtest:generator","industrialtest:insulated_copper_cable"} {"industrialtest:insulated_copper_cable","industrialtest:generator","industrialtest:insulated_copper_cable"}
} }
}) })
registerSolarPanelGenerator({ registerSolarPanelGenerator({
name="lv_solar_array", name="lv_solar_array",
displayName="LV Solar Array", displayName="LV Solar Array",
capacity=industrialtest.api.lvPowerFlow*4, capacity=industrialtest.api.lvPowerFlow*4,
flow=industrialtest.api.lvPowerFlow*2 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({ registerSolarPanelGenerator({
name="mv_solar_array", name="mv_solar_array",
displayName="MV Solar Array", displayName="MV Solar Array",
capacity=industrialtest.api.mvPowerFlow*2, capacity=industrialtest.api.mvPowerFlow*2,
flow=industrialtest.api.mvPowerFlow 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({ registerSolarPanelGenerator({
name="hv_solar_array", name="hv_solar_array",
displayName="HV Solar Array", displayName="HV Solar Array",
capacity=industrialtest.api.hvPowerFlow*2, capacity=industrialtest.api.hvPowerFlow*2,
flow=industrialtest.api.hvPowerFlow 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 -- Item processing machines
local function registerSimpleElectricItemProcessor(config) local function registerSimpleElectricItemProcessor(config)