diff --git a/alchemical_chest.lua b/alchemical_chest.lua index 1fd1f5b..c62bae4 100644 --- a/alchemical_chest.lua +++ b/alchemical_chest.lua @@ -1,3 +1,13 @@ +-- chest = { +-- talisman_check = function(pos) +-- local meta = minetest.get_meta(pos) +-- local inventory = meta:get_inventory() +-- local size = inventory:get_size("container") +-- for i = 1, size do +-- local stack = inventory:get_stack("from", i) + +-- end +-- } -- Registering Nodes -- @@ -31,15 +41,27 @@ minetest.register_node("equivalent_exchange:alchemical_chest", { local inv = meta:get_inventory() return inv:is_empty("main") end, - on_metadata_inventory_put = function(pos, listname, index, stack, player) - return stack:get_count() - end, - on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) - return count - end, + -- on_metadata_inventory_put = function(pos, listname, index, stack, player) + -- chest.talisman_check(pos) + -- end, + -- on_metadata_inventory_take = function(pos, listname, index, stack, player) + -- chest.talisman_check(pos) + -- end, + -- on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + -- chest.talisman_check(pos) + -- end, emc = 8987 }) +-- Registering Craft Items -- + +minetest.register_craftitem("equivalent_exchange:talisman_of_repair", { + description = "Talisman of Repair", + inventory_image = "equivalent_exchange_talisman_of_repair.png", + stack_max = 1, + emc = 10000, +}) + -- Registering Crafts -- minetest.register_craft({ diff --git a/alchemy_bag.lua b/alchemy_bag.lua index 1de856b..3b655b7 100644 --- a/alchemy_bag.lua +++ b/alchemy_bag.lua @@ -1,11 +1,27 @@ -local colors = {'white','grey','dark_grey','black','blue','cyan','green','dark_green','yellow','orange','brown','red','pink','magenta','violet'} +local colors = {'grey','dark_grey','black','blue','cyan','green','dark_green','yellow','orange','brown','red','pink','magenta','violet'} -for i = 1,15 do +minetest.register_craftitem("equivalent_exchange:alchemy_bag_white", { + description = "White Alchemy Bag", + inventory_image = "equivalent_exchange_alchemy_bag_white.png", + emc = 9631, +}) + +minetest.register_craft({ + output = "equivalent_exchange:equivalent_exchange:alchemy_bag", + recipe = { + {"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"}, + {"wool:white", "equivalent_exchange:alchemical_chest", "wool:white"}, + {"wool:white", "wool:white", "wool:white"} + } +}) + +for i = 1,14 do -- Registering Craft Items -- minetest["register_craftitem"](":".."equivalent_exchange:alchemy_bag_"..colors[i], { description = colors[i]:gsub("^%l", string.upper).." Alchemy Bag", + groups = {not_in_creative_inventory = 1}, inventory_image = "equivalent_exchange_alchemy_bag_"..colors[i]..".png", emc = 9631, }) @@ -20,4 +36,11 @@ for i = 1,15 do {"wool:"..colors[i], "wool:"..colors[i], "wool:"..colors[i]} } }) + + minetest["register_craft"]({ + type = "shapeless", + output = "equivalent_exchange:alchemy_bag_"..colors[i], + recipe = {"equivalent_exchange:alchemy_bag_white", "dye:"..colors[i]} + }) + end \ No newline at end of file diff --git a/philosophers_stone.lua b/philosophers_stone.lua index 8a676be..9bbfa17 100644 --- a/philosophers_stone.lua +++ b/philosophers_stone.lua @@ -6,6 +6,8 @@ minetest.register_craftitem("equivalent_exchange:philosophers_stone", { emc = 8892, }) +-- Registering Crafts -- + minetest.register_craft({ output = "equivalent_exchange:philosophers_stone", recipe = {