added new energy collector and respective crafting blocks and textures

This commit is contained in:
unknown 2015-07-31 15:03:30 -04:00
parent 416865206b
commit 96158272c1
8 changed files with 143 additions and 3 deletions

@ -98,6 +98,24 @@ minetest.register_abm({
end,
})
minetest.register_abm({
nodenames = {"equivalent_exchange:antimatter_collector"},
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")
local multiplier = collector.check_multiplier(pos)
meta:set_string("formspec",
"size[6,1.5]"..
"label[0,0;Antimatter Collector]"..
"label[4,0;EMC Stored: "..collector.emc_gather(emc,4,multiplier).."]"..
"list[current_name;container;0,0.5;6,1;]")
meta:set_int("emc",collector.emc_gather(emc,4,multiplier))
collector.emc_transfer(4,pos,multiplier)
end,
})
-- Registering Nodes --
minetest.register_node("equivalent_exchange:energy_collector_mk1", {
@ -202,6 +220,40 @@ minetest.register_node("equivalent_exchange:energy_collector_mk3", {
emc = 529605
})
minetest.register_node("equivalent_exchange:antimatter_collector", {
description = "Antimatter Collector",
tiles = {
"equivalent_exchange_antimatter_collector_top.png",
"equivalent_exchange_antimatter_collector_bottom.png",
"equivalent_exchange_antimatter_collector_side.png",
"equivalent_exchange_antimatter_collector_side.png",
"equivalent_exchange_antimatter_collector_side.png",
"equivalent_exchange_antimatter_collector_side.png",
},
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;Antimatter Collector]"..
"label[4,0;EMC Stored: 0]"..
"list[current_name;container;0,0.5;6,1;]")
meta:set_string("infotext", "Antimatter Collector")
meta:set_int("emc", 0)
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 = 269554885
})
minetest.register_node("equivalent_exchange:interdiction_stone", {
description = "Interdiction Stone",
tiles = {
@ -258,5 +310,17 @@ minetest.register_craft({
{"default:torch", "equivalent_exchange:aeternalis_fuel", "default:torch"},
{"equivalent_exchange:aeternalis_fuel", "equivalent_exchange:philosophers_stone", "equivalent_exchange:aeternalis_fuel"},
{"equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence", "equivalent_exchange:high_covalence"}
},
replacements = {
{"equivalent_exchange:philosophers_stone", "equivalent_exchange:philosophers_stone"}
}
})
minetest.register_craft({
output = "equivalent_exchange:antimatter_collector",
recipe = {
{"equivalent_exchange:condensed_antimatter", "equivalent_exchange:condensed_antimatter", "equivalent_exchange:condensed_antimatter"},
{"equivalent_exchange:condensed_antimatter", "equivalent_exchange:energy_collector_mk3", "equivalent_exchange:condensed_antimatter"},
{"equivalent_exchange:condensed_antimatter", "equivalent_exchange:condensed_antimatter", "equivalent_exchange:condensed_antimatter"}
}
})

@ -1,3 +1,56 @@
-- Registering Nodes --
minetest.register_node("equivalent_exchange:red_matter_block", {
description = "Red Matter Block",
tiles = {
"equivalent_exchange_red_matter_block.png",
"equivalent_exchange_red_matter_block.png",
"equivalent_exchange_red_matter_block.png",
"equivalent_exchange_red_matter_block.png",
"equivalent_exchange_red_matter_block.png",
"equivalent_exchange_red_matter_block.png"
},
paramtype2 = "facedir",
groups = {cracky = 3},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
emc = 1253376
})
minetest.register_node("equivalent_exchange:antimatter_block", {
description = "Antimatter Block",
tiles = {
"equivalent_exchange_antimatter_block.png",
"equivalent_exchange_antimatter_block.png",
"equivalent_exchange_antimatter_block.png",
"equivalent_exchange_antimatter_block.png",
"equivalent_exchange_antimatter_block.png",
"equivalent_exchange_antimatter_block.png"
},
paramtype2 = "facedir",
groups = {cracky = 3},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
emc = 4202496
})
minetest.register_node("equivalent_exchange:condensed_antimatter", {
description = "Condensed Antimatter",
tiles = {
"equivalent_exchange_condensed_antimatter.png",
"equivalent_exchange_condensed_antimatter.png",
"equivalent_exchange_condensed_antimatter.png",
"equivalent_exchange_condensed_antimatter.png",
"equivalent_exchange_condensed_antimatter.png",
"equivalent_exchange_condensed_antimatter.png"
},
paramtype2 = "facedir",
groups = {cracky = 5},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
emc = 33628160
})
-- Registering Craft Items --
minetest.register_craftitem("equivalent_exchange:alchemical_crystal", {
@ -21,13 +74,13 @@ minetest.register_craftitem("equivalent_exchange:aeternalis_fuel", {
minetest.register_craftitem("equivalent_exchange:red_matter", {
description = "Red Matter",
inventory_image = "equivalent_exchange_red_matter.png",
emc = 139,264
emc = 139264
})
minetest.register_craftitem("equivalent_exchange:antimatter", {
description = "Antimatter",
inventory_image = "equivalent_exchange_antimatter.png",
emc = 466,944
emc = 466944
})
-- Registering Crafts --
@ -71,6 +124,29 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "equivalent_exchange:red_matter_block",
recipe = {
{"equivalent_exchange:red_matter", "equivalent_exchange:red_matter", "equivalent_exchange:red_matter"},
{"equivalent_exchange:red_matter", "equivalent_exchange:red_matter", "equivalent_exchange:red_matter"},
{"equivalent_exchange:red_matter", "equivalent_exchange:red_matter", "equivalent_exchange:red_matter"}
}
})
minetest.register_craft({
output = "equivalent_exchange:antimatter_block",
recipe = {
{"equivalent_exchange:antimatter", "equivalent_exchange:antimatter", "equivalent_exchange:antimatter"},
{"equivalent_exchange:antimatter", "equivalent_exchange:antimatter", "equivalent_exchange:antimatter"},
{"equivalent_exchange:antimatter", "equivalent_exchange:antimatter", "equivalent_exchange:antimatter"}
}
})
minetest.register_craft({
output = "equivalent_exchange:condensed_antimatter",
recipe = {
{"equivalent_exchange:antimatter_block", "equivalent_exchange:antimatter_block", "equivalent_exchange:antimatter_block"},
{"equivalent_exchange:antimatter_block", "equivalent_exchange:aeternalis_fuel", "equivalent_exchange:antimatter_block"},
{"equivalent_exchange:antimatter_block", "equivalent_exchange:antimatter_block", "equivalent_exchange:antimatter_block"}
}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B