added more nodes, craft items, and crafting recipes, needs textures

This commit is contained in:
unknown 2015-07-29 16:10:56 -04:00
parent 4b3a94274b
commit 19be43931a
2 changed files with 143 additions and 10 deletions

@ -1,2 +1,3 @@
default default
buildtest? buildtest?
pipeworks?

148
init.lua

@ -45,19 +45,18 @@ equivalent_exchange = {
end, end,
get_formspec = function(emc, target) get_formspec = function(emc, target)
return "size[8,10]".. return "size[8,10]"..
"label[5.6,-0.2;Energy Condenser]"..
"label[0.7,0.9;Target Item]"..
"list[current_name;to;1,0;1,1;]".. "list[current_name;to;1,0;1,1;]"..
"list[current_name;from;0,1.5;8,4;]".. "list[current_name;from;0,1.5;8,4;]"..
"list[current_player;main;0,6;8,4;]".. "list[current_player;main;0,6;8,4;]"..
"image[4,0;1,1;default_furnace_fire_bg.png^[lowpart:".. "image[3,0;1,1;default_furnace_fire_bg.png^[lowpart:"..
(emc/target*100)..":default_furnace_fire_fg.png]" (emc/target*100)..":default_furnace_fire_fg.png]"..
"label[5,0.5;Current EMC: ".. emc .."\nNeeded EMC: ".. (target - emc).."]"
end, end,
} }
minetest.register_craftitem("equivalent_exchange:book_of_power_1", { -- Registering Nodes --
description = "Book Of Power 1",
inventory_image = "default_book.png",
emc = 1200,
})
minetest.register_node("equivalent_exchange:condenser", { minetest.register_node("equivalent_exchange:condenser", {
description = "Energy Condenser", description = "Energy Condenser",
@ -99,7 +98,140 @@ minetest.register_node("equivalent_exchange:condenser", {
equivalent_exchange.convert(pos) equivalent_exchange.convert(pos)
return count return count
end, end,
emc = 500 emc = 42,011
})
minetest.register_node("equivalent_exchange:alchemical_chest", {
description = "Alchemical Chest",
--Texturing--
paramtype2 = "facedir",
groups = {cracky = 2},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec",
"size[13,13]"..
"label[0,0;Alchemical Chest]"..
"list[current_name;container;0,0.5;13,8;]"..
"list[current_player;main;2.5,9;8,4;]")
meta:set_string("infotext", "Alchemical Chest")
local inv = meta:get_inventory()
inv:set_size("container", 13*8)
inv:set_size("main", 8*4)
end,
can_dig = function(pos,player)
local meta = minetest.env:get_meta(pos);
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,
emc = 8987
})
minetest.register_node("equivalent_exchange:energy_collector_mk1", {
description = "Energy Collector Mark 1",
--Texturing--
paramtype2 = "facedir",
groups = {cracky = 2},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec",
"size[6,1.5]"..
"label[0,0;Energy Collector Mark 1]"..
"list[current_name;container;0,0.5;6,1;]")
meta:set_string("infotext", "Energy Collector Mark 1")
local inv = meta:get_inventory()
inv:set_size("container", 6)
end,
can_dig = function(pos,player)
local meta = minetest.env:get_meta(pos);
local inv = meta:get_inventory()
return inv:is_empty("main")
end,
emc = 529605
})
--Registering Craft Items--
minetest.register_craftitem("equivalent_exchange:book_of_power_1", {
description = "Book Of Power 1",
inventory_image = "default_book.png",
emc = 1200,
})
minetest.register_craftitem("equivalent_exchange:emc", {
description = "EMC Matter",
emc = 100,
})
minetest.register_craftitem("equivalent_exchange:low_covalence", {
description = "Low Covalence Dust",
emc = 1,
})
minetest.register_craftitem("equivalent_exchange:medium_covalence", {
description = "Medium Covalence Dust",
emc = 8,
})
minetest.register_craftitem("equivalent_exchange:high_covalence", {
description = "High Covalence Dust",
emc = 208,
})
--Registering Crafts--
minetest.register_craft({
output = "equivalent_exchange:condenser",
recipe = {
{"default:obsidian", "default:diamond", "default:obsidian"},
{"default:diamond", "equivalent_exchange:alchemical_chest", "default:diamond"},
{"default:obsidian", "default:diamond", "default:obsidian"}
}
})
minetest.register_craft({
type = "shapeless",
output = "equivalent_exchange:low_covalence",
recipe = {"default:cobble", "default:cobble", "default:cobble","default:cobble", "default:cobble", "default:cobble","default:cobble", "default:cobble", "default:coal_lump"}
})
minetest.register_craft({
type = "shapeless",
output = "equivalent_exchange:medium_covalence",
recipe = {"default:steel_ingot", "default:bronze_ingot"}
})
minetest.register_craft({
type = "shapeless",
output = "equivalent_exchange:high_covalence",
recipe = {"default:diamond", "default:mese_crystal"}
})
minetest.register_craft({
output = "equivalent_exchange:alchemical_chest",
recipe = {
{"equivalent_exchange:low_covalence", "equivalent_exchange:medium_covalence", "equivalent_exchange:high_covalence"},
{"default:stone", "default:diamond", "default:stone"},
{"default:steel_ingot", "default:chest", "default:steel_ingot"}
}
})
minetest.register_craft({
output = "equivalent_exchange:energy_collector_mk1",
recipe = {
{"default:mese", "default:glass", "default:mese"},
{"default:mese", "default:diamondblock", "default:mese"},
{"default:mese", "default:furnace", "default:mese"}
}
}) })
print("[equivalent_exchange] Mod loaded!") print("[equivalent_exchange] Mod loaded!")