From 5cbae926f80bb09228fbdcbd2515ec8a3377172c Mon Sep 17 00:00:00 2001 From: KasKatto <48245049+KasKatto@users.noreply.github.com> Date: Thu, 13 Aug 2020 14:15:27 +0100 Subject: [PATCH 1/7] Update fusioncrafter.lua Fixed crafting for recipes with the same core and injector item --- fusioncrafter.lua | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/fusioncrafter.lua b/fusioncrafter.lua index 8433234..d5ba642 100644 --- a/fusioncrafter.lua +++ b/fusioncrafter.lua @@ -74,7 +74,7 @@ local function transfer(id, amount, from, to) -- Get slots with items local slotFrom = find(from, id) local slotTo = find(to, nil) - + -- Do some error checking if slotFrom == nil then print("Error: transfer: No item '" .. id .. "' in source inventory") @@ -125,16 +125,11 @@ local function craft(recipe) -- Put input items into their places for item, amount in pairs(recipe.input) do - - -- If item is the core item transfer it to the core inventory - if item == recipe.core then - transfer(item, amount, input, core) - else -- Else put it into the injectors - transfer(item, amount, input, injectors) - end - + transfer(item, amount, input, injectors) end + transfer(recipe.core, amount, input, core) + -- Wait for output waitItems(result, recipe.output) @@ -148,7 +143,7 @@ end -- Check if a valid recipe is in the input -local function checkCrafting() +local function checkCrafting() -- Check all recipes if one is craftable for i, recipe in pairs(recipes) do @@ -172,7 +167,7 @@ local function main() print("Ready! Waiting for craftable recipes") while true do checkCrafting() - end + end end -main() \ No newline at end of file +main() From fb9bc04be112ef74da75639d489909aab612cc37 Mon Sep 17 00:00:00 2001 From: KasKatto <48245049+KasKatto@users.noreply.github.com> Date: Thu, 13 Aug 2020 14:57:38 +0100 Subject: [PATCH 2/7] Update atm3r-config.lua Changed recipe structure to work with new crafting code --- atm3r-config.lua | 111 ++++++++++++++++++----------------------------- 1 file changed, 42 insertions(+), 69 deletions(-) diff --git a/atm3r-config.lua b/atm3r-config.lua index aed6afd..f142b0f 100644 --- a/atm3r-config.lua +++ b/atm3r-config.lua @@ -19,7 +19,7 @@ local config = {} -- 4: west -- 5: east -- --- Hint: If you have waila just press Shift while +-- Hint: If you have waila just press Shift while -- looking at the side and it'll show the value config.inventories = { input = 3, @@ -53,38 +53,34 @@ config.recipes = { input = { ["draconicevolution:draconic_core"] = 5, ["draconicevolution:draconium_block"] = 2, - ["minecraft:nether_star"] = 2, - ["minecraft:emerald_block"] = 1 + ["minecraft:nether_star"] = 2 }, - core = "minecraft:emerald_block" + core = {["minecraft:emerald_block"] = 1} }, { output = { ["draconicevolution:draconic_block"] = 4 }, input = { ["draconicevolution:wyvern_core"] = 6, - ["draconicevolution:dragon_heart"] = 1, - ["draconicevolution:draconium_block"] = 4 + ["draconicevolution:dragon_heart"] = 1 }, - core = "draconicevolution:draconium_block" + core = {["draconicevolution:draconium_block"] = 4} }, { output = { ["draconicevolution:awakened_core"] = 1 }, input = { ["draconicevolution:wyvern_core"] = 5, - ["draconicevolution:draconic_block"] = 4, - ["minecraft:nether_star"] = 1 + ["draconicevolution:draconic_block"] = 4 }, - core = "minecraft:nether_star" + core = {["minecraft:nether_star"] = 1} }, { output = { ["draconicevolution:draconic_energy_core"] = 1 }, input = { ["minecraft:redstone_block"] = 5, ["draconicevolution:draconic_ingot"] = 4, - ["draconicevolution:wyvern_energy_core"] = 1, ["draconicevolution:awakened_core"] = 1 }, - core = "draconicevolution:wyvern_energy_core" + core = {["draconicevolution:wyvern_energy_core"] = 1} }, { output = { ["draconicevolution:energy_crystal"] = 4 }, -- Draconic energy relay crystal @@ -92,19 +88,17 @@ config.recipes = { ["minecraft:diamond"] = 4, ["draconicevolution:wyvern_energy_core"] = 4, ["draconicevolution:draconic_energy_core"] = 1, - ["draconicevolution:wyvern_core"] = 1, - ["draconicevolution:energy_crystal"] = 4 + ["draconicevolution:wyvern_core"] = 1 }, - core = "draconicevolution:energy_crystal" + core = {["draconicevolution:energy_crystal"] = 4} }, { output = { ["draconicevolution:particle_generator"] = 1 }, -- Energy core stabilizer input = { ["minecraft:diamond"] = 4, - ["draconicevolution:wyvern_core"] = 2, - ["draconicevolution:particle_generator"] = 1 + ["draconicevolution:wyvern_core"] = 2 }, - core = "draconicevolution:particle_generator" + core = {["draconicevolution:particle_generator"] = 1} }, { output = { ["draconicevolution:infused_obsidian"] = 1 }, @@ -112,10 +106,9 @@ config.recipes = { ["minecraft:diamond"] = 2, ["draconicevolution:draconium_dust"] = 4, ["draconicevolution:draconium_ingot"] = 2, - ["minecraft:blaze_powder"] = 2, - ["minecraft:obsidian"] = 1 + ["minecraft:blaze_powder"] = 2 }, - core = "minecraft:obsidian" + core = {["minecraft:obsidian"] = 1} }, { output = { ["draconicevolution:crafting_injector"] = 1 }, -- Wyvern crafting injector @@ -123,10 +116,9 @@ config.recipes = { ["draconicevolution:wyvern_core"] = 1, ["minecraft:nether_star"] = 4, ["draconicevolution:draconium_block"] = 1, - ["draconicevolution:draconic_core"] = 2, - ["draconicevolution:crafting_injector"] = 1 + ["draconicevolution:draconic_core"] = 2 }, - core = "draconicevolution:crafting_injector" + core = {["draconicevolution:crafting_injector"] = 1} }, { output = { ["draconicevolution:crafting_injector"] = 1 }, -- Draconic crafting injector @@ -134,10 +126,9 @@ config.recipes = { ["draconicevolution:wyvern_core"] = 2, ["minecraft:nether_star"] = 4, ["draconicevolution:draconic_block"] = 1, - ["minecraft:dragon_egg"] = 1, - ["draconicevolution:crafting_injector"] = 1 + ["minecraft:dragon_egg"] = 1 }, - core = "draconicevolution:crafting_injector" + core = {["draconicevolution:crafting_injector"] = 1} }, { output = { ["draconicevolution:crafting_injector"] = 1 }, -- Chaotic crafting injector @@ -145,30 +136,27 @@ config.recipes = { ["draconicevolution:chaotic_core"] = 2, ["minecraft:nether_star"] = 4, ["draconicevolution:chaos_shard"] = 1, - ["minecraft:dragon_egg"] = 1, - ["draconicevolution:crafting_injector"] = 1 + ["minecraft:dragon_egg"] = 1 }, - core = "draconicevolution:crafting_injector" + core = {["draconicevolution:crafting_injector"] = 1} }, { output = { ["draconicevolution:reactor_core"] = 1 }, input = { ["draconicevolution:draconic_ingot"] = 2, ["draconicevolution:draconic_block"] = 2, - ["draconicevolution:chaos_shard"] = 1, ["draconicevolution:draconium_ingot"] = 3 }, - core = "draconicevolution:chaos_shard" + core = {["draconicevolution:chaos_shard"] = 1} }, { output = { ["draconicevolution:reactor_component"] = 1 }, -- Reactor energy injector input = { ["draconicevolution:draconic_ingot"] = 4, - ["draconicevolution:awakened_core"] = 1, ["draconicevolution:reactor_part"] = 4, ["minecraft:iron_ingot"] = 1 }, - core = "draconicevolution:awakened_core" + core = {["draconicevolution:awakened_core"] = 1} }, { output = { ["draconicevolution:draconium_chest"] = 1 }, @@ -176,131 +164,118 @@ config.recipes = { ["minecraft:furnace"] = 5, ["draconicevolution:draconic_core"] = 2, ["draconicevolution:draconium_block"] = 1, - ["minecraft:chest"] = 1, ["minecraft:crafting_table"] = 2 }, - core = "minecraft:chest" + core = {["minecraft:chest"] = 1} }, { output = { ["draconicevolution:ender_energy_manipulator"] = 1 }, input = { - ["minecraft:skull"] = 1, ["draconicevolution:draconic_core"] = 4, ["draconicevolution:wyvern_core"] = 3, ["minecraft:ender_eye"] = 3 }, - core = "minecraft:skull" + core = {["minecraft:skull"] = 1} }, { output = { ["draconicevolution:draconic_pick"] = 1 }, input = { ["draconicevolution:draconic_block"] = 2, ["draconicevolution:awakened_core"] = 1, - ["draconicevolution:wyvern_pick"] = 1, ["draconicevolution:draconic_energy_Core"] = 1 }, - core = "draconicevolution:wyvern_pick" + core = {["draconicevolution:wyvern_pick"] = 1} }, { output = { ["draconicevolution:draconic_shovel"] = 1 }, input = { ["draconicevolution:draconic_block"] = 2, ["draconicevolution:awakened_core"] = 1, - ["draconicevolution:wyvern_shovel"] = 1, ["draconicevolution:draconic_energy_Core"] = 1 }, - core = "draconicevolution:wyvern_shovel" + core = {["draconicevolution:wyvern_shovel"] = 1} }, { output = { ["draconicevolution:draconic_axe"] = 1 }, input = { ["draconicevolution:draconic_block"] = 2, ["draconicevolution:awakened_core"] = 1, - ["draconicevolution:wyvern_axe"] = 1, ["draconicevolution:draconic_energy_Core"] = 1 }, - core = "draconicevolution:wyvern_axe" + core = {["draconicevolution:wyvern_axe"] = 1} }, { output = { ["draconicevolution:draconic_bow"] = 1 }, input = { ["draconicevolution:draconic_block"] = 2, ["draconicevolution:awakened_core"] = 1, - ["draconicevolution:wyvern_bow"] = 1, ["draconicevolution:draconic_energy_Core"] = 1 }, - core = "draconicevolution:wyvern_bow" + core = {["draconicevolution:wyvern_bow"] = 1} }, { output = { ["draconicevolution:draconic_sword"] = 1 }, input = { ["draconicevolution:draconic_block"] = 2, ["draconicevolution:awakened_core"] = 1, - ["draconicevolution:wyvern_sword"] = 1, ["draconicevolution:draconic_energy_Core"] = 1 }, - core = "draconicevolution:wyvern_sword" + core = {["draconicevolution:wyvern_sword"] = 1} }, { output = { ["draconicevolution:draconic_hoe"] = 1 }, input = { ["draconicevolution:draconic_block"] = 2, ["draconicevolution:awakened_core"] = 1, - ["minecraft:diamond_hoe"] = 1, ["draconicevolution:draconic_energy_Core"] = 1 }, - core = "minecraft:diamond_hoe" + core = {["minecraft:diamond_hoe"] = 1} }, { output = { ["draconicevolution:draconic_staff_of_power"] = 1 }, input = { ["draconicevolution:draconic_block"] = 5, ["draconicevolution:awakened_core"] = 1, - ["draconicevolution:draconic_pick"] = 1, ["draconicevolution:draconic_shovel"] = 1, ["draconicevolution:draconic_sword"] = 1 }, - core = "draconicevolution:draconic_pick" + core = {["draconicevolution:draconic_pick"] = 1} }, { output = { ["draconicevolution:dislocator_advanced"] = 1 }, input = { ["minecraft:ender_pearl"] = 3, ["minecraft:dragon_egg"] = 1, - ["draconicevolution:draconium_ingot"] = 4, - ["draconicevolution:dislocator"] = 1 + ["draconicevolution:draconium_ingot"] = 4 }, - core = "draconicevolution:dislocator" + core = {["draconicevolution:dislocator"] = 1} }, { output = { ["draconicevolution:draconic_helm"] = 1 }, input = { ["draconicevolution:draconic_block"] = 1, ["draconicevolution:draconic_pick"] = 1, - ["draconicevolution:draconic_block"] = 1, - ["draconicevolution:wyvern_helm"] = 1 + ["draconicevolution:draconic_block"] = 1 }, - core = "draconicevolution:wyvern_helm" + core = {["draconicevolution:wyvern_helm"] = 1} }, { output = { ["draconicevolution:draconic_legs"] = 1 }, input = { ["draconicevolution:draconic_block"] = 1, ["draconicevolution:draconic_pick"] = 1, - ["draconicevolution:draconic_block"] = 1, - ["draconicevolution:wyvern_legs"] = 1 + ["draconicevolution:draconic_block"] = 1 }, - core = "draconicevolution:wyvern_legs" + core = {["draconicevolution:wyvern_legs"] = 1} }, { output = { ["draconicevolution:draconic_boots"] = 1 }, input = { ["draconicevolution:draconic_block"] = 1, ["draconicevolution:draconic_pick"] = 1, - ["draconicevolution:draconic_block"] = 1, - ["draconicevolution:wyvern_boots"] = 1 + ["draconicevolution:draconic_block"] = 1 }, - core = "draconicevolution:wyvern_boots" + core = {["draconicevolution:wyvern_boots"] = 1} }, { output = { ["draconicevolution:draconic_chest"] = 1 }, @@ -308,22 +283,20 @@ config.recipes = { ["draconicevolution:draconic_block"] = 1, ["draconicevolution:draconic_pick"] = 1, ["draconicevolution:draconic_block"] = 1, - ["draconicevolution:wyvern_chest"] = 1, ["extrautils2:angelring"] = 1 }, - core = "draconicevolution:wyvern_chest" + core = {["draconicevolution:wyvern_chest"] = 1} }, { output = { ["atmtweaks:item_material"] = 1 }, -- Growth essence input = { - ["forestry:royal_jelly"] = 1, ["actuallyadditions:item_fertilizer"] = 1, ["thermalfoundation:fertilizer"] = 1, ["minecraft:dye"] = 1, ["botania:manaresource"] = 1 }, - core = "forestry:royal_jelly" + core = {["forestry:royal_jelly"] = 1} } } -return config \ No newline at end of file +return config From c8659f09ac8fbff85499e49efc965c881aba388c Mon Sep 17 00:00:00 2001 From: KasKatto <48245049+KasKatto@users.noreply.github.com> Date: Thu, 13 Aug 2020 15:00:04 +0100 Subject: [PATCH 3/7] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f7ea31a..88e5ccb 100644 --- a/README.md +++ b/README.md @@ -181,8 +181,8 @@ The items aren't correctly inserted into the injectors. # TODO -* Add automated system for upgrading armor and tools. -* Add support for item metadata. (Fix recipes like *Reactor Stabilizer*) -* Ore dictionary support. -* Support same item in *Crafting Injectors* and *Fusion Core* for recipes. -* Add support for alternative input items. \ No newline at end of file +- [ ] Add automated system for upgrading armor and tools. +- [ ] Add support for item metadata. (Fix recipes like *Reactor Stabilizer*) +- [ ] Ore dictionary support. +- [x] Support same item in *Crafting Injectors* and *Fusion Core* for recipes. +- [ ] Add support for alternative input items. From d5fc3ab560475cd121a11dca962bdb5cef7d0cdf Mon Sep 17 00:00:00 2001 From: KasKatto <48245049+KasKatto@users.noreply.github.com> Date: Thu, 13 Aug 2020 15:03:31 +0100 Subject: [PATCH 4/7] Update atm3r-config.lua Added Chaotic core recipe --- atm3r-config.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/atm3r-config.lua b/atm3r-config.lua index f142b0f..0ada1ca 100644 --- a/atm3r-config.lua +++ b/atm3r-config.lua @@ -73,6 +73,15 @@ config.recipes = { }, core = {["minecraft:nether_star"] = 1} }, + { + output = { ["draconicevolution:chaotic_core"] = 1 }, -- Chaotic Core + input = { + ["draconicevolution:awakened_core"] = 4, + ["draconicevolution:chaos_shard"] = 4, + ["draconicevolution:draconic_block"] = 6, + }, + core = {["draconicevolution:chaos_shard"] = 1} + }, { output = { ["draconicevolution:draconic_energy_core"] = 1 }, input = { From d2e43ad4942390caef227508e1d948cf65156c57 Mon Sep 17 00:00:00 2001 From: KasKatto <48245049+KasKatto@users.noreply.github.com> Date: Thu, 13 Aug 2020 15:10:48 +0100 Subject: [PATCH 5/7] Update atm3r-config.lua fixed example recipe format --- atm3r-config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atm3r-config.lua b/atm3r-config.lua index 0ada1ca..d84b799 100644 --- a/atm3r-config.lua +++ b/atm3r-config.lua @@ -38,7 +38,7 @@ config.inventories = { -- = , -- ... -- }, --- core = , -- Item to be put into the fusion crafting core +-- core = { = }, -- Item to be put into the fusion crafting core -- output = { -- Items that result from the crafting -- = , -- = , From 2c50b95ea1799327dafd77eb4d865ba89b2dcd4b Mon Sep 17 00:00:00 2001 From: KasKatto <48245049+KasKatto@users.noreply.github.com> Date: Thu, 13 Aug 2020 19:01:58 +0100 Subject: [PATCH 6/7] Update atm3r-config.lua remove comma --- atm3r-config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atm3r-config.lua b/atm3r-config.lua index d84b799..4ca6d63 100644 --- a/atm3r-config.lua +++ b/atm3r-config.lua @@ -78,7 +78,7 @@ config.recipes = { input = { ["draconicevolution:awakened_core"] = 4, ["draconicevolution:chaos_shard"] = 4, - ["draconicevolution:draconic_block"] = 6, + ["draconicevolution:draconic_block"] = 6 }, core = {["draconicevolution:chaos_shard"] = 1} }, From 7bb9dc667b1be70cca8c05c1f22efb5b302dd962 Mon Sep 17 00:00:00 2001 From: KasKatto <48245049+KasKatto@users.noreply.github.com> Date: Tue, 18 Aug 2020 01:02:29 +0100 Subject: [PATCH 7/7] Update fusioncrafter.lua Co-authored-by: Michael Sedlak --- fusioncrafter.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fusioncrafter.lua b/fusioncrafter.lua index d5ba642..a440681 100644 --- a/fusioncrafter.lua +++ b/fusioncrafter.lua @@ -128,7 +128,10 @@ local function craft(recipe) transfer(item, amount, input, injectors) end - transfer(recipe.core, amount, input, core) + -- Transfer items to core + for item, amount in pairs(recipe.core) do + transfer(item, amount, input, core) + end -- Wait for output waitItems(result, recipe.output)