diff --git a/poke/crafting.lua b/poke/crafting.lua new file mode 100644 index 0000000..e438fb1 --- /dev/null +++ b/poke/crafting.lua @@ -0,0 +1,46 @@ +-- aluminium -- + +minetest.register_craft({ + type = "cooking", + output = "poke:aluminium_ingot", + recipe = "poke:aluminium_lump", +}) + +minetest.register_craft({ + output = "poke:aluminiumblock", + recipe = { + {"poke:aluminium_ingot","poke:aluminium_ingot","poke:aluminium_ingot"}, + {"poke:aluminium_ingot","poke:aluminium_ingot","poke:aluminium_ingot"}, + {"poke:aluminium_ingot","poke:aluminium_ingot","poke:aluminium_ingot"} + } +}) + +minetest.register_craft({ + output = 'poke:aluminium_ingot 9', + recipe = { + {'poke:aluminiumblock'}, + } +}) + +-- POKEBALLS --- +minetest.register_craft({ + output = "poke:pokeball", + recipe = { + {"poke:top_pokeball"}, + {"poke:aluminium_ingot"}, + {"poke:bottom_pokeball"} + } +}) + +minetest.register_craft({ + output = "poke:top_pokeball", + recipe = { + {"group:wood","group:wood","group:wood"} + } +}) +minetest.register_craft({ + output = "poke:bottom_pokeball", + recipe = { + {"group:stone","group:stone","group:stone"} + } +}) diff --git a/poke/craftitems.lua b/poke/craftitems.lua new file mode 100644 index 0000000..e426df7 --- /dev/null +++ b/poke/craftitems.lua @@ -0,0 +1,21 @@ + minetest.register_craftitem("poke:aluminium_lump", { + description = "Aluminium Lump", + inventory_image = "aluminium_lump.png", +}) + minetest.register_craftitem("poke:aluminium_ingot", { + description = "Aluminium Ingot", + inventory_image = "aluminium_ingot.png", +}) + +minetest.register_craftitem("poke:top_pokeball", { + description = "Top Pokeball", + inventory_image = "top_pokeball.png", +}) +minetest.register_craftitem("poke:bottom_pokeball", { + description = "Bottom of a Pokeball", + inventory_image = "bottom_pokeball.png", +}) +minetest.register_craftitem("poke:pokeball", { + description = "Pokeball", + inventory_image = "pokeball.png", +}) diff --git a/poke/depends.txt b/poke/depends.txt new file mode 100644 index 0000000..331d858 --- /dev/null +++ b/poke/depends.txt @@ -0,0 +1 @@ +default \ No newline at end of file diff --git a/poke/init.lua b/poke/init.lua new file mode 100644 index 0000000..7626990 --- /dev/null +++ b/poke/init.lua @@ -0,0 +1,8 @@ + +local modpath = minetest.get_modpath("poke") + +-- Load files + +dofile(modpath .. "/node.lua") +dofile(modpath .. "/crafting.lua") +dofile(modpath .. "/craftitems.lua") diff --git a/poke/node.lua b/poke/node.lua new file mode 100644 index 0000000..a6e7df6 --- /dev/null +++ b/poke/node.lua @@ -0,0 +1,61 @@ + -- aluminium + + minetest.register_node("poke:stone_with_aluminium", { + description = "Iron Ore", + tiles = {"default_stone.png^mineral_aluminium.png"}, + groups = {cracky = 2}, + drop = 'poke:aluminium_lump', + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("poke:aluminiumblock", { + description = "Aluminium Block", + tiles = {"aluminium_block.png"}, + is_ground_content = false, + groups = {cracky = 1, level = 2}, + sounds = default.node_sound_stone_defaults(), +}) + + minetest.register_ore({ + ore_type = "scatter", + ore = "poke:stone_with_aluminium", + wherein = "default:stone", + clust_scarcity = 12 * 12 * 12, + clust_num_ores = 3, + clust_size = 2, + y_min = -15, + y_max = 2, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "poke:stone_with_aluminium", + wherein = "default:stone", + clust_scarcity = 9 * 9 * 9, + clust_num_ores = 5, + clust_size = 3, + y_min = -63, + y_max = -16, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "poke:stone_with_aluminium", + wherein = "default:stone", + clust_scarcity = 7 * 7 * 7, + clust_num_ores = 5, + clust_size = 3, + y_min = -31000, + y_max = -64, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "poke:stone_with_aluminium", + wherein = "default:stone", + clust_scarcity = 24 * 24 * 24, + clust_num_ores = 27, + clust_size = 6, + y_min = -31000, + y_max = -64, + })