Skip to content

Commit

Permalink
Merge pull request #24 from gabriel1379/feature/add_alter_for_technic…
Browse files Browse the repository at this point in the history
…_farming_basic_materials

Add alternative crafting recipe for technic + basic materials (to eschew farming if also present)
  • Loading branch information
linewriter1024 authored Feb 26, 2024
2 parents 71b413b + 466740c commit 2f8c5a1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
31 changes: 29 additions & 2 deletions crafts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local technic_path = minetest.get_modpath("technic")
local chains_path = minetest.get_modpath("chains")
local mineclone_path = core.get_modpath("mcl_core") and mcl_core
local aurum_path = core.get_modpath("aurum") and aurum
local basic_materials_path = core.get_modpath("basic_materials")

if mineclone_path then
minetest.register_craft({
Expand Down Expand Up @@ -82,9 +83,35 @@ elseif technic_path and chains_path then
{"chains:chain", "default:diamond", "chains:chain"}
},
})
elseif technic_path and basic_materials_path then
minetest.register_craft({
output = "elevator:elevator_off",
recipe = {
{"technic:cast_iron_ingot", "basic_materials:chain_steel", "technic:cast_iron_ingot"},
{"technic:cast_iron_ingot", "default:mese_crystal", "technic:cast_iron_ingot"},
{"technic:stainless_steel_ingot", "default:glass", "technic:stainless_steel_ingot"},
},
})

minetest.register_craft({
output = "elevator:shaft",
recipe = {
{"technic:cast_iron_ingot", "default:glass"},
{"default:glass", "basic_materials:chain_steel"},
},
})

minetest.register_craft({
output = "elevator:motor",
recipe = {
{"default:diamond", "technic:control_logic_unit", "default:diamond"},
{"default:steelblock", "technic:motor", "default:steelblock"},
{"basic_materials:chain_steel", "default:diamond", "basic_materials:chain_steel"}
},
})
elseif technic_path and farming and farming.mod and ( farming.mod == "redo" or farming.mod == "undo" ) then
-- add alternative recipe with hemp rope
minetest.register_craft({
-- add alternative recipe with hemp rope
minetest.register_craft({
output = "elevator:elevator_off",
recipe = {
{"technic:cast_iron_ingot", "farming:hemp_rope", "technic:cast_iron_ingot"},
Expand Down
2 changes: 1 addition & 1 deletion mod.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = elevator
description = An entity-based elevator allowing fast realtime travel in Minetest. Supports Minetest Game, MineClone2, and Aurum
optional_depends = default, technic, homedecor, chains, farming, mcl_core, mcl_sounds, aurum, screwdriver, doc_items
optional_depends = default, technic, homedecor, chains, farming, mcl_core, mcl_sounds, aurum, screwdriver, doc_items, basic_materials
min_minetest_version = 5.4

0 comments on commit 2f8c5a1

Please sign in to comment.