mirror of
https://github.com/theFox6/microexpansion.git
synced 2024-11-24 16:13:46 +01:00
Added Support for Mineclone2,Mineclonia,Mineclone5 closes #13
This commit is contained in:
parent
8955264b6b
commit
30b7894dbe
4
mod.conf
4
mod.conf
@ -1,4 +1,4 @@
|
||||
name = microexpansion
|
||||
description = A storage managing solution to get an overview over all your items.
|
||||
depends = default
|
||||
optional_depends = pipeworks,basic_materials
|
||||
optional_depends = pipeworks,basic_materials,mcl_furnaces,mcl_core
|
||||
supported_games = mineclone2,mineclonia,minetest_game
|
||||
|
@ -4,16 +4,30 @@
|
||||
local me = microexpansion
|
||||
local substitute_basic_materials = microexpansion.settings.simple_craft == true or not minetest.get_modpath("basic_materials")
|
||||
|
||||
local gold_wire_recipe = nil
|
||||
|
||||
-- [register item] Gold Wire
|
||||
me.register_item("gold_wire", {
|
||||
description = "Gold Wire",
|
||||
groups = { wire = 1 },
|
||||
recipe = substitute_basic_materials and {
|
||||
if minetest.get_modpath("mcl_core") then
|
||||
gold_wire_recipe = {
|
||||
{ 2, {
|
||||
{"mcl_core:gold_ingot", "mcl_core:stick"},
|
||||
{"mcl_core:stick", ""}
|
||||
},
|
||||
},
|
||||
}
|
||||
else
|
||||
gold_wire_recipe = {
|
||||
{ 2, {
|
||||
{"default:gold_ingot", "default:stick"},
|
||||
{"default:stick", ""}
|
||||
},
|
||||
},
|
||||
} or nil,
|
||||
}
|
||||
|
||||
end
|
||||
|
||||
-- [register item] Gold Wire
|
||||
me.register_item("gold_wire", {
|
||||
description = "Gold Wire",
|
||||
groups = { wire = 1 },
|
||||
recipe = substitute_basic_materials and gold_wire_recipe or nil,
|
||||
})
|
||||
|
@ -4,26 +4,52 @@ local me = microexpansion
|
||||
|
||||
-- custom items that are used by multiple devices
|
||||
|
||||
-- [register item] Steel Infused Obsidian Ingot
|
||||
me.register_item("steel_infused_obsidian_ingot", {
|
||||
description = "Steel Infused Obsidian Ingot",
|
||||
recipe = {
|
||||
local steel_infused_obsidian_ingot_recipe = nil
|
||||
local machine_casing_recipe = nil
|
||||
|
||||
if minetest.get_modpath("mcl_core") then
|
||||
steel_infused_obsidian_ingot_recipe = {
|
||||
{ 2, {
|
||||
{ "mcl_core:iron_ingot", "mcl_core:obsidian", "mcl_core:iron_ingot" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
machine_casing_recipe = {
|
||||
{ 1, {
|
||||
{"mcl_core:iron_ingot", "mcl_core:iron_ingot", "mcl_core:iron_ingot"},
|
||||
{"mcl_core:iron_ingot", "mcl_copper:copper_ingot", "mcl_core:iron_ingot"},
|
||||
{"mcl_core:iron_ingot", "mcl_core:iron_ingot", "mcl_core:iron_ingot"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
else
|
||||
steel_infused_obsidian_ingot_recipe = {
|
||||
{ 2, {
|
||||
{ "default:steel_ingot", "default:obsidian_shard", "default:steel_ingot" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
-- [register item] Machine Casing
|
||||
me.register_item("machine_casing", {
|
||||
description = "Machine Casing",
|
||||
recipe = {
|
||||
machine_casing_recipe = {
|
||||
{ 1, {
|
||||
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:copper_ingot", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
end
|
||||
-- [register item] Steel Infused Obsidian Ingot
|
||||
me.register_item("steel_infused_obsidian_ingot", {
|
||||
description = "Steel Infused Obsidian Ingot",
|
||||
recipe = steel_infused_obsidian_ingot_recipe,
|
||||
})
|
||||
|
||||
-- [register item] Machine Casing
|
||||
me.register_item("machine_casing", {
|
||||
description = "Machine Casing",
|
||||
recipe = machine_casing_recipe,
|
||||
})
|
||||
|
@ -52,15 +52,15 @@ item_transfer.register_io_device("exporter", {
|
||||
connect_sides = { "left" },
|
||||
recipe = {
|
||||
{ 1, {
|
||||
{"", "basic_materials:ic", "default:steel_ingot" },
|
||||
{"", "basic_materials:ic", iron_ingot_ingredient },
|
||||
{"", "microexpansion:cable", "group:shovel" },
|
||||
{"", "", "default:steel_ingot" },
|
||||
{"", "", iron_ingot_ingredient },
|
||||
},
|
||||
},
|
||||
{ 1, {
|
||||
{"", "microexpansion:logic_chip", "default:steel_ingot" },
|
||||
{"", "microexpansion:logic_chip", iron_ingot_ingredient },
|
||||
{"", "microexpansion:cable", "group:shovel" },
|
||||
{"", "", "default:steel_ingot" },
|
||||
{"", "", iron_ingot_ingredient },
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -59,15 +59,15 @@ item_transfer.register_io_device("importer", {
|
||||
connect_sides = { "left" },
|
||||
recipe = {
|
||||
{ 1, {
|
||||
{"", "basic_materials:ic", "default:steel_ingot" },
|
||||
{"", "basic_materials:ic", iron_ingot_ingredient },
|
||||
{"", "microexpansion:cable", "group:hoe" },
|
||||
{"", "", "default:steel_ingot" },
|
||||
{"", "", iron_ingot_ingredient },
|
||||
},
|
||||
},
|
||||
{ 1, {
|
||||
{"", "microexpansion:logic_chip", "default:steel_ingot" },
|
||||
{"", "microexpansion:logic_chip", iron_ingot_ingredient },
|
||||
{"", "microexpansion:cable", "group:hoe" },
|
||||
{"", "", "default:steel_ingot" },
|
||||
{"", "", iron_ingot_ingredient },
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -4,6 +4,15 @@ local module_path = microexpansion.get_module_path("item_transfer")
|
||||
|
||||
microexpansion.require_module("network")
|
||||
|
||||
|
||||
-- Iron Ingot Ingredient for MineClone2
|
||||
iron_ingot_ingredient = nil
|
||||
if minetest.get_modpath("mcl_core") then
|
||||
iron_ingot_ingredient = "mcl_core:iron_ingot"
|
||||
else
|
||||
iron_ingot_ingredient = "default:steel_ingot"
|
||||
end
|
||||
|
||||
-- Load API
|
||||
dofile(module_path.."/api.lua")
|
||||
|
||||
|
@ -11,7 +11,7 @@ me.register_item("upgrade_base", {
|
||||
recipe = {
|
||||
{ 1, {
|
||||
{ "microexpansion:quartz_crystal" },
|
||||
{ "default:steel_ingot" },
|
||||
{ iron_ingot_ingredient },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -4,6 +4,29 @@ local me = microexpansion
|
||||
local network = me.network
|
||||
local access_level = microexpansion.constants.security.access_levels
|
||||
|
||||
local ctrl_recipe = nil
|
||||
if minetest.get_modpath("mcl_core") then
|
||||
ctrl_recipe = {
|
||||
{ 1, {
|
||||
{"mcl_core:iron_ingot", "mcl_copper:copper_ingot", "mcl_core:iron_ingot"},
|
||||
{"mcl_core:iron_ingot", "microexpansion:machine_casing", "mcl_core:iron_ingot"},
|
||||
{"mcl_core:iron_ingot", "microexpansion:cable", "mcl_core:iron_ingot"},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
ctrl_recipe = {
|
||||
{ 1, {
|
||||
{"default:steel_ingot", "microexpansion:steel_infused_obsidian_ingot", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "microexpansion:machine_casing", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "microexpansion:cable", "default:steel_ingot"},
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
-- [register node] Controller
|
||||
me.register_node("ctrl", {
|
||||
description = "ME Controller",
|
||||
@ -15,14 +38,7 @@ me.register_node("ctrl", {
|
||||
"ctrl_sides",
|
||||
"ctrl_sides"
|
||||
},
|
||||
recipe = {
|
||||
{ 1, {
|
||||
{"default:steel_ingot", "microexpansion:steel_infused_obsidian_ingot", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "microexpansion:machine_casing", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "microexpansion:cable", "default:steel_ingot"},
|
||||
},
|
||||
}
|
||||
},
|
||||
recipe = ctrl_recipe,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = {
|
||||
|
@ -127,6 +127,28 @@ local function update_security(pos,_,ev)
|
||||
meta:set_string("formspec", security_formspec(pos))
|
||||
end
|
||||
|
||||
local security_recipe = nil
|
||||
if minetest.get_modpath("mcl_core") then
|
||||
security_recipe = {
|
||||
{ 1, {
|
||||
{"mcl_core:iron_ingot", "mcl_copper:copper_ingot", "mcl_core:iron_ingot"},
|
||||
{"mcl_core:iron_ingot", "microexpansion:machine_casing", "mcl_core:iron_ingot"},
|
||||
{"mcl_core:iron_ingot", "microexpansion:cable", "mcl_core:iron_ingot"},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
security_recipe = {
|
||||
{ 1, {
|
||||
{"default:steel_ingot", "default:copper_ingot", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "microexpansion:machine_casing", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "microexpansion:cable", "default:steel_ingot"},
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
-- [me chest] Register node
|
||||
microexpansion.register_node("security", {
|
||||
description = "ME Security Terminal",
|
||||
@ -139,14 +161,7 @@ microexpansion.register_node("security", {
|
||||
"chest_side",
|
||||
"security_front",
|
||||
},
|
||||
recipe = {
|
||||
{ 1, {
|
||||
{"default:steel_ingot", "default:copper_ingot", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "microexpansion:machine_casing", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "microexpansion:cable", "default:steel_ingot"},
|
||||
},
|
||||
}
|
||||
},
|
||||
recipe = security_recipe,
|
||||
is_ground_content = false,
|
||||
groups = { cracky = 1, me_connect = 1 },
|
||||
paramtype = "light",
|
||||
|
@ -1,6 +1,27 @@
|
||||
-- power/gen.lua
|
||||
|
||||
local me = microexpansion
|
||||
local fuel_fired_generator_recipe = nil
|
||||
if minetest.get_modpath("mcl_core") then
|
||||
fuel_fired_generator_recipe = {
|
||||
{ 1, {
|
||||
{ "mcl_core:iron_ingot", "mcl_furnaces:furnace", "mcl_core:iron_ingot" },
|
||||
{ "mcl_core:iron_ingot", "microexpansion:machine_casing", "mcl_core:iron_ingot" },
|
||||
{ "mcl_core:iron_ingot", "mcl_core:iron_ingot", "mcl_core:iron_ingot" },
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
fuel_fired_generator_recipe = {
|
||||
{ 1, {
|
||||
{ "default:steel_ingot", "default:furnace", "default:steel_ingot" },
|
||||
{"default:steel_ingot", "microexpansion:machine_casing", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
-- [register node] Fuel Fired Generator
|
||||
me.register_machine("fuel_fired_generator", {
|
||||
@ -14,14 +35,7 @@ me.register_machine("fuel_fired_generator", {
|
||||
"machine_sides",
|
||||
"fuelgen_front",
|
||||
},
|
||||
recipe = {
|
||||
{ 1, {
|
||||
{ "default:steel_ingot", "default:furnace", "default:steel_ingot" },
|
||||
{"default:steel_ingot", "microexpansion:machine_casing", "default:steel_ingot" },
|
||||
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
|
||||
},
|
||||
}
|
||||
},
|
||||
recipe = fuel_fired_generator_recipe,
|
||||
groups = { cracky = 1 },
|
||||
connect_sides = "machine",
|
||||
paramtype2 = "facedir",
|
||||
|
@ -268,6 +268,26 @@ local function update_drive(pos,_,ev)
|
||||
end
|
||||
end
|
||||
|
||||
if minetest.get_modpath("mcl_core") then
|
||||
drive_recipe = {
|
||||
{ 1, {
|
||||
{"mcl_core:iron_ingot", "mcl_chests:chest", "mcl_core:iron_ingot"},
|
||||
{"mcl_core:iron_ingot", "microexpansion:machine_casing", "mcl_core:iron_ingot"},
|
||||
{"mcl_core:iron_ingot", "mcl_chests:chest", "mcl_core:iron_ingot"},
|
||||
},
|
||||
}}
|
||||
|
||||
else
|
||||
drive_recipe = {
|
||||
{ 1, {
|
||||
{"default:steel_ingot", "default:chest", "default:steel_ingot" },
|
||||
{"default:steel_ingot", "microexpansion:machine_casing", "default:steel_ingot" },
|
||||
{"default:steel_ingot", "default:chest", "default:steel_ingot" },
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
-- [me chest] Register node
|
||||
microexpansion.register_node("drive", {
|
||||
description = "ME Drive",
|
||||
@ -280,14 +300,7 @@ microexpansion.register_node("drive", {
|
||||
"chest_side",
|
||||
"drive_full",
|
||||
},
|
||||
recipe = {
|
||||
{ 1, {
|
||||
{"default:steel_ingot", "default:chest", "default:steel_ingot" },
|
||||
{"default:steel_ingot", "microexpansion:machine_casing", "default:steel_ingot" },
|
||||
{"default:steel_ingot", "default:chest", "default:steel_ingot" },
|
||||
},
|
||||
}
|
||||
},
|
||||
recipe = drive_recipe,
|
||||
is_ground_content = false,
|
||||
groups = { cracky = 1, me_connect = 1 },
|
||||
paramtype = "light",
|
||||
|
@ -2,6 +2,33 @@
|
||||
|
||||
--TODO: use storagecomp for crafting
|
||||
|
||||
if minetest.get_modpath("mcl_core") then
|
||||
microexpansion.register_cell("cell_1k", {
|
||||
description = "1k ME Storage Cell",
|
||||
capacity = 1000,
|
||||
recipe = {
|
||||
{ 1, {
|
||||
{"moreores:tin_ingot", "mcl_copper:copper_ingot", "moreores:tin_ingot"},
|
||||
{"mcl_copper:copper_ingot", "microexpansion:steel_infused_obsidian_ingot", "mcl_copper:copper_ingot"},
|
||||
{"moreores:tin_ingot", "mcl_copper:copper_ingot", "moreores:tin_ingot"}
|
||||
}},
|
||||
}
|
||||
})
|
||||
|
||||
microexpansion.register_cell("cell_2k", {
|
||||
description = "2k ME Storage Cell",
|
||||
capacity = 2000,
|
||||
recipe = {
|
||||
{ 1, {
|
||||
{"mcl_copper:copper_ingot", "mcl_core:iron_ingot", "mcl_copper:copper_ingot"},
|
||||
{"mcl_core:iron_ingot", "mcl_core:obsidian", "mcl_core:iron_ingot"},
|
||||
{"mcl_copper:copper_ingot", "mcl_core:iron_ingot", "mcl_copper:copper_ingot"}
|
||||
}},
|
||||
{ 1, "shapeless", {"microexpansion:cell_1k", "microexpansion:cell_1k"}}
|
||||
},
|
||||
})
|
||||
else
|
||||
|
||||
-- [drive] 8k
|
||||
microexpansion.register_cell("cell_1k", {
|
||||
description = "1k ME Storage Cell",
|
||||
@ -31,6 +58,8 @@ microexpansion.register_cell("cell_2k", {
|
||||
},
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
-- [drive] 16k
|
||||
microexpansion.register_cell("cell_4k", {
|
||||
description = "4k ME Storage Cell",
|
||||
|
@ -82,6 +82,29 @@ local function update_chest(pos,_,ev)
|
||||
meta:set_string("formspec", chest_formspec(pos, 1, "main", page_max))
|
||||
end
|
||||
|
||||
local term_recipe = nil
|
||||
if minetest.get_modpath("mcl_core") then
|
||||
term_recipe = {
|
||||
{ 1, {
|
||||
{"mcl_core:iron_ingot", "mcl_chests:chest", "mcl_core:iron_ingot"},
|
||||
{"mcl_core:iron_ingot", "microexpansion:machine_casing", "mcl_core:iron_ingot"},
|
||||
{"mcl_core:iron_ingot", "microexpansion:cable", "mcl_core:iron_ingot"},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
term_recipe = {
|
||||
{ 1, {
|
||||
{"default:steel_ingot", "default:chest", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "microexpansion:machine_casing", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "microexpansion:cable", "default:steel_ingot"},
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
-- [me chest] Register node
|
||||
microexpansion.register_node("term", {
|
||||
description = "ME Terminal",
|
||||
@ -94,14 +117,7 @@ microexpansion.register_node("term", {
|
||||
"chest_side",
|
||||
"chest_front",
|
||||
},
|
||||
recipe = {
|
||||
{ 1, {
|
||||
{"default:steel_ingot", "default:chest", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "microexpansion:machine_casing", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "microexpansion:cable", "default:steel_ingot"},
|
||||
},
|
||||
}
|
||||
},
|
||||
recipe = term_recipe,
|
||||
is_ground_content = false,
|
||||
groups = { cracky = 1, me_connect = 1, tubedevice = 1, tubedevice_receiver = 1 },
|
||||
paramtype = "light",
|
||||
|
Loading…
Reference in New Issue
Block a user