Skip to content

Commit

Permalink
alloy recipes to mcl_craftguide
Browse files Browse the repository at this point in the history
  • Loading branch information
nonfreegithub committed Nov 1, 2023
1 parent f00f556 commit 79c7e99
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ read_globals = {
"craftguide", "i3", "mtt",
"vizlib", "mcl_sounds", "mcl_vars",
"mcl_worlds", "mcl_buckets", "mcl_formspec",
"mcl_craftguide",

-- Only used in technic/machines/MV/lighting.lua (disabled)
"isprotect", "homedecor_expect_infinite_stacks",
Expand Down
16 changes: 16 additions & 0 deletions technic/machines/register/alloy_recipes.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@

local S = technic.getter
local mat = technic.materials
local has_mcl_craftguide = minetest.get_modpath("mcl_craftguide")

technic.register_recipe_type("alloy", {
description = S("Alloying"),
icon = "technic_mv_alloy_furnace_front.png",
input_size = 2,
})

if has_mcl_craftguide then
mcl_craftguide.register_craft_type("alloy", {
description = "Alloying",
icon = "technic_mv_alloy_furnace_front.png",
})
end

function technic.register_alloy_recipe(data)
data.time = data.time or 6
technic.register_recipe("alloy", data)
Expand Down Expand Up @@ -56,4 +64,12 @@ end

for _, data in pairs(recipes) do
technic.register_alloy_recipe({input = {data[1], data[2]}, output = data[3], time = data[4]})
if has_mcl_craftguide then
mcl_craftguide.register_craft({
type = "alloy",
width = 1,
output = data[3],
items = {data[1], data[2]},
})
end
end
2 changes: 1 addition & 1 deletion technic/mod.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name = technic
depends = pipeworks, technic_worldgen, basic_materials
optional_depends = mcl_core, mcl_sounds, default, bucket, mesecons, mesecons_mvps, digilines, digiline_remote, unified_inventory, dye, craftguide, i3, mtt, vizlib, moreores, mcl_buckets, mcl_explosions
optional_depends = mcl_core, mcl_sounds, default, bucket, mesecons, mesecons_mvps, digilines, digiline_remote, unified_inventory, dye, craftguide, i3, mtt, vizlib, moreores, mcl_buckets, mcl_explosions, mcl_craftguide

0 comments on commit 79c7e99

Please sign in to comment.