diff --git a/README.md b/README.md index 93ad6cf..ade3d3a 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,11 @@ Available worlds will be converted to 'lsqlite3', but there is no way back, so: ### History +**2021-12-25 V1.05** +- Support for the mod i3 added (thanks to ghaydn) +- TA5 enabled +- Many improvements + **2021-12-12 V1.04** - TA4 Collider added (experimental) - move, turn, sound, and fly blocks added diff --git a/basic_machines/electronic_fab.lua b/basic_machines/electronic_fab.lua index 3ed69dc..96a875b 100644 --- a/basic_machines/electronic_fab.lua +++ b/basic_machines/electronic_fab.lua @@ -259,24 +259,22 @@ minetest.register_craft({ }, }) -if minetest.global_exists("unified_inventory") then - unified_inventory.register_craft_type("ta2_electronic_fab", { - description = S("TA2 Ele Fab"), - icon = 'techage_filling_ta2.png^techage_appl_electronic_fab.png^techage_frame_ta2.png', - width = 2, - height = 2, - }) - unified_inventory.register_craft_type("ta3_electronic_fab", { - description = S("TA3 Ele Fab"), - icon = 'techage_filling_ta3.png^techage_appl_electronic_fab.png^techage_frame_ta3.png', - width = 2, - height = 2, - }) - unified_inventory.register_craft_type("ta4_electronic_fab", { - description = S("TA4 Ele Fab"), - icon = 'techage_filling_ta4.png^techage_appl_electronic_fab.png^techage_frame_ta4.png', - width = 2, - height = 2, - }) -end +techage.recipes.register_craft_type("ta2_electronic_fab", { + description = S("TA2 Ele Fab"), + icon = 'techage_filling_ta2.png^techage_appl_electronic_fab.png^techage_frame_ta2.png', + width = 2, + height = 2, +}) +techage.recipes.register_craft_type("ta3_electronic_fab", { + description = S("TA3 Ele Fab"), + icon = 'techage_filling_ta3.png^techage_appl_electronic_fab.png^techage_frame_ta3.png', + width = 2, + height = 2, +}) +techage.recipes.register_craft_type("ta4_electronic_fab", { + description = S("TA4 Ele Fab"), + icon = 'techage_filling_ta4.png^techage_appl_electronic_fab.png^techage_frame_ta4.png', + width = 2, + height = 2, +}) diff --git a/basic_machines/gravelrinser.lua b/basic_machines/gravelrinser.lua index 1d91dd9..3df776f 100644 --- a/basic_machines/gravelrinser.lua +++ b/basic_machines/gravelrinser.lua @@ -317,22 +317,18 @@ minetest.register_craft({ }) -if minetest.global_exists("unified_inventory") then - unified_inventory.register_craft_type("rinsing", { - description = S("Rinsing"), - icon = "techage_appl_rinser_top.png^techage_frame_ta2_top.png", - width = 2, - height = 2, - }) -end +techage.recipes.register_craft_type("rinsing", { + description = S("Rinsing"), + icon = "techage_appl_rinser_top.png^techage_frame_ta2_top.png", + width = 2, + height = 2, +}) function techage.add_rinser_recipe(recipe) Probability[recipe.output] = recipe.probability - if minetest.global_exists("unified_inventory") then - recipe.items = {recipe.input} - recipe.type = "rinsing" - unified_inventory.register_craft(recipe) - end + recipe.items = {recipe.input} + recipe.type = "rinsing" + techage.recipes.register_craft(recipe) end techage.add_rinser_recipe({input="techage:sieved_gravel", output="techage:usmium_nuggets", probability=30}) diff --git a/basic_machines/gravelsieve.lua b/basic_machines/gravelsieve.lua index 0bd9aa4..3152d3c 100644 --- a/basic_machines/gravelsieve.lua +++ b/basic_machines/gravelsieve.lua @@ -246,38 +246,36 @@ minetest.register_craft({ }, }) -if minetest.global_exists("unified_inventory") then - unified_inventory.register_craft_type("ta2_gravelsieve", { - description = S("TA2 Gravel Sieve"), - icon = 'techage_sieve_sieve_ta1.png', - width = 1, - height = 1, - }) - unified_inventory.register_craft_type("ta3_gravelsieve", { - description = S("TA3 Gravel Sieve"), - icon = 'techage_filling_ta3.png^techage_appl_sieve.png^techage_frame_ta3.png', - width = 1, - height = 1, - }) - unified_inventory.register_craft_type("ta4_gravelsieve", { - description = S("TA4 Gravel Sieve"), - icon = 'techage_filling_ta4.png^techage_appl_sieve.png^techage_frame_ta4.png', - width = 1, - height = 1, - }) - unified_inventory.register_craft({ - output = "techage:sieved_basalt_gravel", - items = {"techage:basalt_gravel"}, - type = "ta2_gravelsieve", - }) - unified_inventory.register_craft({ - output = "techage:sieved_basalt_gravel", - items = {"techage:basalt_gravel"}, - type = "ta3_gravelsieve", - }) - unified_inventory.register_craft({ - output = "techage:sieved_basalt_gravel", - items = {"techage:basalt_gravel"}, - type = "ta4_gravelsieve", - }) -end +techage.recipes.register_craft_type("ta2_gravelsieve", { + description = S("TA2 Gravel Sieve"), + icon = 'techage_sieve_sieve_ta1.png', + width = 1, + height = 1, +}) +techage.recipes.register_craft_type("ta3_gravelsieve", { + description = S("TA3 Gravel Sieve"), + icon = 'techage_filling_ta3.png^techage_appl_sieve.png^techage_frame_ta3.png', + width = 1, + height = 1, +}) +techage.recipes.register_craft_type("ta4_gravelsieve", { + description = S("TA4 Gravel Sieve"), + icon = 'techage_filling_ta4.png^techage_appl_sieve.png^techage_frame_ta4.png', + width = 1, + height = 1, +}) +techage.recipes.register_craft({ + output = "techage:sieved_basalt_gravel", + items = {"techage:basalt_gravel"}, + type = "ta2_gravelsieve", +}) +techage.recipes.register_craft({ + output = "techage:sieved_basalt_gravel", + items = {"techage:basalt_gravel"}, + type = "ta3_gravelsieve", +}) +techage.recipes.register_craft({ + output = "techage:sieved_basalt_gravel", + items = {"techage:basalt_gravel"}, + type = "ta4_gravelsieve", +}) diff --git a/basic_machines/grinder.lua b/basic_machines/grinder.lua index 9cf8dcd..ec20d1a 100644 --- a/basic_machines/grinder.lua +++ b/basic_machines/grinder.lua @@ -351,20 +351,18 @@ minetest.register_craft({ }, }) -if minetest.global_exists("unified_inventory") then - unified_inventory.register_craft_type("grinding", { - description = S("Grinding"), - icon = 'techage_appl_grinder.png', - width = 2, - height = 2, - }) - unified_inventory.register_craft_type("milling", { - description = S("Milling"), - icon = 'techage_mill_inv.png', - width = 2, - height = 2, - }) -end +techage.recipes.register_craft_type("grinding", { + description = S("Grinding"), + icon = 'techage_appl_grinder.png', + width = 2, + height = 2, +}) +techage.recipes.register_craft_type("milling", { + description = S("Milling"), + icon = 'techage_mill_inv.png', + width = 2, + height = 2, +}) function techage.add_grinder_recipe(recipe, ta1_permitted) local name, num = unpack(string.split(recipe.input, " ", false, 1)) @@ -372,20 +370,16 @@ function techage.add_grinder_recipe(recipe, ta1_permitted) if ta1_permitted then RecipesTa1[name] = {input = name,inp_num = tonumber(num) or 1, output = recipe.output} - if minetest.global_exists("unified_inventory") then - recipe.items = {recipe.input} - recipe.type = "milling" - unified_inventory.register_craft(table.copy(recipe)) - end + recipe.items = {recipe.input} + recipe.type = "milling" + techage.recipes.register_craft(table.copy(recipe)) end Recipes[name] = {input = name,inp_num = tonumber(num) or 1, output = recipe.output} - if minetest.global_exists("unified_inventory") then - recipe.items = {recipe.input} - recipe.type = "grinding" - unified_inventory.register_craft(recipe) - end + recipe.items = {recipe.input} + recipe.type = "grinding" + techage.recipes.register_craft(recipe) end end diff --git a/basis/recipe_lib.lua b/basis/recipe_lib.lua index 7dac9a2..76306d3 100644 --- a/basis/recipe_lib.lua +++ b/basis/recipe_lib.lua @@ -113,13 +113,11 @@ function techage.recipes.add(rtype, recipe) Recipes[rtype][#Recipes[rtype]+1] = item output = name - if minetest.global_exists("unified_inventory") then - unified_inventory.register_craft({ - output = recipe.output, - items = recipe.input, - type = rtype, - }) - end + techage.recipes.register_craft({ + output = recipe.output, + items = recipe.input, + type = rtype, + }) NormalizedRecipes[output] = { output = recipe.output, items = recipe.input, diff --git a/chemistry/ta4_doser.lua b/chemistry/ta4_doser.lua index eafdda8..886e8b3 100644 --- a/chemistry/ta4_doser.lua +++ b/chemistry/ta4_doser.lua @@ -362,14 +362,12 @@ techage.register_node({"techage:ta4_doser", "techage:ta4_doser_on"}, { end, }) -if minetest.global_exists("unified_inventory") then - unified_inventory.register_craft_type("ta4_doser", { - description = S("TA4 Reactor"), - icon = 'techage_reactor_filler_plan.png', - width = 2, - height = 2, - }) -end +techage.recipes.register_craft_type("ta4_doser", { + description = S("TA4 Reactor"), + icon = 'techage_reactor_filler_plan.png', + width = 2, + height = 2, +}) minetest.register_craft({ output = "techage:ta4_doser", diff --git a/init.lua b/init.lua index 966aa6d..6d5c586 100644 --- a/init.lua +++ b/init.lua @@ -13,7 +13,7 @@ techage = {} -- Version for compatibility checks, see readme.md/history -techage.version = 1.03 +techage.version = 1.05 if minetest.global_exists("tubelib") then minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!") diff --git a/iron_age/meltingpot.lua b/iron_age/meltingpot.lua index 9ae4bac..5a286e6 100644 --- a/iron_age/meltingpot.lua +++ b/iron_age/meltingpot.lua @@ -475,25 +475,23 @@ minetest.register_craft({ }, }) -if minetest.global_exists("unified_inventory") then - unified_inventory.register_craft_type("melting", { - description = S("TA1 Melting"), - icon = "default_cobble.png^techage_meltingpot.png", - width = 2, - height = 2, - }) - unified_inventory.register_craft_type("burning", { - description = S("TA1 Burning"), - icon = "techage_smoke.png", - width = 1, - height = 1, - }) - unified_inventory.register_craft({ - output = "techage:charcoal", - items = {"group:wood"}, - type = "burning", - }) -end +techage.recipes.register_craft_type("melting", { + description = S("TA1 Melting"), + icon = "default_cobble.png^techage_meltingpot.png", + width = 2, + height = 2, +}) +techage.recipes.register_craft_type("burning", { + description = S("TA1 Burning"), + icon = "techage_smoke.png", + width = 1, + height = 1, +}) +techage.recipes.register_craft({ + output = "techage:charcoal", + items = {"group:wood"}, + type = "burning", +}) function techage.ironage_register_recipe(recipe) local key = recipe_key(recipe.recipe) @@ -509,10 +507,8 @@ function techage.ironage_register_recipe(recipe) } NumRecipes = NumRecipes + 1 - if minetest.global_exists("unified_inventory") then - recipe.items = recipe.recipe - recipe.type = "melting" - unified_inventory.register_craft(recipe) - end + recipe.items = recipe.recipe + recipe.type = "melting" + techage.recipes.register_craft(recipe) end diff --git a/mod.conf b/mod.conf index fde06d4..e4afcb0 100644 --- a/mod.conf +++ b/mod.conf @@ -1,4 +1,4 @@ name = techage depends = default,doors,flowers,tubelib2,networks,basic_materials,bucket,stairs,screwdriver,minecart,lcdlib,safer_lua -optional_depends = unified_inventory,wielded_light,unifieddyes,moreores,ethereal,mesecon,digtron,bakedclay,moreblocks +optional_depends = unified_inventory,wielded_light,unifieddyes,moreores,ethereal,mesecon,digtron,bakedclay,moreblocks,i3 description = Techage, go through 4 tech ages in search of wealth and power!