added many more items,nodes and respective textures

This commit is contained in:
unknown 2015-07-31 13:21:08 -04:00
parent 2e7958b0f2
commit 8204443fa9
18 changed files with 246 additions and 8 deletions

@ -22,18 +22,42 @@ minetest.register_craftitem("equivalent_exchange:high_covalence", {
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"}
output = "equivalent_exchange:low_covalence 40",
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",
output = "equivalent_exchange:medium_covalence 40",
recipe = {"default:steel_ingot", "default:bronze_ingot"}
})
minetest.register_craft({
type = "shapeless",
output = "equivalent_exchange:high_covalence",
output = "equivalent_exchange:high_covalence 40",
recipe = {"default:diamond", "default:mese_crystal"}
})
local materials = {"wood","stone","steel","bronze","mese","diamond"}
local covalence = {"low_covalence","low_covalence","medium_covalence","medium_covalence","high_covalence","high_covalence"}
local tools = {"pick_","shovel_","axe_","sword_","hoe_"}
local type = {"default:","default:","default:","default:","farming:"}
for i = 1,6 do
for j = 1,5 do
minetest["register_craft"]({
type = "shapeless",
output = type[j]..tools[j]..materials[i],
recipe = {"equivalent_exchange:"..covalence[i], "equivalent_exchange:"..covalence[i], "equivalent_exchange:"..covalence[i], type[j]..tools[j]..materials[i]}
})
end
end
minetest.register_craft({
type = "shapeless",
output = "screwdriver:screwdriver",
recipe = {"equivalent_exchange:medium_covalence", "equivalent_exchange:medium_covalence", "equivalent_exchange:medium_covalence", "screwdriver:screwdriver"}
})

@ -1,11 +1,11 @@
collector = {
emc_gather = function(orig_emc, type)
return orig_emc + (10^(type - 1))
emc_gather = function(orig_emc, mark)
return orig_emc + (10^(mark - 1))
end,
emc_transfer = function(mark,pos)
local meta = minetest.get_meta(pos)
local emc = meta:get_int("emc")
local newemc = (collector.emc_gather(emc, 1))
local newemc = (collector.emc_gather(emc, mark))
local surrounding_nodes = {
minetest.get_meta({x = pos.x + 1, y = pos.y, z = pos.z}),
minetest.get_meta({x = pos.x - 1, y = pos.y, z = pos.z}),
@ -54,6 +54,40 @@ minetest.register_abm({
end,
})
minetest.register_abm({
nodenames = {"equivalent_exchange:energy_collector_mk2"},
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 2]"..
"label[4,0;EMC Stored: "..collector.emc_gather(emc,2).."]"..
"list[current_name;container;0,0.5;6,1;]")
meta:set_int("emc",collector.emc_gather(emc,2))
collector.emc_transfer(2,pos)
end,
})
minetest.register_abm({
nodenames = {"equivalent_exchange:energy_collector_mk3"},
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 3]"..
"label[4,0;EMC Stored: "..collector.emc_gather(emc,3).."]"..
"list[current_name;container;0,0.5;6,1;]")
meta:set_int("emc",collector.emc_gather(emc,3))
collector.emc_transfer(3,pos)
end,
})
-- Registering Nodes --
minetest.register_node("equivalent_exchange:energy_collector_mk1", {
@ -90,6 +124,73 @@ minetest.register_node("equivalent_exchange:energy_collector_mk1", {
emc = 529605
})
minetest.register_node("equivalent_exchange:energy_collector_mk2", {
description = "Energy Collector Mark 2",
tiles = {
"equivalent_exchange_energy_collector_mk2_top.png",
"equivalent_exchange_energy_collector_mk2_bottom.png",
"equivalent_exchange_energy_collector_mk2_side.png",
"equivalent_exchange_energy_collector_mk2_side.png",
"equivalent_exchange_energy_collector_mk2_side.png",
"equivalent_exchange_energy_collector_mk2_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;Energy Collector Mark 2]"..
"label[4,0;EMC Stored: 0]"..
"list[current_name;container;0,0.5;6,1;]")
meta:set_string("infotext", "Energy Collector Mark 2")
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 = 529605
})
minetest.register_node("equivalent_exchange:energy_collector_mk3", {
description = "Energy Collector Mark 3",
tiles = {
"equivalent_exchange_energy_collector_mk3_top.png",
"equivalent_exchange_energy_collector_mk3_bottom.png",
"equivalent_exchange_energy_collector_mk3_side.png",
"equivalent_exchange_energy_collector_mk3_side.png",
"equivalent_exchange_energy_collector_mk3_side.png",
"equivalent_exchange_energy_collector_mk3_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;Energy Collector Mark 3]"..
"label[4,0;EMC Stored: 0]"..
"list[current_name;container;0,0.5;6,1;]")
meta:set_string("infotext", "Energy Collector Mark 3")
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 = 529605
})
-- Registering Crafts --
minetest.register_craft({
@ -100,3 +201,21 @@ minetest.register_craft({
{"default:mese", "default:furnace", "default:mese"}
}
})
minetest.register_craft({
output = "equivalent_exchange:energy_collector_mk2",
recipe = {
{"default:mese", "equivalent_exchange:red_matter", "default:mese"},
{"default:mese", "equivalent_exchange:energy_collector_mk1", "default:mese"},
{"default:mese", "default:mese", "default:mese"}
}
})
minetest.register_craft({
output = "equivalent_exchange:energy_collector_mk3",
recipe = {
{"default:mese", "equivalent_exchange:antimatter", "default:mese"},
{"default:mese", "equivalent_exchange:energy_collector_mk2", "default:mese"},
{"default:mese", "default:mese", "default:mese"}
}
})

@ -4,5 +4,7 @@ dofile(minetest.get_modpath("equivalent_exchange").."/alchemy_bag.lua")
dofile(minetest.get_modpath("equivalent_exchange").."/condenser.lua")
dofile(minetest.get_modpath("equivalent_exchange").."/covalence_dust.lua")
dofile(minetest.get_modpath("equivalent_exchange").."/energy_collector.lua")
dofile(minetest.get_modpath("equivalent_exchange").."/philosophers_stone.lua")
dofile(minetest.get_modpath("equivalent_exchange").."/normal_items.lua")
print("[equivalent_exchange] Mod loaded!")

74
normal_items.lua Normal file

@ -0,0 +1,74 @@
-- Registering Craft Items --
minetest.register_craftitem("equivalent_exchange:alchemical_crystal", {
description = "Alchemical Crystal",
inventory_image = "equivalent_exchange_alchemical_crystal.png",
emc = 512,
})
minetest.register_craftitem("equivalent_exchange:mobius_fuel", {
description = "Mobius Fuel",
inventory_image = "equivalent_exchange_mobius_fuel.png",
emc = 2048,
})
minetest.register_craftitem("equivalent_exchange:aeternalis_fuel", {
description = "Aeternalis Fuel",
inventory_image = "equivalent_exchange_aeternalis_fuel.png",
emc = 8192,
})
minetest.register_craftitem("equivalent_exchange:red_matter", {
description = "Red Matter",
inventory_image = "equivalent_exchange_red_matter.png",
emc = 139,264
})
minetest.register_craftitem("equivalent_exchange:antimatter", {
description = "Antimatter",
inventory_image = "equivalent_exchange_antimatter.png",
emc = 466,944
})
-- Registering Crafts --
local fuels = {"default:diamond","equivalent_exchange:alchemical_crystal","equivalent_exchange:mobius_fuel","equivalent_exchange:aeternalis_fuel"}
for i = 2,4 do
minetest["register_craft"]({
type = "shapeless",
output = fuels[i],
recipe = {"equivalent_exchange:philosophers_stone", fuels[i-1], fuels[i-1], fuels[i-1],fuels[i-1]},
replacements = {
{"equivalent_exchange:philosophers_stone", "equivalent_exchange:philosophers_stone"}
}
})
minetest["register_craft"]({
type = "shapeless",
output = fuels[i-1].." 4",
recipe = {"equivalent_exchange:philosophers_stone", fuels[i]},
replacements = {
{"equivalent_exchange:philosophers_stone", "equivalent_exchange:philosophers_stone"}
}
})
end
minetest.register_craft({
output = "equivalent_exchange:red_matter",
recipe = {
{"equivalent_exchange:aeternalis_fuel", "equivalent_exchange:aeternalis_fuel", "equivalent_exchange:aeternalis_fuel"},
{"equivalent_exchange:aeternalis_fuel", "default:mese", "equivalent_exchange:aeternalis_fuel"},
{"equivalent_exchange:aeternalis_fuel", "equivalent_exchange:aeternalis_fuel", "equivalent_exchange:aeternalis_fuel"}
}
})
minetest.register_craft({
output = "equivalent_exchange:antimatter",
recipe = {
{"equivalent_exchange:aeternalis_fuel", "equivalent_exchange:aeternalis_fuel", "equivalent_exchange:aeternalis_fuel"},
{"equivalent_exchange:red_matter","equivalent_exchange:red_matter","equivalent_exchange:red_matter"},
{"equivalent_exchange:aeternalis_fuel", "equivalent_exchange:aeternalis_fuel", "equivalent_exchange:aeternalis_fuel"}
}
})

19
philosophers_stone.lua Normal file

@ -0,0 +1,19 @@
-- Registering Craft Items --
minetest.register_craftitem("equivalent_exchange:philosophers_stone", {
description = "Philosopher's Stone",
inventory_image = "equivalent_exchange_philosophers_stone.png",
emc = 8892,
})
minetest.register_craft({
output = "equivalent_exchange:philosophers_stone",
recipe = {
{"default:mese", "default:desert_stone", "default:mese"},
{"default:desert_stone", "default:diamond", "default:mese"},
{"default:mese", "default:desert_stone", "default:mese"}
}
})
--Transmutation Crafts here after default EMCs are sorted out --

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B