added alchemy bag and textures, no functionality,energy collecter can collect energy

This commit is contained in:
unknown 2015-07-30 09:41:27 -04:00
parent fc6fb13d2b
commit 604294ae4e
17 changed files with 259 additions and 9 deletions

@ -1,16 +1,16 @@
local emcs = {
node = {
["default:"] = {
["stone"] = 1,
["cobble"] = 1,
["desert_stone"] = 1,
["stonebrick"] = 1,
["desert_stonebrick"] = 1,
["dirt_with_grass"] = 1,
["dirt_with_snow"] = 1,
stone = 1,
cobble = 1,
desert_stone = 1,
stonebrick = 1,
desert_stonebrick = 1,
dirt_with_grass = 1,
dirt_with_snow = 1,
dirt = 1,
sand=1,
["desert_sand"] = 1,
sand = 1,
desert_sand = 1,
gravel = 4,
sandstone = 4,
sandstonebrick = 4,

250
init.lua

@ -10,6 +10,11 @@ if minetest.get_modpath("buildtest")~=nil then
buildtest.pumps.pulls["equivalent_exchange:condenser"] = {"from"}
end
emc_transfers = {
emc_gather = function(orig_emc, type)
return orig_emc + (10^(type - 1))
end,
}
equivalent_exchange = {
convert = function(pos)
local meta = minetest.get_meta(pos)
@ -54,6 +59,24 @@ equivalent_exchange = {
"label[10.5,0.5;Current EMC: ".. emc .."\nNeeded EMC: ".. (target - emc).."]"
end,
}
-- Registering ABMs --
minetest.register_abm({
nodenames = {"equivalent_exchange:energy_collector_mk1"},
interval = 1.0,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local meta = minetest.get_meta(pos)
local emc = meta:get_int("emc")
meta:set_string("formspec",
"size[6,1.5]"..
"label[0,0;Energy Collector Mark 1]"..
"label[4,0;EMC Stored: "..emc_transfers.emc_gather(emc,1).."]"..
"list[current_name;container;0,0.5;6,1;]")
meta:set_int("emc",emc_transfers.emc_gather(emc,1))
end,
})
-- Registering Nodes --
@ -152,8 +175,10 @@ minetest.register_node("equivalent_exchange:energy_collector_mk1", {
meta:set_string("formspec",
"size[6,1.5]"..
"label[0,0;Energy Collector Mark 1]"..
"label[4,0;EMC Stored: 0]"..
"list[current_name;container;0,0.5;6,1;]")
meta:set_string("infotext", "Energy Collector Mark 1")
meta:set_int("emc", 0)
local inv = meta:get_inventory()
inv:set_size("container", 6)
end,
@ -191,6 +216,96 @@ minetest.register_craftitem("equivalent_exchange:high_covalence", {
emc = 208,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_white", {
description = "White Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_white.png",
emc = 9631,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_grey", {
description = "Grey Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_grey.png",
emc = 9631,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_dark_grey", {
description = "Dark Grey Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_dark_grey.png",
emc = 9631,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_black", {
description = "Black Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_black.png",
emc = 9631,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_blue", {
description = "Blue Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_blue.png",
emc = 9631,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_cyan", {
description = "Cyan Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_cyan.png",
emc = 9631,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_green", {
description = "Green Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_green.png",
emc = 9631,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_dark_green", {
description = "Dark Green Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_dark_green.png",
emc = 9631,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_yellow", {
description = "Yellow Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_yellow.png",
emc = 9631,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_orange", {
description = "Orange Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_orange.png",
emc = 9631,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_brown", {
description = "Brown Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_brown.png",
emc = 9631,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_red", {
description = "Red Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_red.png",
emc = 9631,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_pink", {
description = "Pink Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_pink.png",
emc = 9631,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_magenta", {
description = "Magenta Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_magenta.png",
emc = 9631,
})
minetest.register_craftitem("equivalent_exchange:alchemy_bag_violet", {
description = "alchemy_bag_violet Alchemy Bag",
inventory_image = "equivalent_exchange_alchemy_bag_violet.png",
emc = 9631,
})
--Registering Crafts--
minetest.register_craft({
@ -238,4 +353,139 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_white",
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"}
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_grey",
recipe = {
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"},
{"wool:grey", "equivalent_exchange:alchemical_chest", "wool:grey"},
{"wool:grey", "wool:grey", "wool:grey"}
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_dark_grey",
recipe = {
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"},
{"wool:dark_grey", "equivalent_exchange:alchemical_chest", "wool:dark_grey"},
{"wool:dark_grey", "wool:dark_grey", "wool:dark_grey"}
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_black",
recipe = {
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"},
{"wool:black", "equivalent_exchange:alchemical_chest", "wool:black"},
{"wool:black", "wool:black", "wool:black"}
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_blue",
recipe = {
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"},
{"wool:blue", "equivalent_exchange:alchemical_chest", "wool:blue"},
{"wool:blue", "wool:blue", "wool:blue"}
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_cyan",
recipe = {
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"},
{"wool:cyan", "equivalent_exchange:alchemical_chest", "wool:cyan"},
{"wool:cyan", "wool:cyan", "wool:cyan"}
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_green",
recipe = {
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"},
{"wool:green", "equivalent_exchange:alchemical_chest", "wool:green"},
{"wool:green", "wool:green", "wool:green"}
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_dark_green",
recipe = {
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"},
{"wool:dark_green", "equivalent_exchange:alchemical_chest", "wool:dark_green"},
{"wool:dark_green", "wool:dark_green", "wool:dark_green"}
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_yellow",
recipe = {
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"},
{"wool:yellow", "equivalent_exchange:alchemical_chest", "wool:yellow"},
{"wool:yellow", "wool:yellow", "wool:yellow"}
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_orange",
recipe = {
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"},
{"wool:orange", "equivalent_exchange:alchemical_chest", "wool:orange"},
{"wool:orange", "wool:orange", "wool:orange"}
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_brown",
recipe = {
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"},
{"wool:brown", "equivalent_exchange:alchemical_chest", "wool:brown"},
{"wool:brown", "wool:brown", "wool:brown"}
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_red",
recipe = {
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"},
{"wool:red", "equivalent_exchange:alchemical_chest", "wool:red"},
{"wool:red", "wool:red", "wool:red"}
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_pink",
recipe = {
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"},
{"wool:pink", "equivalent_exchange:alchemical_chest", "wool:pink"},
{"wool:pink", "wool:pink", "wool:pink"}
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_magenta",
recipe = {
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"},
{"wool:magenta", "equivalent_exchange:alchemical_chest", "wool:magenta"},
{"wool:magenta", "wool:magenta", "wool:magenta"}
}
})
minetest.register_craft({
output = "equivalent_exchange:alchemy_bag_violet",
recipe = {
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"},
{"wool:violet", "equivalent_exchange:alchemical_chest", "wool:violet"},
{"wool:violet", "wool:violet", "wool:violet"}
}
})
print("[equivalent_exchange] Mod loaded!")

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B