added alchemy bag and textures, no functionality,energy collecter can collect energy
18
emcs.lua
@ -1,16 +1,16 @@
|
|||||||
local emcs = {
|
local emcs = {
|
||||||
node = {
|
node = {
|
||||||
["default:"] = {
|
["default:"] = {
|
||||||
["stone"] = 1,
|
stone = 1,
|
||||||
["cobble"] = 1,
|
cobble = 1,
|
||||||
["desert_stone"] = 1,
|
desert_stone = 1,
|
||||||
["stonebrick"] = 1,
|
stonebrick = 1,
|
||||||
["desert_stonebrick"] = 1,
|
desert_stonebrick = 1,
|
||||||
["dirt_with_grass"] = 1,
|
dirt_with_grass = 1,
|
||||||
["dirt_with_snow"] = 1,
|
dirt_with_snow = 1,
|
||||||
dirt = 1,
|
dirt = 1,
|
||||||
sand=1,
|
sand = 1,
|
||||||
["desert_sand"] = 1,
|
desert_sand = 1,
|
||||||
gravel = 4,
|
gravel = 4,
|
||||||
sandstone = 4,
|
sandstone = 4,
|
||||||
sandstonebrick = 4,
|
sandstonebrick = 4,
|
||||||
|
250
init.lua
@ -10,6 +10,11 @@ if minetest.get_modpath("buildtest")~=nil then
|
|||||||
buildtest.pumps.pulls["equivalent_exchange:condenser"] = {"from"}
|
buildtest.pumps.pulls["equivalent_exchange:condenser"] = {"from"}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
emc_transfers = {
|
||||||
|
emc_gather = function(orig_emc, type)
|
||||||
|
return orig_emc + (10^(type - 1))
|
||||||
|
end,
|
||||||
|
}
|
||||||
equivalent_exchange = {
|
equivalent_exchange = {
|
||||||
convert = function(pos)
|
convert = function(pos)
|
||||||
local meta = minetest.get_meta(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).."]"
|
"label[10.5,0.5;Current EMC: ".. emc .."\nNeeded EMC: ".. (target - emc).."]"
|
||||||
end,
|
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 --
|
-- Registering Nodes --
|
||||||
|
|
||||||
@ -152,8 +175,10 @@ minetest.register_node("equivalent_exchange:energy_collector_mk1", {
|
|||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[6,1.5]"..
|
"size[6,1.5]"..
|
||||||
"label[0,0;Energy Collector Mark 1]"..
|
"label[0,0;Energy Collector Mark 1]"..
|
||||||
|
"label[4,0;EMC Stored: 0]"..
|
||||||
"list[current_name;container;0,0.5;6,1;]")
|
"list[current_name;container;0,0.5;6,1;]")
|
||||||
meta:set_string("infotext", "Energy Collector Mark 1")
|
meta:set_string("infotext", "Energy Collector Mark 1")
|
||||||
|
meta:set_int("emc", 0)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
inv:set_size("container", 6)
|
inv:set_size("container", 6)
|
||||||
end,
|
end,
|
||||||
@ -191,6 +216,96 @@ minetest.register_craftitem("equivalent_exchange:high_covalence", {
|
|||||||
emc = 208,
|
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--
|
--Registering Crafts--
|
||||||
|
|
||||||
minetest.register_craft({
|
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!")
|
print("[equivalent_exchange] Mod loaded!")
|
BIN
textures/equivalent_exchange_alchemy_bag_black.png
Normal file
After Width: | Height: | Size: 312 B |
BIN
textures/equivalent_exchange_alchemy_bag_blue.png
Normal file
After Width: | Height: | Size: 335 B |
BIN
textures/equivalent_exchange_alchemy_bag_brown.png
Normal file
After Width: | Height: | Size: 320 B |
BIN
textures/equivalent_exchange_alchemy_bag_cyan.png
Normal file
After Width: | Height: | Size: 320 B |
BIN
textures/equivalent_exchange_alchemy_bag_dark_green.png
Normal file
After Width: | Height: | Size: 317 B |
BIN
textures/equivalent_exchange_alchemy_bag_dark_grey.png
Normal file
After Width: | Height: | Size: 304 B |
BIN
textures/equivalent_exchange_alchemy_bag_green.png
Normal file
After Width: | Height: | Size: 317 B |
BIN
textures/equivalent_exchange_alchemy_bag_grey.png
Normal file
After Width: | Height: | Size: 308 B |
BIN
textures/equivalent_exchange_alchemy_bag_magenta.png
Normal file
After Width: | Height: | Size: 331 B |
BIN
textures/equivalent_exchange_alchemy_bag_orange.png
Normal file
After Width: | Height: | Size: 329 B |
BIN
textures/equivalent_exchange_alchemy_bag_pink.png
Normal file
After Width: | Height: | Size: 325 B |
BIN
textures/equivalent_exchange_alchemy_bag_red.png
Normal file
After Width: | Height: | Size: 326 B |
BIN
textures/equivalent_exchange_alchemy_bag_violet.png
Normal file
After Width: | Height: | Size: 321 B |
BIN
textures/equivalent_exchange_alchemy_bag_white.png
Normal file
After Width: | Height: | Size: 314 B |
BIN
textures/equivalent_exchange_alchemy_bag_yellow.png
Normal file
After Width: | Height: | Size: 320 B |