diff options
Diffstat (limited to 'glooptest')
130 files changed, 1918 insertions, 0 deletions
diff --git a/glooptest/LICENSE.txt b/glooptest/LICENSE.txt new file mode 100644 index 0000000..8810a43 --- /dev/null +++ b/glooptest/LICENSE.txt @@ -0,0 +1,5 @@ +Released under the Creative Commons Attribution-ShareAlike 3.0 Unported License. + +Legal code available for viewing here: http://creativecommons.org/licenses/by-sa/3.0/legalcode + +Basic license overview available for viewing here: http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/glooptest/README.txt b/glooptest/README.txt new file mode 100644 index 0000000..28d44c3 --- /dev/null +++ b/glooptest/README.txt @@ -0,0 +1,21 @@ +=-=-=-=-=-=-= +GloopTest :D *insert witty comment here* +=-=-=-=-=-=-= + +Adds a collection of things into minetest. As it stands, this adds three different modules. + +More (or possibly (most likely) less) imformation can be found here: http://minetest.net/forum/viewtopic.php?id=4345 + +--==--==-- + +Ore Module: Adds a variety of ores into minetest, for use here and possibly in other mods. + +OtherGen Module: Adds generation aside from ores. + +Parts Module: Adds some bits and bobs for machinery and some minor blocks. + +Tech Module: Adds the "tech" of glooptest. + +Tools Module: Adds extra kinds of tools. + +Compat Module: Puts into place a number of aliases for cross-mod-compatibility. diff --git a/glooptest/glooptest/compat_module/config.cfg b/glooptest/glooptest/compat_module/config.cfg new file mode 100644 index 0000000..0fb46e9 --- /dev/null +++ b/glooptest/glooptest/compat_module/config.cfg @@ -0,0 +1,5 @@ +-- GloopTest compat module configurations file. +-- Controls what mods to bother being compatible with. + +-- Support GloopOres (obsolete mod) +GLOOPORES_SUPPORT = true
\ No newline at end of file diff --git a/glooptest/glooptest/compat_module/init.lua b/glooptest/glooptest/compat_module/init.lua new file mode 100644 index 0000000..414a22d --- /dev/null +++ b/glooptest/glooptest/compat_module/init.lua @@ -0,0 +1,35 @@ +glooptest.compat_module = {} +glooptest.debug("MESSAGE","Loading Compat Module Now!") + +dofile(minetest.get_modpath("glooptest").."/compat_module/config.cfg") + +if GLOOPORES_SUPPORT == true then + minetest.register_alias("gloopores:mineral_alatro", "glooptest:mineral_alatro") + minetest.register_alias("gloopores:alatro_lump", "glooptest:alatro_lump") + minetest.register_alias("gloopores:alatro_ingot", "glooptest:alatro_ingot") + minetest.register_alias("gloopores:alatro_block", "glooptest:alatroblock") + minetest.register_alias("gloopores:pick_alatro", "glooptest:pick_alatro") + minetest.register_alias("gloopores:axe_alatro", "glooptest:axe_alatro") + minetest.register_alias("gloopores:shovel_alatro", "glooptest:shovel_alatro") + minetest.register_alias("gloopores:sword_alatro", "glooptest:sword_alatro") + minetest.register_alias("gloopores:mineral_arol", "glooptest:mineral_arol") + minetest.register_alias("gloopores:arol_lump", "glooptest:arol_lump") + minetest.register_alias("gloopores:arol_ingot", "glooptest:arol_ingot") + minetest.register_alias("gloopores:pick_arol", "glooptest:pick_arol") + minetest.register_alias("gloopores:axe_arol", "glooptest:axe_arol") + minetest.register_alias("gloopores:shovel_arol", "glooptest:shovel_arol") + minetest.register_alias("gloopores:sword_arol", "glooptest:sword_arol") + minetest.register_alias("gloopores:mineral_akalin", "glooptest:mineral_akalin") + minetest.register_alias("gloopores:akalin_lump", "glooptest:akalin_lump") + minetest.register_alias("gloopores:akalin_ingot", "glooptest:akalin_ingot") + minetest.register_alias("gloopores:akalin_block", "glooptest:akalinblock") + minetest.register_alias("gloopores:mineral_talinite", "glooptest:mineral_talinite") + minetest.register_alias("gloopores:talinite_lump", "glooptest:talinite_lump") + minetest.register_alias("gloopores:talinite_ingot", "glooptest:talinite_ingot") + minetest.register_alias("gloopores:talinite_block", "glooptest:taliniteblock") + minetest.register_alias("gloopores:mineral_kalite", "glooptest:mineral_kalite") + minetest.register_alias("gloopores:kalite_lump", "glooptest:kalite_lump") + minetest.register_alias("gloopores:kalite_torch", "glooptest:kalite_torch") + minetest.register_alias("gloopores:mineral_desert_coal", "glooptest:mineral_desert_coal") + minetest.register_alias("gloopores:mineral_desert_iron", "glooptest:mineral_desert_iron") +end
\ No newline at end of file diff --git a/glooptest/glooptest/depends.txt b/glooptest/glooptest/depends.txt new file mode 100644 index 0000000..331d858 --- /dev/null +++ b/glooptest/glooptest/depends.txt @@ -0,0 +1 @@ +default
\ No newline at end of file diff --git a/glooptest/glooptest/general.cfg b/glooptest/glooptest/general.cfg new file mode 100644 index 0000000..89eb817 --- /dev/null +++ b/glooptest/glooptest/general.cfg @@ -0,0 +1,5 @@ +-- GloopTest general configurations file. +-- Please note that this file only contains configs which apply to the entire modpack; the modules themselves have much more detailed configuration files +-- which pertain more to that module. + +-- Nothing here!
\ No newline at end of file diff --git a/glooptest/glooptest/init.lua b/glooptest/glooptest/init.lua new file mode 100644 index 0000000..899a85d --- /dev/null +++ b/glooptest/glooptest/init.lua @@ -0,0 +1,65 @@ +-- GloopTest general initiation file. +-- To edit what modules will load, please edit module.cfg which can be found in the same folder as this file. +-- +-- GloopTest random data: +-- Version : 0.0.4a +-- Current module amount : 6 +-- Current compatible minetest version : 0.4.7 +-- License : CC-BY-SA +-- Totals: lol I don't know +-- End random data. + +-- Open configuration files. +dofile(minetest.get_modpath("glooptest").."/general.cfg") +dofile(minetest.get_modpath("glooptest").."/module.cfg") + +-- Set up some variables and crap. +local modules_loaded = 0 +glooptest = {} + +-- Set up some general functions for random crap. +function glooptest.debug(level,message) + print("["..level.."][GloopTest v0.0.4a] "..message) +end + +if LOAD_ORE_MODULE == true then + dofile(minetest.get_modpath("glooptest").."/ore_module/init.lua") + local modulecount = modules_loaded + modules_loaded = modulecount+1 +end + +if LOAD_TOOLS_MODULE == true then + dofile(minetest.get_modpath("glooptest").."/tools_module/init.lua") + local modulecount = modules_loaded + modules_loaded = modulecount+1 +end + +if LOAD_PARTS_MODULE == true then + dofile(minetest.get_modpath("glooptest").."/parts_module/init.lua") + local modulecount = modules_loaded + modules_loaded = modulecount+1 +end + +if LOAD_TECH_MODULE == true then + dofile(minetest.get_modpath("glooptest").."/tech_module/init.lua") + local modulecount = modules_loaded + modules_loaded = modulecount+1 +end + +if LOAD_OTHERGEN_MODULE == true then + dofile(minetest.get_modpath("glooptest").."/othergen_module/init.lua") + local modulecount = modules_loaded + modules_loaded = modulecount+1 +end + +if LOAD_COMPAT_MODULE == true then + dofile(minetest.get_modpath("glooptest").."/compat_module/init.lua") + local modulecount = modules_loaded + modules_loaded = modulecount+1 +end + +if modules_loaded == 0 then + glooptest.debug("ERROR","It helps if you activate some of the modules.") +else + glooptest.debug("MESSAGE",modules_loaded.." modules were successfully loaded!") +end diff --git a/glooptest/glooptest/license.txt b/glooptest/glooptest/license.txt new file mode 100644 index 0000000..26a1ea8 --- /dev/null +++ b/glooptest/glooptest/license.txt @@ -0,0 +1,5 @@ +Released under the Creative Commons Attribution-ShareAlike 3.0 Unported License. + +Legal code available for viewing here: http://creativecommons.org/licenses/by-sa/3.0/legalcode + +Basic license overview available for viewing here: http://creativecommons.org/licenses/by-sa/3.0/
\ No newline at end of file diff --git a/glooptest/glooptest/module.cfg b/glooptest/glooptest/module.cfg new file mode 100644 index 0000000..a2945a7 --- /dev/null +++ b/glooptest/glooptest/module.cfg @@ -0,0 +1,21 @@ +-- GloopTest module loading configuration file. +-- This file controls which modules load when GloopTest initiates. This does not control any other aspects of GloopTest. + +-- Allow compatibility module to load. (Recommended with: Ore Module) +-- Diabling this means NO internal mod compatibility! (Other mods may add support for glooptest though) +LOAD_COMPAT_MODULE = true + +-- Allow ore module to load. +LOAD_ORE_MODULE = true + +-- Allow tools module to load. (Recommended with: Ore Module) +LOAD_TOOLS_MODULE = true + +-- Allow parts module to load. (Recommended with: Ore Module) +LOAD_PARTS_MODULE = true + +-- Allow tech module to load. (Recommended with: Ore Module and Parts Module) +LOAD_TECH_MODULE = true + +-- Allow othergen module to load. (Recommended with: Ore Module and Tools Module) +LOAD_OTHERGEN_MODULE = false diff --git a/glooptest/glooptest/ore_module/api.lua b/glooptest/glooptest/ore_module/api.lua new file mode 100644 index 0000000..7cf35ab --- /dev/null +++ b/glooptest/glooptest/ore_module/api.lua @@ -0,0 +1,152 @@ +function glooptest.ore_module.set_tool_recipe(modname,type,material,name) + if type == "sword" then + minetest.register_craft({ + recipe = {{material},{material},{"default:stick"}}, + output = modname..":sword_"..name, + }) + end + if type == "axe" then + minetest.register_craft({ + recipe = {{material, material}, {material, "default:stick"}, {"","default:stick"}}, + output = modname..":axe_"..name, + }) + minetest.register_craft({ + recipe = {{material, material}, {"default:stick", material}, {"default:stick", ""}}, + output = modname..":axe_"..name, + }) + end + if type == "pick" or type == "pickaxe" then + minetest.register_craft({ + recipe = {{material, material, material}, {"","default:stick",""}, {"","default:stick",""}}, + output = modname..":pick_"..name, + }) + end + if type == "shovel" then + minetest.register_craft({ + recipe = {{material},{"default:stick"},{"default:stick"}}, + output = modname..":shovel_"..name, + }) + end + if type == "handsaw" then + minetest.register_craft({ + recipe = {{material, "default:stick"},{material, "default:stick"},{"", "default:stick"}}, + output = modname..":handsaw_"..name, + }) + minetest.register_craft({ + recipe = {{"default:stick", material},{"default:stick", material},{"default:stick", ""}}, + output = modname..":handsaw_"..name, + }) + end + if type == "hammer" then + minetest.register_craft({ + recipe = {{material, "default:stick", material}, {material, "default:stick", material}, {"", "default:stick", ""}}, + output = modname..":hammer_"..name, + }) + end +end + +generation_ores = {} + +function glooptest.ore_module.register_ore(modname, name, desc, uses) + if uses.block ~= nil and uses.block.makes ~= false then + minetest.register_node(modname..":"..name.."block", { + description = desc.." Block", + tiles = {uses.block.texture}, + is_ground_content = true, + light_source = uses.block.light or 0, + groups = uses.block.groups, + sounds = uses.block.sounds + }) + if uses.block.fromingots == true and uses.ingot ~= nil then + minetest.register_craft({ + output = modname..":"..name.."block", + recipe = { + {modname..":"..name.."_ingot", modname..":"..name.."_ingot", modname..":"..name.."_ingot"}, + {modname..":"..name.."_ingot", modname..":"..name.."_ingot", modname..":"..name.."_ingot"}, + {modname..":"..name.."_ingot", modname..":"..name.."_ingot", modname..":"..name.."_ingot"} + } + }) + minetest.register_craft({ + output = modname..":"..name.."_ingot 9", + recipe = { + {modname..":"..name.."block"} + } + }) + end + end + if uses.ore ~= nil and uses.ore.makes ~= false then + minetest.register_node(modname..":mineral_"..name, { + description = desc.." Ore", + tiles = {uses.ore.texture.base.."^"..uses.ore.texture.overlay}, + is_ground_content = true, + drop = uses.ore.drop, + light_source = uses.ore.light or 0, + groups = uses.ore.groups, + sounds = uses.ore.sounds + }) + minetest.register_ore({ + ore_type = "scatter", + ore = modname..":mineral_"..name, + wherein = uses.ore.generate.generate_inside_of, + clust_scarcity = uses.ore.generate.chunks_per_mapblock, + clust_num_ores = uses.ore.generate.max_blocks_per_chunk, + clust_size = uses.ore.generate.chunk_size, + y_min = uses.ore.generate.miny, + y_max = uses.ore.generate.maxy, + }) + end + if uses.lump ~= nil and uses.lump.makes ~= false then + minetest.register_craftitem(modname..":"..name.."_"..uses.lump.name, { + description = desc.." "..uses.lump.desc, + inventory_image = uses.lump.texture, + }) + end + if uses.ingot ~= nil and uses.ingot.makes ~= false then + minetest.register_craftitem(modname..":"..name.."_ingot", { + description = desc.." Ingot", + inventory_image = uses.ingot.texture, + }) + if uses.ingot.smeltrecipe == true and uses.lump ~= nil then + minetest.register_craft({ + type = "cooking", + output = modname..":"..name.."_ingot", + recipe = modname..":"..name.."_"..uses.lump.name, + }) + end + end + if uses.tools ~= nil and uses.tools.make ~= nil then + if uses.tools.make.sword == true then + minetest.register_tool(modname..":sword_"..name, { + description = desc.." Sword", + inventory_image = uses.tools.texture.sword, + tool_capabilities = uses.tools.caps.sword, + }) + glooptest.ore_module.set_tool_recipe(modname,"sword",modname..":"..name.."_ingot",name) + end + if uses.tools.make.axe == true then + minetest.register_tool(modname..":axe_"..name, { + description = desc.." Axe", + inventory_image = uses.tools.texture.axe, + tool_capabilities = uses.tools.caps.axe, + }) + glooptest.ore_module.set_tool_recipe(modname,"axe",modname..":"..name.."_ingot",name) + end + if uses.tools.make.pick == true then + minetest.register_tool(modname..":pick_"..name, { + description = desc.." Pickaxe", + inventory_image = uses.tools.texture.pick, + tool_capabilities = uses.tools.caps.pick, + }) + glooptest.ore_module.set_tool_recipe(modname,"pick",modname..":"..name.."_ingot",name) + end + if uses.tools.make.shovel == true then + minetest.register_tool(modname..":shovel_"..name, { + description = desc.." Shovel", + inventory_image = uses.tools.texture.shovel, + wield_image = uses.tools.texture.shovel.."^[transformR90", + tool_capabilities = uses.tools.caps.shovel, + }) + glooptest.ore_module.set_tool_recipe(modname,"shovel",modname..":"..name.."_ingot",name) + end + end +end diff --git a/glooptest/glooptest/ore_module/init.lua b/glooptest/glooptest/ore_module/init.lua new file mode 100644 index 0000000..bed4d5b --- /dev/null +++ b/glooptest/glooptest/ore_module/init.lua @@ -0,0 +1,630 @@ +glooptest.ore_module = {} +glooptest.debug("MESSAGE","Loading Ore Module Now!") + +local stone_sounds = default.node_sound_stone_defaults() + +dofile(minetest.get_modpath("glooptest").."/ore_module/api.lua") + +-- HUGE NOTE HERE: +-- I did not make the textures. celeron55/erlehmann made the textures which were licensed under CC-BY-SA, and then edited by me. +-- The textures for non-gem ores are thus CC-BY-SA, with respect to celeron55/erlehmann +-- Suck it, minetest community. + +glooptest.ore_module.register_ore("glooptest", "kalite", "Kalite", { + ore = { + makes = true, + drop = { + max_items = 4, + items = { + { + items = {'glooptest:kalite_lump'}, + rarity = 5, + }, + { + items = {'glooptest:kalite_lump'}, + rarity = 2, + }, + { + items = {'glooptest:kalite_lump 2'}, + }, + } + }, + texture = { + base = "default_stone.png", + overlay = "gloopores_mineral_kalite.png", + }, + groups = {cracky=3}, + sounds = stone_sounds, + generate = { + generate_inside_of = "default:stone", + chunks_per_mapblock = 9*9*9, + chunk_size = 6, + max_blocks_per_chunk = 7, + miny = -31000, + maxy = 10 + }, + }, +}) + +minetest.register_craftitem("glooptest:kalite_lump", { + description = "Kalite Lump", + inventory_image = "gloopores_kalite_lump.png", + on_use = minetest.item_eat(1), +}) + +minetest.register_node("glooptest:kalite_torch", { + description = "Kalite Torch", + drawtype = "torchlike", + tiles = { + {name="gloopores_kalite_torch_on_floor_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}, + {name="gloopores_kalite_torch_on_ceiling_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}, + {name="gloopores_kalite_torch_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}} + }, + inventory_image = "gloopores_kalite_torch_on_floor.png", + wield_image = "gloopores_kalite_torch_on_floor.png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + light_source = LIGHT_MAX-1, + selection_box = { + type = "wallmounted", + wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1}, + wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1}, + wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1}, + }, + groups = {choppy=2,dig_immediate=3}, + legacy_wallmounted = true, + sounds = default.node_sound_defaults(), +}) + +minetest.register_craft({ + output = "glooptest:kalite_torch 4", + recipe = { + {"glooptest:kalite_lump"}, + {"default:stick"}, + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "glooptest:kalite_lump", + burntime = 30, +}) + +glooptest.ore_module.register_ore("glooptest", "alatro", "Alatro", { + ore = { + makes = true, + drop = "glooptest:alatro_lump", + texture = { + base = "default_stone.png", + overlay = "gloopores_mineral_alatro.png", + }, + groups = {cracky=2}, + sounds = stone_sounds, + generate = { + generate_inside_of = "default:stone", + chunks_per_mapblock = 9*9*9, + chunk_size = 2, + max_blocks_per_chunk = 6, + miny = 0, + maxy = 256 + }, + }, + lump = { + makes = true, + name = "lump", + desc = "Lump", + texture = "gloopores_alatro_lump.png" + }, + ingot = { + makes = true, + texture = "gloopores_alatro_ingot.png", + smeltrecipe = true + }, + block = { + makes = true, + texture = "gloopores_alatro_block.png", + groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2}, + sounds = stone_sounds, + fromingots = true + }, + tools = { + make = { + sword = true, + axe = true, + pick = true, + shovel = true + }, + texture = { + sword = "gloopores_tool_alatrosword.png", + axe = "gloopores_tool_alatroaxe.png", + pick = "gloopores_tool_alatropick.png", + shovel = "gloopores_tool_alatroshovel.png" + }, + caps = { + sword = { + full_punch_interval = 1.0, + max_drop_level = 0, + groupcaps={ + fleshy={times={[2]=0.80, [3]=0.60}, uses=40, maxlevel=1}, + snappy={times={[2]=0.80, [3]=0.60}, uses=40, maxlevel=1}, + choppy={times={[3]=0.80}, uses=40, maxlevel=0} + }, + damage_groups = {fleshy=5}, + }, + axe = { + full_punch_interval = 1.0, + max_drop_level = 0, + groupcaps = { + choppy = {times={[2]=0.65, [3]=0.40}, uses=40, maxlevel=1}, + fleshy = {times={[2]=0.65, [3]=0.40}, uses=40, maxlevel=1} + }, + damage_groups = {fleshy=3}, + }, + pick = { + full_punch_interval = 1.0, + max_drop_level = 0, + groupcaps = { + cracky = {times={[2]=0.65, [3]=0.40}, uses=40, maxlevel=1} + }, + damage_groups = {fleshy=3}, + }, + shovel = { + full_punch_interval = 1.0, + max_drop_level = 0, + groupcaps = { + crumbly = {times={[2]=0.60, [3]=0.35}, uses=40, maxlevel=1} + }, + damage_groups = {fleshy=3}, + }, + } + } +}) + +glooptest.ore_module.register_ore("glooptest", "talinite", "Talinite", { + ore = { + makes = true, + drop = "glooptest:talinite_lump", + texture = { + base = "default_stone.png", + overlay = "gloopores_mineral_talinite.png" + }, + groups = {cracky=1}, + sounds = stone_sounds, + light = 6, + generate = { + generate_inside_of = "default:stone", + chunks_per_mapblock = 12*12*12, + chunk_size = 2, + max_blocks_per_chunk = 4, + miny = -31000, + maxy = -250 + } + }, + lump = { + makes = true, + name = "lump", + desc = "Lump", + texture = "gloopores_talinite_lump.png" + }, + ingot = { + makes = true, + texture = "gloopores_talinite_ingot.png", + smeltrecipe = true + }, + block = { + makes = true, + texture = "gloopores_talinite_block.png", + groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2}, + sounds = stone_sounds, + light = 14, + fromingots = true + } +}) + +glooptest.ore_module.register_ore("glooptest", "akalin", "Akalin", { + ore = { + makes = true, + drop = "glooptest:akalin_lump", + texture = { + base = "default_desert_stone.png", + overlay = "gloopores_mineral_akalin.png" + }, + groups = {cracky=3}, + sounds = stone_sounds, + generate = { + generate_inside_of = "default:desert_stone", + chunks_per_mapblock = 7*7*7, + chunk_size = 3, + max_blocks_per_chunk = 9, + miny = 0, + maxy = 256 + } + }, + lump = { + makes = true, + name = "lump", + desc = "Lump", + texture = "gloopores_akalin_lump.png" + }, + ingot = { + makes = true, + texture = "gloopores_akalin_ingot.png", + smeltrecipe = true + }, + block = { + makes = true, + texture = "gloopores_akalin_block.png", + groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2}, + sounds = stone_sounds, + fromingots = true + } +}) + +glooptest.ore_module.register_ore("glooptest", "arol", "Arol", { + ore = { + makes = true, + drop = "glooptest:arol_lump", + texture = { + base = "default_stone.png", + overlay = "gloopores_mineral_arol.png" + }, + groups = {cracky=1}, + sounds = stone_sounds, + generate = { + generate_inside_of = "default:stone", + chunks_per_mapblock = 10*10*10, + chunk_size = 2, + max_blocks_per_chunk = 2, + miny = -31000, + maxy = -20 + } + }, + lump = { + makes = true, + name = "lump", + desc = "Lump", + texture = "gloopores_arol_lump.png" + }, + ingot = { + makes = true, + texture = "gloopores_arol_ingot.png", + smeltrecipe = true + }, + tools = { + make = { + sword = true, + axe = true, + pick = true, + shovel = true + }, + texture = { + sword = "gloopores_tool_arolsword.png", + axe = "gloopores_tool_arolaxe.png", + pick = "gloopores_tool_arolpick.png", + shovel = "gloopores_tool_arolshovel.png" + }, + caps = { + sword = { + full_punch_interval = 0.5, + max_drop_level = 2, + groupcaps = { + fleshy = {times={[2]=1.30, [3]=1.10}, uses=300, maxlevel=2}, + snappy = {times={[2]=1.30, [3]=1.10}, uses=300, maxlevel=2}, + choppy = {times={[3]=1.60}, uses=300, maxlevel=1} + }, + damage_groups = {fleshy=6}, + }, + axe = { + full_punch_interval = 0.5, + max_drop_level = 2, + groupcaps = { + choppy = {times={[1]=3.30, [2]=1.30, [3]=1.00}, uses=300, maxlevel=2}, + fleshy = {times={[2]=1.60, [3]=1.00}, uses=300, maxlevel=2} + }, + damage_groups = {fleshy=3}, + }, + pick = { + full_punch_interval = 0.5, + max_drop_level = 2, + groupcaps = { + cracky = {times={[1]=3.60, [2]=1.90, [3]=1.40}, uses=300, maxlevel=2} + }, + damage_groups = {fleshy=3}, + }, + shovel = { + full_punch_interval = 0.5, + max_drop_level = 2, + groupcaps = { + crumbly = {times={[1]=2.70, [2]=1.45, [3]=0.85}, uses=300, maxlevel=2} + }, + damage_groups = {fleshy=3}, + } + } + } +}) + +glooptest.ore_module.register_ore("glooptest", "desert_iron", "Desert Iron", { + ore = { + makes = true, + drop = "default:iron_lump", + texture = { + base = "default_desert_stone.png", + overlay = "default_mineral_iron.png", + }, + groups = {cracky=3}, + sounds = stone_sounds, + generate = { + generate_inside_of = "default:desert_stone", + chunks_per_mapblock = 7*7*7, + chunk_size = 2, + max_blocks_per_chunk = 3, + miny = 0, + maxy = 10 + }, + }, +}) + +glooptest.ore_module.register_ore("glooptest", "desert_coal", "Desert Coal", { + ore = { + makes = true, + drop = "default:coal_lump", + texture = { + base = "default_desert_stone.png", + overlay = "default_mineral_coal.png", + }, + groups = {cracky=3}, + sounds = stone_sounds, + generate = { + generate_inside_of = "default:desert_stone", + chunks_per_mapblock = 6*6*6, + chunk_size = 3, + max_blocks_per_chunk = 8, + miny = 0, + maxy = 30 + }, + }, +}) + +-- gems + +glooptest.ore_module.register_ore("glooptest", "ruby", "Ruby", { + ore = { + makes = true, + drop = "glooptest:ruby_gem", + texture = { + base = "default_stone.png", + overlay = "glooptest_mineral_ruby.png", + }, + groups = {cracky=1}, + sounds = stone_sounds, + generate = { + generate_inside_of = "default:stone", + chunks_per_mapblock = 15*15*15, + chunk_size = 5, + max_blocks_per_chunk = 5, + miny = -3000, + maxy = -30 + }, + }, + block = { + makes = true, + texture = "glooptest_ruby_block.png", + groups = {bendy=3,cracky=2,level=1}, + sounds = stone_sounds, + fromingots = false + } +}) + +minetest.register_craftitem("glooptest:ruby_gem", { + description = "Ruby", + inventory_image = "glooptest_gem_ruby.png", + groups = {glooptest_gem=1}, +}) +minetest.register_craft({ + output = "glooptest:rubyblock", + recipe = { + {"glooptest:ruby_gem", "glooptest:ruby_gem", "glooptest:ruby_gem"}, + {"glooptest:ruby_gem", "glooptest:ruby_gem", "glooptest:ruby_gem"}, + {"glooptest:ruby_gem", "glooptest:ruby_gem", "glooptest:ruby_gem"} + } +}) +minetest.register_craft({ + output = "glooptest:ruby_gem 9", + recipe = { + {"glooptest:rubyblock"} + } +}) + +glooptest.ore_module.register_ore("glooptest", "sapphire", "Sapphire", { + ore = { + makes = true, + drop = "glooptest:sapphire_gem", + texture = { + base = "default_stone.png", + overlay = "glooptest_mineral_sapphire.png", + }, + groups = {cracky=1}, + sounds = stone_sounds, + generate = { + generate_inside_of = "default:stone", + chunks_per_mapblock = 15*15*15, + chunk_size = 5, + max_blocks_per_chunk = 5, + miny = -3000, + maxy = -30 + }, + }, + block = { + makes = true, + texture = "glooptest_sapphire_block.png", + groups = {bendy=3,cracky=2,level=1}, + sounds = stone_sounds, + fromingots = false + } +}) + +minetest.register_craftitem("glooptest:sapphire_gem", { + description = "Sapphire", + inventory_image = "glooptest_gem_sapphire.png", + groups = {glooptest_gem=1}, +}) +minetest.register_craft({ + output = "glooptest:sapphireblock", + recipe = { + {"glooptest:sapphire_gem", "glooptest:sapphire_gem", "glooptest:sapphire_gem"}, + {"glooptest:sapphire_gem", "glooptest:sapphire_gem", "glooptest:sapphire_gem"}, + {"glooptest:sapphire_gem", "glooptest:sapphire_gem", "glooptest:sapphire_gem"} + } +}) +minetest.register_craft({ + output = "glooptest:sapphire_gem 9", + recipe = { + {"glooptest:sapphireblock"} + } +}) + +glooptest.ore_module.register_ore("glooptest", "emerald", "Emerald", { + ore = { + makes = true, + drop = "glooptest:emerald_gem", + texture = { + base = "default_stone.png", + overlay = "glooptest_mineral_emerald.png", + }, + groups = {cracky=1}, + sounds = stone_sounds, + generate = { + generate_inside_of = "default:stone", + chunks_per_mapblock = 15*15*15, + chunk_size = 4, + max_blocks_per_chunk = 4, + miny = -5000, + maxy = -70 + }, + }, + block = { + makes = true, + texture = "glooptest_emerald_block.png", + groups = {bendy=3,cracky=2,level=1}, + sounds = stone_sounds, + fromingots = false + } +}) + +minetest.register_craftitem("glooptest:emerald_gem", { + description = "Emerald", + inventory_image = "glooptest_gem_emerald.png", + groups = {glooptest_gem=1}, +}) +minetest.register_craft({ + output = "glooptest:emeraldblock", + recipe = { + {"glooptest:emerald_gem", "glooptest:emerald_gem", "glooptest:emerald_gem"}, + {"glooptest:emerald_gem", "glooptest:emerald_gem", "glooptest:emerald_gem"}, + {"glooptest:emerald_gem", "glooptest:emerald_gem", "glooptest:emerald_gem"} + } +}) +minetest.register_craft({ + output = "glooptest:emerald_gem 9", + recipe = { + {"glooptest:emeraldblock"} + } +}) + +glooptest.ore_module.register_ore("glooptest", "topaz", "Topaz", { + ore = { + makes = true, + drop = "glooptest:topaz_gem", + texture = { + base = "default_stone.png", + overlay = "glooptest_mineral_topaz.png", + }, + groups = {cracky=1}, + sounds = stone_sounds, + generate = { + generate_inside_of = "default:stone", + chunks_per_mapblock = 15*15*15, + chunk_size = 4, + max_blocks_per_chunk = 4, + miny = -5000, + maxy = -70 + }, + }, + block = { + makes = true, + texture = "glooptest_topaz_block.png", + groups = {bendy=3,cracky=2,level=1}, + sounds = stone_sounds, + fromingots = false + } +}) + +minetest.register_craftitem("glooptest:topaz_gem", { + description = "Topaz", + inventory_image = "glooptest_gem_topaz.png", + groups = {glooptest_gem=1}, +}) +minetest.register_craft({ + output = "glooptest:topazblock", + recipe = { + {"glooptest:topaz_gem", "glooptest:topaz_gem", "glooptest:topaz_gem"}, + {"glooptest:topaz_gem", "glooptest:topaz_gem", "glooptest:topaz_gem"}, + {"glooptest:topaz_gem", "glooptest:topaz_gem", "glooptest:topaz_gem"} + } +}) +minetest.register_craft({ + output = "glooptest:topaz_gem 9", + recipe = { + {"glooptest:topazblock"} + } +}) + +glooptest.ore_module.register_ore("glooptest", "amethyst", "Amethyst", { + ore = { + makes = true, + drop = "glooptest:amethyst_gem", + texture = { + base = "default_stone.png", + overlay = "glooptest_mineral_amethyst.png", + }, + groups = {cracky=1}, + sounds = stone_sounds, + generate = { + generate_inside_of = "default:stone", + chunks_per_mapblock = 15*15*15, + chunk_size = 3, + max_blocks_per_chunk = 3, + miny = -31000, + maxy = -128 + }, + }, + block = { + makes = true, + texture = "glooptest_amethyst_block.png", + groups = {bendy=3,cracky=2,level=1}, + sounds = stone_sounds, + fromingots = false + } +}) + +minetest.register_craftitem("glooptest:amethyst_gem", { + description = "Amethyst", + inventory_image = "glooptest_gem_amethyst.png", + groups = {glooptest_gem=1}, +}) +minetest.register_craft({ + output = "glooptest:amethystblock", + recipe = { + {"glooptest:amethyst_gem", "glooptest:amethyst_gem", "glooptest:amethyst_gem"}, + {"glooptest:amethyst_gem", "glooptest:amethyst_gem", "glooptest:amethyst_gem"}, + {"glooptest:amethyst_gem", "glooptest:amethyst_gem", "glooptest:amethyst_gem"} + } +}) +minetest.register_craft({ + output = "glooptest:amethyst_gem 9", + recipe = { + {"glooptest:amethystblock"} + } +}) diff --git a/glooptest/glooptest/othergen_module/init.lua b/glooptest/glooptest/othergen_module/init.lua new file mode 100644 index 0000000..77a6e66 --- /dev/null +++ b/glooptest/glooptest/othergen_module/init.lua @@ -0,0 +1,374 @@ +glooptest.extragen_module = {} +glooptest.extragen_module.treasure={} +glooptest.debug("MESSAGE","Loading Extragen Module Now!") + +-- {item name, max stack size, item rarity} +glooptest.extragen_module.treasure[1] = { + {"default:stick", 30, 1}, + {"default:wood", 10, 1}, + {"default:tree", 5, 2}, + {"default:jungletree", 3, 6}, + {"default:cobble", 10, 2}, + {"default:pick_wood", 1, 12}, + {"default:shovel_wood", 1, 12}, + {"default:sword_wood", 1, 12}, + {"default:axe_wood", 1, 12}, + {"default:pick_stone", 1, 24}, + {"default:shovel_stone", 1, 24}, + {"default:sword_stone", 1, 24}, + {"default:axe_stone", 1, 24}, + {"default:furnace", 1, 8}, +} + +glooptest.extragen_module.treasure[2] = { + {"default:stick", 40, 1}, + {"default:cobble", 30, 1}, + {"default:glass", 20, 4}, + {"default:stone", 15, 2}, + {"default:desert_stone", 15, 5}, + {"default:coal_lump", 15, 6}, + {"default:steel_ingot", 2, 8}, + {"default:obsidian_shard", 1, 10}, + {"default:pick_stone", 1, 12}, + {"default:shovel_stone", 1, 12}, + {"default:sword_stone", 1, 12}, + {"default:axe_stone", 1, 12}, +} + +glooptest.extragen_module.treasure[3] = { + {"default:cobble", 40, 1}, + {"default:stick", 20, 3}, + {"default:torch", 15, 3}, + {"default:coal_lump", 20, 4}, + {"default:iron_lump", 10, 7}, + {"default:copper_lump", 10, 7}, + {"default:obsidian_shard", 5, 24}, + {"default:mese_crystal_fragment", 3, 24}, + {"default:pick_bronze", 1, 12}, + {"default:shovel_bronze", 1, 12}, + {"default:sword_bronze", 1, 12}, + {"default:axe_bronze", 1, 12}, +} + +glooptest.extragen_module.treasure[4] = { + {"default:torch", 50, 3}, + {"default:coal_lump", 30, 3}, + {"default:iron_lump", 20, 5}, + {"default:gold_lump", 5, 16}, + {"default:mese_crystal_fragment", 5, 10}, + {"default:mese_crystal", 1, 25}, + {"default:diamond", 1, 100}, + {"default:pick_mese", 1, 18}, + {"default:shovel_mese", 1, 18}, + {"default:sword_mese", 1, 18}, + {"default:axe_mese", 1, 18}, +} + +glooptest.extragen_module.treasure[5] = { + {"default:torch", 70, 3}, + {"default:iron_lump", 30, 3}, + {"default:gold_lump", 8, 15}, + {"default:mese_crystal_fragment", 15, 10}, + {"default:mese_crystal", 1, 17}, + {"default:diamond", 1, 24}, + {"default:pick_mese", 1, 12}, + {"default:shovel_mese", 1, 12}, + {"default:sword_mese", 1, 12}, + {"default:axe_mese", 1, 12}, + {"default:pick_diamond", 1, 60}, + {"default:shovel_diamond", 1, 60}, + {"default:sword_diamond", 1, 60}, + {"default:axe_diamond", 1, 60}, +} + +local treasure_chest_formspec = + "size[8,9]".. + "list[current_name;main;0,0;8,4;]".. + "list[current_player;main;0,5;8,4;]" + +local treasure_chest_nodebox = { + {-7/16, -8/16, -7/16, 7/16, 6/16, 7/16}, + {-8/16, -8/16, -8/16, 8/16, -7/16, 8/16}, + {-8/16, 1/16, -8/16, 8/16, 3/16, 8/16}, +} + +local function treasure_chest_populate(rank, pos) + for i = 1,32 do + for _ = 1,math.random(1,2) do + item = glooptest.extragen_module.treasure[rank][math.random(1, #glooptest.extragen_module.treasure[rank])] + item_rarity = item[3] + if math.random(1, item_rarity+math.random(1,3)) == 1 then + item_name = item[1] + item_stacksize = item[2]-math.random(0,item[2]-1) + minetest.get_inventory({type="node",pos={x=pos.x,y=pos.y,z=pos.z}}):set_stack("main", i, ItemStack({name=item_name,count=item_stacksize})) + break + else + end + end + end +end + +function glooptest.extragen_module.register_chest_loot(rank, entry) + if minetest.registered_items[entry[1]] ~= nil then + table.insert(glooptest.extragen_module.treasure[rank], entry) + end +end + +glooptest.extragen_module.register_chest_loot(1, {"glooptest:handsaw_wood", 1, 12}) +glooptest.extragen_module.register_chest_loot(1, {"glooptest:hammer_wood", 1, 12}) +glooptest.extragen_module.register_chest_loot(1, {"glooptest:handsaw_stone", 1, 24}) +glooptest.extragen_module.register_chest_loot(1, {"glooptest:hammer_stone", 1, 24}) + +glooptest.extragen_module.register_chest_loot(2, {"glooptest:handsaw_stone", 1, 12}) +glooptest.extragen_module.register_chest_loot(2, {"glooptest:hammer_stone", 1, 12}) + +glooptest.extragen_module.register_chest_loot(3, {"glooptest:handsaw_bronze", 1, 12}) +glooptest.extragen_module.register_chest_loot(3, {"glooptest:hammer_bronze", 1, 12}) + +glooptest.extragen_module.register_chest_loot(4, {"glooptest:handsaw_mese", 1, 18}) +glooptest.extragen_module.register_chest_loot(4, {"glooptest:hammer_mese", 1, 18}) + +glooptest.extragen_module.register_chest_loot(5, {"glooptest:handsaw_mese", 1, 12}) +glooptest.extragen_module.register_chest_loot(5, {"glooptest:hammer_mese", 1, 12}) +glooptest.extragen_module.register_chest_loot(5, {"glooptest:handsaw_diamond", 1, 60}) +glooptest.extragen_module.register_chest_loot(5, {"glooptest:hammer_diamond", 1, 60}) + +minetest.register_node("glooptest:treasure_chest_1", { + description = "Treasure Chest Rank 1", + drawtype = "nodebox", + tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png", + "default_chest_side.png", "default_chest_side.png", "default_chest_front.png"}, + paramtype = "light", + paramtype2 = "facedir", + drop = "", + groups = {choppy=2,oddly_breakable_by_hand=2}, + legacy_facedir_simple = true, + sounds = default.node_sound_wood_defaults(), + node_box = { + type = "fixed", + fixed = treasure_chest_nodebox, + }, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec",treasure_chest_formspec) + meta:set_string("infotext", "Treasure Chest Rank I") + local inv = meta:get_inventory() + inv:set_size("main", 32) + treasure_chest_populate(1, pos) + end, + can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("main") + end, + on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + glooptest.debug("ACTION", player:get_player_name().." moves items in R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + glooptest.debug("ACTION", player:get_player_name().." moves items in R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, + on_metadata_inventory_take = function(pos, listname, index, stack, player) + glooptest.debug("ACTION", player:get_player_name().." takes items from R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, +}) + +minetest.register_node("glooptest:treasure_chest_2", { + description = "Treasure Chest Rank 2", + drawtype = "nodebox", + tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png", + "default_chest_side.png", "default_chest_side.png", "default_chest_front.png"}, + paramtype = "light", + paramtype2 = "facedir", + drop = "", + groups = {choppy=2,oddly_breakable_by_hand=2}, + legacy_facedir_simple = true, + sounds = default.node_sound_wood_defaults(), + node_box = { + type = "fixed", + fixed = treasure_chest_nodebox, + }, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec",treasure_chest_formspec) + meta:set_string("infotext", "Treasure Chest Rank II") + local inv = meta:get_inventory() + inv:set_size("main", 32) + treasure_chest_populate(2, pos) + end, + can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("main") + end, + on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + glooptest.debug("ACTION", player:get_player_name().." moves items in R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + glooptest.debug("ACTION", player:get_player_name().." moves items in R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, + on_metadata_inventory_take = function(pos, listname, index, stack, player) + glooptest.debug("ACTION", player:get_player_name().." takes items from R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, +}) + +minetest.register_node("glooptest:treasure_chest_3", { + description = "Treasure Chest Rank 3", + drawtype = "nodebox", + tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png", + "default_chest_side.png", "default_chest_side.png", "default_chest_front.png"}, + paramtype = "light", + paramtype2 = "facedir", + drop = "", + groups = {choppy=2,oddly_breakable_by_hand=2}, + legacy_facedir_simple = true, + sounds = default.node_sound_wood_defaults(), + node_box = { + type = "fixed", + fixed = treasure_chest_nodebox, + }, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec",treasure_chest_formspec) + meta:set_string("infotext", "Treasure Chest Rank III") + local inv = meta:get_inventory() + inv:set_size("main", 32) + treasure_chest_populate(3, pos) + end, + can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("main") + end, + on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + glooptest.debug("ACTION", player:get_player_name().." moves items in R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + glooptest.debug("ACTION", player:get_player_name().." moves items in R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, + on_metadata_inventory_take = function(pos, listname, index, stack, player) + glooptest.debug("ACTION", player:get_player_name().." takes items from R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, +}) + +minetest.register_node("glooptest:treasure_chest_4", { + description = "Treasure Chest Rank 4", + drawtype = "nodebox", + tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png", + "default_chest_side.png", "default_chest_side.png", "default_chest_front.png"}, + paramtype = "light", + paramtype2 = "facedir", + drop = "", + groups = {choppy=2,oddly_breakable_by_hand=2}, + node_box = { + type = "fixed", + fixed = treasure_chest_nodebox, + }, + legacy_facedir_simple = true, + sounds = default.node_sound_wood_defaults(), + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec",treasure_chest_formspec) + meta:set_string("infotext", "Treasure Chest Rank IV") + local inv = meta:get_inventory() + inv:set_size("main", 32) + treasure_chest_populate(4, pos) + end, + can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("main") + end, + on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + glooptest.debug("ACTION", player:get_player_name().." moves items in R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + glooptest.debug("ACTION", player:get_player_name().." moves items in R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, + on_metadata_inventory_take = function(pos, listname, index, stack, player) + glooptest.debug("ACTION", player:get_player_name().." takes items from R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, +}) + +minetest.register_node("glooptest:treasure_chest_5", { + description = "Treasure Chest Rank 5", + drawtype = "nodebox", + tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png", + "default_chest_side.png", "default_chest_side.png", "default_chest_front.png"}, + paramtype = "light", + paramtype2 = "facedir", + drop = "", + groups = {choppy=2,oddly_breakable_by_hand=2}, + legacy_facedir_simple = true, + sounds = default.node_sound_wood_defaults(), + node_box = { + type = "fixed", + fixed = treasure_chest_nodebox, + }, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec",treasure_chest_formspec) + meta:set_string("infotext", "Treasure Chest Rank V") + local inv = meta:get_inventory() + inv:set_size("main", 32) + treasure_chest_populate(5, pos) + end, + can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("main") + end, + on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + glooptest.debug("ACTION", player:get_player_name().." moves items in R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + glooptest.debug("ACTION", player:get_player_name().." moves items in R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, + on_metadata_inventory_take = function(pos, listname, index, stack, player) + glooptest.debug("ACTION", player:get_player_name().." takes items from R1 treasure chest at "..minetest.pos_to_string(pos)..".") + end, +}) + +minetest.register_on_generated(function(minp, maxp) + coords = {} + coords.x = {} + coords.y = {} + coords.z = {} + for i = minp.x,maxp.x do + table.insert(coords.x, i) + end + for i = minp.y,maxp.y do + table.insert(coords.y, i) + end + for i = minp.z,maxp.z do + table.insert(coords.z, i) + end + for x = 1,#coords.x do + for y = 1,#coords.y do + for z = 1,#coords.z do + if minetest.get_node({x=coords.x[x],y=coords.y[y]+1,z=coords.z[z]}).name == "air" and minetest.get_node({x=coords.x[x],y=coords.y[y],z=coords.z[z]}).name ~= "air" and minetest.registered_nodes[minetest.get_node({x=coords.x[x],y=coords.y[y],z=coords.z[z]}).name].drawtype == "normal" then + if coords.y[y] >=0 then + if math.random(1,5000) == 1 then + minetest.place_node({x=coords.x[x],y=coords.y[y]+1,z=coords.z[z]}, {name="glooptest:treasure_chest_1", param2=math.random(1,4)}) + elseif math.random(1,8000) == 1 then + minetest.place_node({x=coords.x[x],y=coords.y[y]+1,z=coords.z[z]}, {name="glooptest:treasure_chest_2", param2=math.random(1,4)}) + end + elseif coords.y[y] <=-30 then + if math.random(1,1000) == 1 then + minetest.place_node({x=coords.x[x],y=coords.y[y]+1,z=coords.z[z]}, {name="glooptest:treasure_chest_3", param2=math.random(1,4)}) + elseif coords.y[y] <=-1000 then + if math.random(1,1300) == 1 then + minetest.place_node({x=coords.x[x],y=coords.y[y]+1,z=coords.z[z]}, {name="glooptest:treasure_chest_4", param2=math.random(1,4)}) + elseif coords.y[y] <=-2500 then + if math.random(1,2000) == 1 then + minetest.place_node({x=coords.x[x],y=coords.y[y]+1,z=coords.z[z]}, {name="glooptest:treasure_chest_5", param2=math.random(1,4)}) + end + end + end + end + end + end + end + end +end) + +--minetest.register_on_generated(glooptest.extragen_module.spawn_chests(minp, maxp))
\ No newline at end of file diff --git a/glooptest/glooptest/parts_module/init.lua b/glooptest/glooptest/parts_module/init.lua new file mode 100644 index 0000000..b1a9202 --- /dev/null +++ b/glooptest/glooptest/parts_module/init.lua @@ -0,0 +1,174 @@ +glooptest.parts_module = {} +glooptest.debug("MESSAGE","Loading Parts Module Now!") + +minetest.register_craftitem("glooptest:chainlink", { + description = "Chainlink", + inventory_image = "glooptest_chainlink.png" +}) + +minetest.register_craft({ + output = "glooptest:chainlink 8", + recipe = { + {"", "default:steel_ingot", ""}, + {"default:steel_ingot", "", "default:steel_ingot"}, + {"", "default:steel_ingot", ""} + } +}) + +minetest.register_node("glooptest:crystal_glass", { + description = "Crystal Glass", + drawtype = "allfaces", + tiles = {"glooptest_crystal_glass.png"}, + inventory_image = minetest.inventorycube("glooptest_crystal_glass.png"), + paramtype = "light", + sunlight_propagates = true, + groups = {cracky=3}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_craft({ + output = "glooptest:crystal_glass 4", + recipe = { + {"default:glass", "default:desert_stone"}, + {"default:desert_stone", "default:glass"}, + } +}) + +minetest.register_craft({ + output = "glooptest:crystal_glass 4", + recipe = { + {"default:desert_stone", "default:glass"}, + {"default:glass", "default:desert_stone"}, + } +}) + +minetest.register_node("glooptest:reinforced_crystal_glass", { + description = "Steel-Reinforced Crystal Glass", + drawtype = "allfaces", + tiles = {"glooptest_reinforced_crystal_glass.png"}, + inventory_image = minetest.inventorycube("glooptest_reinforced_crystal_glass.png"), + paramtype = "light", + sunlight_propagates = true, + groups = {cracky=2}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_craft({ + output = "glooptest:reinforced_crystal_glass 8", + recipe = { + {"glooptest:crystal_glass", "glooptest:crystal_glass", "glooptest:crystal_glass"}, + {"glooptest:crystal_glass", "default:steel_ingot", "glooptest:crystal_glass"}, + {"glooptest:crystal_glass", "glooptest:crystal_glass", "glooptest:crystal_glass"} + } +}) + +if LOAD_ORE_MODULE == true then + + minetest.register_node("glooptest:akalin_crystal_glass", { + description = "Akalin-Reinforced Crystal Glass", + drawtype = "allfaces", + tiles = {"glooptest_akalin_crystal_glass.png"}, + inventory_image = minetest.inventorycube("glooptest_akalin_crystal_glass.png"), + paramtype = "light", + sunlight_propagates = true, + groups = {cracky=2}, + sounds = default.node_sound_glass_defaults(), + }) + + minetest.register_craft({ + output = "glooptest:akalin_crystal_glass 8", + recipe = { + {"glooptest:crystal_glass", "glooptest:crystal_glass", "glooptest:crystal_glass"}, + {"glooptest:crystal_glass", "glooptest:akalin_ingot", "glooptest:crystal_glass"}, + {"glooptest:crystal_glass", "glooptest:crystal_glass", "glooptest:crystal_glass"} + } + }) + + minetest.register_node("glooptest:heavy_crystal_glass", { + description = "Heavily Reinforced Crystal Glass", + drawtype = "allfaces", + tiles = {"glooptest_reinforced_akalin_crystal_glass.png"}, + inventory_image = minetest.inventorycube("glooptest_reinforced_akalin_crystal_glass.png"), + paramtype = "light", + sunlight_propagates = true, + groups = {cracky=1}, + sounds = default.node_sound_glass_defaults(), + }) + + minetest.register_craft({ + output = "glooptest:heavy_crystal_glass 4", + recipe = { + {"glooptest:reinforced_crystal_glass", "glooptest:akalin_crystal_glass"}, + {"glooptest:akalin_crystal_glass", "glooptest:reinforced_crystal_glass"}, + } + }) + + minetest.register_craft({ + output = "glooptest:heavy_crystal_glass 4", + recipe = { + {"glooptest:akalin_crystal_glass", "glooptest:reinforced_crystal_glass"}, + {"glooptest:reinforced_crystal_glass", "glooptest:akalin_crystal_glass"}, + } + }) + + minetest.register_node("glooptest:alatro_crystal_glass", { + description = "Alatro-Reinforced Crystal Glass", + drawtype = "allfaces", + tiles = {"glooptest_alatro_crystal_glass.png"}, + use_texture_alpha = true, + inventory_image = minetest.inventorycube("glooptest_alatro_crystal_glass.png"), + paramtype = "light", + groups = {cracky=2}, + sounds = default.node_sound_glass_defaults(), + }) + + minetest.register_craft({ + output = "glooptest:alatro_crystal_glass 8", + recipe = { + {"glooptest:crystal_glass", "glooptest:crystal_glass", "glooptest:crystal_glass"}, + {"glooptest:crystal_glass", "glooptest:alatro_ingot", "glooptest:crystal_glass"}, + {"glooptest:crystal_glass", "glooptest:crystal_glass", "glooptest:crystal_glass"} + } + }) + + minetest.register_node("glooptest:arol_crystal_glass", { + description = "Arol-Reinforced Crystal Glass", + drawtype = "allfaces", + tiles = {"glooptest_arol_crystal_glass.png"}, + inventory_image = minetest.inventorycube("glooptest_arol_crystal_glass.png"), + paramtype = "light", + sunlight_propagates = true, + groups = {cracky=1}, + sounds = default.node_sound_glass_defaults(), + }) + + minetest.register_craft({ + output = "glooptest:arol_crystal_glass 8", + recipe = { + {"glooptest:crystal_glass", "glooptest:crystal_glass", "glooptest:crystal_glass"}, + {"glooptest:crystal_glass", "glooptest:arol_ingot", "glooptest:crystal_glass"}, + {"glooptest:crystal_glass", "glooptest:crystal_glass", "glooptest:crystal_glass"} + } + }) + + minetest.register_node("glooptest:talinite_crystal_glass", { + description = "Talinite-Reinforced Crystal Glass", + drawtype = "allfaces", + tiles = {"glooptest_talinite_crystal_glass.png"}, + inventory_image = minetest.inventorycube("glooptest_talinite_crystal_glass.png"), + paramtype = "light", + sunlight_propagates = true, + light_source = 14, + groups = {cracky=2}, + sounds = default.node_sound_glass_defaults(), + }) + + minetest.register_craft({ + output = "glooptest:talinite_crystal_glass 8", + recipe = { + {"glooptest:crystal_glass", "glooptest:crystal_glass", "glooptest:crystal_glass"}, + {"glooptest:crystal_glass", "glooptest:talinite_ingot", "glooptest:crystal_glass"}, + {"glooptest:crystal_glass", "glooptest:crystal_glass", "glooptest:crystal_glass"} + } + }) +end
\ No newline at end of file diff --git a/glooptest/glooptest/tech_module/init.lua b/glooptest/glooptest/tech_module/init.lua new file mode 100644 index 0000000..0ea1520 --- /dev/null +++ b/glooptest/glooptest/tech_module/init.lua @@ -0,0 +1,87 @@ +glooptest.tech_module = {} +glooptest.debug("MESSAGE","Loading Tech Module Now!") + +--dofile(minetest.get_modpath("glooptest").."/tech_module/api.lua") + +local fixed = { + { -8/16, -8/16, -8/16, 8/16, -4/16, 8/16 }, -- base + { -8/16, 3/16, -8/16, 8/16, 8/16, 8/16 }, -- top + { 3/16, -7/16, 3/16, 7/16, 7/16, 7/16 }, + { 3/16, -7/16, -7/16, 7/16, 7/16, -3/16 }, + { -7/16, -7/16, 3/16, -3/16, 7/16, 7/16 }, + { -7/16, -7/16, -7/16, -3/16, 7/16, -3/16 }, +} + +-- {used item, produced node} +glooptest.tech_module.table_changers = { + {}, +} + +function glooptest.tech_module.register_table(used_item, produced_node) + if minetest.registered_items[used_item] ~= nil and minetest.registered_items[produced_node] ~= nil then + table.insert(glooptest.tech_module.table_changers, {item = used_item, node = produced_node}) + end +end + +minetest.register_alias("glooptest:table", "glooptest:wooden_table") +minetest.register_node("glooptest:wooden_table", { + description = "Wooden Table", + drawtype = "nodebox", + tiles = {"glooptest_table_tb.png","glooptest_table_tb.png","glooptest_table_side.png"}, + paramtype = "light", + groups = {choppy=3, snappy=3}, + node_box = { + type = "fixed", + fixed = fixed, + }, + --[[ + on_rightclick = function(pos, node, clicker, itemstack) + local clicking_item = itemstack + for ind,content in glooptest.tech_module.table_changers do + if content.item == clicking_item:get_name() then + minetest.place_node(pos, {name=content.node}) + return ItemStack(clicking_item:get_name().." "..tostring(clicking_item:get_count()-1)) + end + end + end, + --]] +}) + +minetest.register_craft({ + output = "glooptest:table", + recipe = { + {"group:wood","group:wood","group:wood"}, + {"default:stick","","default:stick"}, + {"group:wood","","group:wood"}, + } +}) + +minetest.register_craftitem("glooptest:upgrade_core", { + description = "Upgrade Core", + inventory_image = "glooptest_upgrade_core.png", +}) + +minetest.register_craft({ + output = "glooptest:upgrade_core", + recipe = { + {"glooptest:akalin_ingot", "glooptest:crystal_glass", "glooptest:akalin_ingot"}, + {"glooptest:crystal_glass", "default:mese_crystal_fragment", "glooptest:crystal_glass"}, + {"glooptest:akalin_ingot", "glooptest:crystal_glass", "glooptest:akalin_ingot"}, + }, +}) + +if LOAD_ORE_MODULE == true then + minetest.register_craftitem("glooptest:encrusting_upgrade", { + description = "Encrusting Upgrade", + inventory_image = "glooptest_encrusting_upgrade.png", + }) + + minetest.register_craft({ + output = "glooptest:encrusting_upgrade", + recipe = { + {"group:glooptest_gem", "group:glooptest_gem", "group:glooptest_gem"}, + {"glooptest:hammer_steel", "glooptest:upgrade_core", "glooptest:handsaw_steel"}, + {"group:glooptest_gem", "group:glooptest_gem", "group:glooptest_gem"}, + }, + }) +end diff --git a/glooptest/glooptest/textures/gloopores_akalin_block.png b/glooptest/glooptest/textures/gloopores_akalin_block.png Binary files differnew file mode 100644 index 0000000..132c238 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_akalin_block.png diff --git a/glooptest/glooptest/textures/gloopores_akalin_ingot.png b/glooptest/glooptest/textures/gloopores_akalin_ingot.png Binary files differnew file mode 100644 index 0000000..ac04aa4 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_akalin_ingot.png diff --git a/glooptest/glooptest/textures/gloopores_akalin_lump.png b/glooptest/glooptest/textures/gloopores_akalin_lump.png Binary files differnew file mode 100644 index 0000000..560fb68 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_akalin_lump.png diff --git a/glooptest/glooptest/textures/gloopores_alatro_block.png b/glooptest/glooptest/textures/gloopores_alatro_block.png Binary files differnew file mode 100644 index 0000000..bced3af --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_alatro_block.png diff --git a/glooptest/glooptest/textures/gloopores_alatro_ingot.png b/glooptest/glooptest/textures/gloopores_alatro_ingot.png Binary files differnew file mode 100644 index 0000000..2f05cc7 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_alatro_ingot.png diff --git a/glooptest/glooptest/textures/gloopores_alatro_lump.png b/glooptest/glooptest/textures/gloopores_alatro_lump.png Binary files differnew file mode 100644 index 0000000..b36b64f --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_alatro_lump.png diff --git a/glooptest/glooptest/textures/gloopores_arol_ingot.png b/glooptest/glooptest/textures/gloopores_arol_ingot.png Binary files differnew file mode 100644 index 0000000..057054c --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_arol_ingot.png diff --git a/glooptest/glooptest/textures/gloopores_arol_lump.png b/glooptest/glooptest/textures/gloopores_arol_lump.png Binary files differnew file mode 100644 index 0000000..d36a52a --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_arol_lump.png diff --git a/glooptest/glooptest/textures/gloopores_kalite_lump.png b/glooptest/glooptest/textures/gloopores_kalite_lump.png Binary files differnew file mode 100644 index 0000000..449da9e --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_kalite_lump.png diff --git a/glooptest/glooptest/textures/gloopores_kalite_torch_animated.png b/glooptest/glooptest/textures/gloopores_kalite_torch_animated.png Binary files differnew file mode 100644 index 0000000..ac92390 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_kalite_torch_animated.png diff --git a/glooptest/glooptest/textures/gloopores_kalite_torch_on_ceiling_animated.png b/glooptest/glooptest/textures/gloopores_kalite_torch_on_ceiling_animated.png Binary files differnew file mode 100644 index 0000000..4e503a0 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_kalite_torch_on_ceiling_animated.png diff --git a/glooptest/glooptest/textures/gloopores_kalite_torch_on_floor.png b/glooptest/glooptest/textures/gloopores_kalite_torch_on_floor.png Binary files differnew file mode 100644 index 0000000..6b769d4 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_kalite_torch_on_floor.png diff --git a/glooptest/glooptest/textures/gloopores_kalite_torch_on_floor_animated.png b/glooptest/glooptest/textures/gloopores_kalite_torch_on_floor_animated.png Binary files differnew file mode 100644 index 0000000..3936ed2 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_kalite_torch_on_floor_animated.png diff --git a/glooptest/glooptest/textures/gloopores_mineral_akalin.png b/glooptest/glooptest/textures/gloopores_mineral_akalin.png Binary files differnew file mode 100644 index 0000000..8abf849 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_mineral_akalin.png diff --git a/glooptest/glooptest/textures/gloopores_mineral_alatro.png b/glooptest/glooptest/textures/gloopores_mineral_alatro.png Binary files differnew file mode 100644 index 0000000..3e7b821 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_mineral_alatro.png diff --git a/glooptest/glooptest/textures/gloopores_mineral_arol.png b/glooptest/glooptest/textures/gloopores_mineral_arol.png Binary files differnew file mode 100644 index 0000000..0fb7d18 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_mineral_arol.png diff --git a/glooptest/glooptest/textures/gloopores_mineral_kalite.png b/glooptest/glooptest/textures/gloopores_mineral_kalite.png Binary files differnew file mode 100644 index 0000000..04a2d18 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_mineral_kalite.png diff --git a/glooptest/glooptest/textures/gloopores_mineral_talinite.png b/glooptest/glooptest/textures/gloopores_mineral_talinite.png Binary files differnew file mode 100644 index 0000000..3241221 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_mineral_talinite.png diff --git a/glooptest/glooptest/textures/gloopores_talinite_block.png b/glooptest/glooptest/textures/gloopores_talinite_block.png Binary files differnew file mode 100644 index 0000000..83f4b8e --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_talinite_block.png diff --git a/glooptest/glooptest/textures/gloopores_talinite_ingot.png b/glooptest/glooptest/textures/gloopores_talinite_ingot.png Binary files differnew file mode 100644 index 0000000..7320f48 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_talinite_ingot.png diff --git a/glooptest/glooptest/textures/gloopores_talinite_lump.png b/glooptest/glooptest/textures/gloopores_talinite_lump.png Binary files differnew file mode 100644 index 0000000..0caa8ed --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_talinite_lump.png diff --git a/glooptest/glooptest/textures/gloopores_tool_alatroaxe.png b/glooptest/glooptest/textures/gloopores_tool_alatroaxe.png Binary files differnew file mode 100644 index 0000000..77a3e4a --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_tool_alatroaxe.png diff --git a/glooptest/glooptest/textures/gloopores_tool_alatropick.png b/glooptest/glooptest/textures/gloopores_tool_alatropick.png Binary files differnew file mode 100644 index 0000000..68de88f --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_tool_alatropick.png diff --git a/glooptest/glooptest/textures/gloopores_tool_alatroshovel.png b/glooptest/glooptest/textures/gloopores_tool_alatroshovel.png Binary files differnew file mode 100644 index 0000000..839f3d1 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_tool_alatroshovel.png diff --git a/glooptest/glooptest/textures/gloopores_tool_alatrosword.png b/glooptest/glooptest/textures/gloopores_tool_alatrosword.png Binary files differnew file mode 100644 index 0000000..f6c0c36 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_tool_alatrosword.png diff --git a/glooptest/glooptest/textures/gloopores_tool_arolaxe.png b/glooptest/glooptest/textures/gloopores_tool_arolaxe.png Binary files differnew file mode 100644 index 0000000..9696e01 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_tool_arolaxe.png diff --git a/glooptest/glooptest/textures/gloopores_tool_arolpick.png b/glooptest/glooptest/textures/gloopores_tool_arolpick.png Binary files differnew file mode 100644 index 0000000..4eb6e91 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_tool_arolpick.png diff --git a/glooptest/glooptest/textures/gloopores_tool_arolshovel.png b/glooptest/glooptest/textures/gloopores_tool_arolshovel.png Binary files differnew file mode 100644 index 0000000..d241fae --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_tool_arolshovel.png diff --git a/glooptest/glooptest/textures/gloopores_tool_arolsword.png b/glooptest/glooptest/textures/gloopores_tool_arolsword.png Binary files differnew file mode 100644 index 0000000..e1417c1 --- /dev/null +++ b/glooptest/glooptest/textures/gloopores_tool_arolsword.png diff --git a/glooptest/glooptest/textures/glooptest_akalin_crystal_glass.png b/glooptest/glooptest/textures/glooptest_akalin_crystal_glass.png Binary files differnew file mode 100644 index 0000000..08190e3 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_akalin_crystal_glass.png diff --git a/glooptest/glooptest/textures/glooptest_alatro_crystal_glass.png b/glooptest/glooptest/textures/glooptest_alatro_crystal_glass.png Binary files differnew file mode 100644 index 0000000..7c924b2 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_alatro_crystal_glass.png diff --git a/glooptest/glooptest/textures/glooptest_amethyst_block.png b/glooptest/glooptest/textures/glooptest_amethyst_block.png Binary files differnew file mode 100644 index 0000000..80a38bd --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_amethyst_block.png diff --git a/glooptest/glooptest/textures/glooptest_arol_crystal_glass.png b/glooptest/glooptest/textures/glooptest_arol_crystal_glass.png Binary files differnew file mode 100644 index 0000000..5e41dc0 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_arol_crystal_glass.png diff --git a/glooptest/glooptest/textures/glooptest_chainlink.png b/glooptest/glooptest/textures/glooptest_chainlink.png Binary files differnew file mode 100644 index 0000000..d7132c3 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_chainlink.png diff --git a/glooptest/glooptest/textures/glooptest_compressed_kalite.png b/glooptest/glooptest/textures/glooptest_compressed_kalite.png Binary files differnew file mode 100644 index 0000000..8645ea7 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_compressed_kalite.png diff --git a/glooptest/glooptest/textures/glooptest_crystal_glass.png b/glooptest/glooptest/textures/glooptest_crystal_glass.png Binary files differnew file mode 100644 index 0000000..875f12e --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_crystal_glass.png diff --git a/glooptest/glooptest/textures/glooptest_emerald_block.png b/glooptest/glooptest/textures/glooptest_emerald_block.png Binary files differnew file mode 100644 index 0000000..c037f4f --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_emerald_block.png diff --git a/glooptest/glooptest/textures/glooptest_encrusting_upgrade.png b/glooptest/glooptest/textures/glooptest_encrusting_upgrade.png Binary files differnew file mode 100644 index 0000000..8d9edf0 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_encrusting_upgrade.png diff --git a/glooptest/glooptest/textures/glooptest_gem_amethyst.png b/glooptest/glooptest/textures/glooptest_gem_amethyst.png Binary files differnew file mode 100644 index 0000000..a47014e --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gem_amethyst.png diff --git a/glooptest/glooptest/textures/glooptest_gem_emerald.png b/glooptest/glooptest/textures/glooptest_gem_emerald.png Binary files differnew file mode 100644 index 0000000..5bee941 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gem_emerald.png diff --git a/glooptest/glooptest/textures/glooptest_gem_ruby.png b/glooptest/glooptest/textures/glooptest_gem_ruby.png Binary files differnew file mode 100644 index 0000000..a96c983 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gem_ruby.png diff --git a/glooptest/glooptest/textures/glooptest_gem_sapphire.png b/glooptest/glooptest/textures/glooptest_gem_sapphire.png Binary files differnew file mode 100644 index 0000000..c5af51d --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gem_sapphire.png diff --git a/glooptest/glooptest/textures/glooptest_gem_topaz.png b/glooptest/glooptest/textures/glooptest_gem_topaz.png Binary files differnew file mode 100644 index 0000000..d2fbd45 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gem_topaz.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_axe_amethyst.png b/glooptest/glooptest/textures/glooptest_gemoverlay_axe_amethyst.png Binary files differnew file mode 100644 index 0000000..bf783f2 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_axe_amethyst.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_axe_diamond.png b/glooptest/glooptest/textures/glooptest_gemoverlay_axe_diamond.png Binary files differnew file mode 100644 index 0000000..e29d997 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_axe_diamond.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_axe_emerald.png b/glooptest/glooptest/textures/glooptest_gemoverlay_axe_emerald.png Binary files differnew file mode 100644 index 0000000..a85c77a --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_axe_emerald.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_axe_ruby.png b/glooptest/glooptest/textures/glooptest_gemoverlay_axe_ruby.png Binary files differnew file mode 100644 index 0000000..d4c4c13 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_axe_ruby.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_axe_sapphire.png b/glooptest/glooptest/textures/glooptest_gemoverlay_axe_sapphire.png Binary files differnew file mode 100644 index 0000000..e1090ca --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_axe_sapphire.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_axe_topaz.png b/glooptest/glooptest/textures/glooptest_gemoverlay_axe_topaz.png Binary files differnew file mode 100644 index 0000000..8154b02 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_axe_topaz.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_amethyst.png b/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_amethyst.png Binary files differnew file mode 100644 index 0000000..c8ac4a6 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_amethyst.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_diamond.png b/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_diamond.png Binary files differnew file mode 100644 index 0000000..7c20cec --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_diamond.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_emerald.png b/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_emerald.png Binary files differnew file mode 100644 index 0000000..5b515ee --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_emerald.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_ruby.png b/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_ruby.png Binary files differnew file mode 100644 index 0000000..64997bd --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_ruby.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_sapphire.png b/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_sapphire.png Binary files differnew file mode 100644 index 0000000..b21a2ab --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_sapphire.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_topaz.png b/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_topaz.png Binary files differnew file mode 100644 index 0000000..a3e7c81 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_hammer_topaz.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_amethyst.png b/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_amethyst.png Binary files differnew file mode 100644 index 0000000..4438178 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_amethyst.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_diamond.png b/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_diamond.png Binary files differnew file mode 100644 index 0000000..5e9734a --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_diamond.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_emerald.png b/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_emerald.png Binary files differnew file mode 100644 index 0000000..1ad2f79 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_emerald.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_ruby.png b/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_ruby.png Binary files differnew file mode 100644 index 0000000..76fe073 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_ruby.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_sapphire.png b/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_sapphire.png Binary files differnew file mode 100644 index 0000000..5df287b --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_sapphire.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_topaz.png b/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_topaz.png Binary files differnew file mode 100644 index 0000000..7edfb1f --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_handsaw_topaz.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_pick_amethyst.png b/glooptest/glooptest/textures/glooptest_gemoverlay_pick_amethyst.png Binary files differnew file mode 100644 index 0000000..72af906 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_pick_amethyst.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_pick_diamond.png b/glooptest/glooptest/textures/glooptest_gemoverlay_pick_diamond.png Binary files differnew file mode 100644 index 0000000..d2bbe81 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_pick_diamond.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_pick_emerald.png b/glooptest/glooptest/textures/glooptest_gemoverlay_pick_emerald.png Binary files differnew file mode 100644 index 0000000..8cea97d --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_pick_emerald.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_pick_ruby.png b/glooptest/glooptest/textures/glooptest_gemoverlay_pick_ruby.png Binary files differnew file mode 100644 index 0000000..71e75ef --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_pick_ruby.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_pick_sapphire.png b/glooptest/glooptest/textures/glooptest_gemoverlay_pick_sapphire.png Binary files differnew file mode 100644 index 0000000..7d208a0 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_pick_sapphire.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_pick_topaz.png b/glooptest/glooptest/textures/glooptest_gemoverlay_pick_topaz.png Binary files differnew file mode 100644 index 0000000..490afe9 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_pick_topaz.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_amethyst.png b/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_amethyst.png Binary files differnew file mode 100644 index 0000000..e2551cc --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_amethyst.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_diamond.png b/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_diamond.png Binary files differnew file mode 100644 index 0000000..0570685 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_diamond.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_emerald.png b/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_emerald.png Binary files differnew file mode 100644 index 0000000..0d21a75 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_emerald.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_ruby.png b/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_ruby.png Binary files differnew file mode 100644 index 0000000..0c7e1b1 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_ruby.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_sapphire.png b/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_sapphire.png Binary files differnew file mode 100644 index 0000000..44a11ef --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_sapphire.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_topaz.png b/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_topaz.png Binary files differnew file mode 100644 index 0000000..fb10f97 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_shovel_topaz.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_sword_amethyst.png b/glooptest/glooptest/textures/glooptest_gemoverlay_sword_amethyst.png Binary files differnew file mode 100644 index 0000000..d3e24b8 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_sword_amethyst.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_sword_diamond.png b/glooptest/glooptest/textures/glooptest_gemoverlay_sword_diamond.png Binary files differnew file mode 100644 index 0000000..5af07fc --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_sword_diamond.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_sword_emerald.png b/glooptest/glooptest/textures/glooptest_gemoverlay_sword_emerald.png Binary files differnew file mode 100644 index 0000000..5093d1f --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_sword_emerald.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_sword_ruby.png b/glooptest/glooptest/textures/glooptest_gemoverlay_sword_ruby.png Binary files differnew file mode 100644 index 0000000..8ee9d0a --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_sword_ruby.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_sword_sapphire.png b/glooptest/glooptest/textures/glooptest_gemoverlay_sword_sapphire.png Binary files differnew file mode 100644 index 0000000..b86c087 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_sword_sapphire.png diff --git a/glooptest/glooptest/textures/glooptest_gemoverlay_sword_topaz.png b/glooptest/glooptest/textures/glooptest_gemoverlay_sword_topaz.png Binary files differnew file mode 100644 index 0000000..3eb0ab4 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_gemoverlay_sword_topaz.png diff --git a/glooptest/glooptest/textures/glooptest_mineral_amethyst.png b/glooptest/glooptest/textures/glooptest_mineral_amethyst.png Binary files differnew file mode 100644 index 0000000..eba5d3c --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_mineral_amethyst.png diff --git a/glooptest/glooptest/textures/glooptest_mineral_emerald.png b/glooptest/glooptest/textures/glooptest_mineral_emerald.png Binary files differnew file mode 100644 index 0000000..c70f3ee --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_mineral_emerald.png diff --git a/glooptest/glooptest/textures/glooptest_mineral_ruby.png b/glooptest/glooptest/textures/glooptest_mineral_ruby.png Binary files differnew file mode 100644 index 0000000..e4fffe3 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_mineral_ruby.png diff --git a/glooptest/glooptest/textures/glooptest_mineral_sapphire.png b/glooptest/glooptest/textures/glooptest_mineral_sapphire.png Binary files differnew file mode 100644 index 0000000..3c27349 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_mineral_sapphire.png diff --git a/glooptest/glooptest/textures/glooptest_mineral_topaz.png b/glooptest/glooptest/textures/glooptest_mineral_topaz.png Binary files differnew file mode 100644 index 0000000..6d7c799 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_mineral_topaz.png diff --git a/glooptest/glooptest/textures/glooptest_reinforced_akalin_crystal_glass.png b/glooptest/glooptest/textures/glooptest_reinforced_akalin_crystal_glass.png Binary files differnew file mode 100644 index 0000000..53f3acd --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_reinforced_akalin_crystal_glass.png diff --git a/glooptest/glooptest/textures/glooptest_reinforced_crystal_glass.png b/glooptest/glooptest/textures/glooptest_reinforced_crystal_glass.png Binary files differnew file mode 100644 index 0000000..2fc4f2d --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_reinforced_crystal_glass.png diff --git a/glooptest/glooptest/textures/glooptest_ruby_block.png b/glooptest/glooptest/textures/glooptest_ruby_block.png Binary files differnew file mode 100644 index 0000000..7d738ff --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_ruby_block.png diff --git a/glooptest/glooptest/textures/glooptest_sapphire_block.png b/glooptest/glooptest/textures/glooptest_sapphire_block.png Binary files differnew file mode 100644 index 0000000..fce9640 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_sapphire_block.png diff --git a/glooptest/glooptest/textures/glooptest_table_side.png b/glooptest/glooptest/textures/glooptest_table_side.png Binary files differnew file mode 100644 index 0000000..e7d1bfa --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_table_side.png diff --git a/glooptest/glooptest/textures/glooptest_table_tb.png b/glooptest/glooptest/textures/glooptest_table_tb.png Binary files differnew file mode 100644 index 0000000..f17f42e --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_table_tb.png diff --git a/glooptest/glooptest/textures/glooptest_talinite_crystal_glass.png b/glooptest/glooptest/textures/glooptest_talinite_crystal_glass.png Binary files differnew file mode 100644 index 0000000..1e22c10 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_talinite_crystal_glass.png diff --git a/glooptest/glooptest/textures/glooptest_tool_alatrohammer.png b/glooptest/glooptest/textures/glooptest_tool_alatrohammer.png Binary files differnew file mode 100644 index 0000000..9216907 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_alatrohammer.png diff --git a/glooptest/glooptest/textures/glooptest_tool_alatrohandsaw.png b/glooptest/glooptest/textures/glooptest_tool_alatrohandsaw.png Binary files differnew file mode 100644 index 0000000..efb6878 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_alatrohandsaw.png diff --git a/glooptest/glooptest/textures/glooptest_tool_arolhammer.png b/glooptest/glooptest/textures/glooptest_tool_arolhammer.png Binary files differnew file mode 100644 index 0000000..8df8dac --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_arolhammer.png diff --git a/glooptest/glooptest/textures/glooptest_tool_arolhandsaw.png b/glooptest/glooptest/textures/glooptest_tool_arolhandsaw.png Binary files differnew file mode 100644 index 0000000..2cee8e4 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_arolhandsaw.png diff --git a/glooptest/glooptest/textures/glooptest_tool_bronzehammer.png b/glooptest/glooptest/textures/glooptest_tool_bronzehammer.png Binary files differnew file mode 100644 index 0000000..f2a6f7a --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_bronzehammer.png diff --git a/glooptest/glooptest/textures/glooptest_tool_bronzehandsaw.png b/glooptest/glooptest/textures/glooptest_tool_bronzehandsaw.png Binary files differnew file mode 100644 index 0000000..3202136 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_bronzehandsaw.png diff --git a/glooptest/glooptest/textures/glooptest_tool_diamondhammer.png b/glooptest/glooptest/textures/glooptest_tool_diamondhammer.png Binary files differnew file mode 100644 index 0000000..2f49159 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_diamondhammer.png diff --git a/glooptest/glooptest/textures/glooptest_tool_diamondhandsaw.png b/glooptest/glooptest/textures/glooptest_tool_diamondhandsaw.png Binary files differnew file mode 100644 index 0000000..d5e5dac --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_diamondhandsaw.png diff --git a/glooptest/glooptest/textures/glooptest_tool_goldhammer.png b/glooptest/glooptest/textures/glooptest_tool_goldhammer.png Binary files differnew file mode 100644 index 0000000..e5064d5 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_goldhammer.png diff --git a/glooptest/glooptest/textures/glooptest_tool_goldhandsaw.png b/glooptest/glooptest/textures/glooptest_tool_goldhandsaw.png Binary files differnew file mode 100644 index 0000000..e2c4b01 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_goldhandsaw.png diff --git a/glooptest/glooptest/textures/glooptest_tool_mesehammer.png b/glooptest/glooptest/textures/glooptest_tool_mesehammer.png Binary files differnew file mode 100644 index 0000000..e250e2d --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_mesehammer.png diff --git a/glooptest/glooptest/textures/glooptest_tool_mesehandsaw.png b/glooptest/glooptest/textures/glooptest_tool_mesehandsaw.png Binary files differnew file mode 100644 index 0000000..4ee35b8 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_mesehandsaw.png diff --git a/glooptest/glooptest/textures/glooptest_tool_silverhammer.png b/glooptest/glooptest/textures/glooptest_tool_silverhammer.png Binary files differnew file mode 100644 index 0000000..d0687bf --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_silverhammer.png diff --git a/glooptest/glooptest/textures/glooptest_tool_silverhandsaw.png b/glooptest/glooptest/textures/glooptest_tool_silverhandsaw.png Binary files differnew file mode 100644 index 0000000..c1aa2a2 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_silverhandsaw.png diff --git a/glooptest/glooptest/textures/glooptest_tool_steelhammer.png b/glooptest/glooptest/textures/glooptest_tool_steelhammer.png Binary files differnew file mode 100644 index 0000000..b662a71 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_steelhammer.png diff --git a/glooptest/glooptest/textures/glooptest_tool_steelhandsaw.png b/glooptest/glooptest/textures/glooptest_tool_steelhandsaw.png Binary files differnew file mode 100644 index 0000000..4a9b79c --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_steelhandsaw.png diff --git a/glooptest/glooptest/textures/glooptest_tool_stonehammer.png b/glooptest/glooptest/textures/glooptest_tool_stonehammer.png Binary files differnew file mode 100644 index 0000000..0a4ea98 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_stonehammer.png diff --git a/glooptest/glooptest/textures/glooptest_tool_stonehandsaw.png b/glooptest/glooptest/textures/glooptest_tool_stonehandsaw.png Binary files differnew file mode 100644 index 0000000..7b85559 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_stonehandsaw.png diff --git a/glooptest/glooptest/textures/glooptest_tool_woodhammer.png b/glooptest/glooptest/textures/glooptest_tool_woodhammer.png Binary files differnew file mode 100644 index 0000000..8ae9df0 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_woodhammer.png diff --git a/glooptest/glooptest/textures/glooptest_tool_woodhandsaw.png b/glooptest/glooptest/textures/glooptest_tool_woodhandsaw.png Binary files differnew file mode 100644 index 0000000..493b48b --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_tool_woodhandsaw.png diff --git a/glooptest/glooptest/textures/glooptest_topaz_block.png b/glooptest/glooptest/textures/glooptest_topaz_block.png Binary files differnew file mode 100644 index 0000000..bf3c839 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_topaz_block.png diff --git a/glooptest/glooptest/textures/glooptest_upgrade_core.png b/glooptest/glooptest/textures/glooptest_upgrade_core.png Binary files differnew file mode 100644 index 0000000..2a517f4 --- /dev/null +++ b/glooptest/glooptest/textures/glooptest_upgrade_core.png diff --git a/glooptest/glooptest/tools_module/api.lua b/glooptest/glooptest/tools_module/api.lua new file mode 100644 index 0000000..5db65f9 --- /dev/null +++ b/glooptest/glooptest/tools_module/api.lua @@ -0,0 +1,98 @@ +function glooptest.tools_module.set_tool_recipe(modname,type,material,name) + if type == "sword" then + minetest.register_craft({ + recipe = {{material},{material},{"default:stick"}}, + output = modname..":sword_"..name, + }) + end + if type == "axe" then + minetest.register_craft({ + recipe = {{material, material}, {material, "default:stick"}, {"","default:stick"}}, + output = modname..":axe_"..name, + }) + minetest.register_craft({ + recipe = {{material, material}, {"default:stick", material}, {"default:stick", ""}}, + output = modname..":axe_"..name, + }) + end + if type == "pick" or type == "pickaxe" then + minetest.register_craft({ + recipe = {{material, material, material}, {"","default:stick",""}, {"","default:stick",""}}, + output = modname..":pick_"..name, + }) + end + if type == "shovel" then + minetest.register_craft({ + recipe = {{material},{"default:stick"},{"default:stick"}}, + output = modname..":shovel_"..name, + }) + end + if type == "handsaw" then + minetest.register_craft({ + recipe = {{material, "default:stick"},{material, "default:stick"},{"", "default:stick"}}, + output = modname..":handsaw_"..name, + }) + minetest.register_craft({ + recipe = {{"default:stick", material},{"default:stick", material},{"default:stick", ""}}, + output = modname..":handsaw_"..name, + }) + end + if type == "hammer" then + minetest.register_craft({ + recipe = {{material, "default:stick", material}, {material, "default:stick", material}, {"", "default:stick", ""}}, + output = modname..":hammer_"..name, + }) + end +end + +function glooptest.tools_module.register_tools(modname, name, desc, material, uses) + if uses.handsaw ~= nil and uses.handsaw.makes ~= false then + minetest.register_tool(modname..":handsaw_"..name, { + description = desc.." Handsaw", + inventory_image = uses.handsaw.texture, + tool_capabilities = uses.handsaw.caps, + }) + glooptest.tools_module.set_tool_recipe(modname,"handsaw",material,name) + end + if uses.hammer ~= nil and uses.hammer.makes ~= false then + minetest.register_tool(modname..":hammer_"..name, { + description = desc.." Hammer", + inventory_image = uses.hammer.texture, + tool_capabilities = uses.hammer.caps, + }) + glooptest.tools_module.set_tool_recipe(modname,"hammer",material,name) + end + if uses.sword ~= nil and uses.sword.makes ~= false then + minetest.register_tool(modname..":sword_"..name, { + description = desc.." Sword", + inventory_image = uses.sword.texture, + tool_capabilities = uses.sword.caps, + }) + glooptest.tools_module.set_tool_recipe(modname,"sword",material,name) + end + if uses.axe ~= nil and uses.axe.makes ~= false then + minetest.register_tool(modname..":axe_"..name, { + description = desc.." Axe", + inventory_image = uses.axe.texture, + tool_capabilities = uses.axe.caps, + }) + glooptest.tools_module.set_tool_recipe(modname,"axe",material,name) + end + if uses.pick ~= nil and uses.pick.makes ~= false then + minetest.register_tool(modname..":pick_"..name, { + description = desc.." Pickaxe", + inventory_image = uses.pick.texture, + tool_capabilities = uses.pick.caps, + }) + glooptest.tools_module.set_tool_recipe(modname,"pick",material,name) + end + if uses.shovel ~= nil and uses.shovel.makes ~= false then + minetest.register_tool(modname..":shovel_"..name, { + description = desc.." Shovel", + inventory_image = uses.shovel.texture, + wield_image = uses.shovel.texture.."^[transformR90", + tool_capabilities = uses.shovel.caps, + }) + glooptest.tools_module.set_tool_recipe(modname,"shovel",material,name) + end +end
\ No newline at end of file diff --git a/glooptest/glooptest/tools_module/init.lua b/glooptest/glooptest/tools_module/init.lua new file mode 100644 index 0000000..3c1cabc --- /dev/null +++ b/glooptest/glooptest/tools_module/init.lua @@ -0,0 +1,237 @@ +glooptest.tools_module = {} +glooptest.debug("MESSAGE","Loading Tools Module Now!") + +dofile(minetest.get_modpath("glooptest").."/tools_module/api.lua") + +glooptest.tools_module.register_tools("glooptest", "wood", "Wooden", "group:wood", { + handsaw = { + makes = true, + texture = "glooptest_tool_woodhandsaw.png", + caps = { + full_punch_interval = 1.0, + max_drop_level = 0, + groupcaps = { + snappy = {times={[2]=1.10, [3]=0.60}, uses=10, maxlevel=1}, + fleshy = {times={[3]=0.90}, uses=10, maxlevel=0} + }, + damage_groups = {fleshy=2, snappy=3}, + }, + }, + hammer = { + makes = true, + texture = "glooptest_tool_woodhammer.png", + caps = { + full_punch_interval = 1.0, + max_drop_level = 0, + groupcaps = { + bendy = {times={[2]=1.00, [3]=0.55}, uses=10, maxlevel=1}, + cracky = {times={[3]=1.10}, uses=10, maxlevel=0} + }, + damage_groups = {fleshy=2, bendy=2, cracky=1}, + }, + }, +}) + +glooptest.tools_module.register_tools("glooptest", "stone", "Stone", "group:stone", { + handsaw = { + makes = true, + texture = "glooptest_tool_stonehandsaw.png", + caps = { + full_punch_interval = 1.1, + max_drop_level = 0, + groupcaps = { + snappy = {times={[2]=0.80, [3]=0.40}, uses=20, maxlevel=1}, + fleshy = {times={[3]=0.70}, uses=20, maxlevel=0} + }, + damage_groups = {fleshy=3, snappy=3}, + }, + }, + hammer = { + makes = true, + texture = "glooptest_tool_stonehammer.png", + caps = { + full_punch_interval = 1.1, + max_drop_level = 0, + groupcaps = { + bendy = {times={[2]=0.90, [3]=0.60}, uses=20, maxlevel=1}, + cracky = {times={[3]=1.00}, uses=20, maxlevel=0} + }, + damage_groups = {fleshy=2, bendy=2, cracky=1}, + }, + }, +}) + +glooptest.tools_module.register_tools("glooptest", "steel", "Steel", "default:steel_ingot", { + handsaw = { + makes = true, + texture = "glooptest_tool_steelhandsaw.png", + caps = { + full_punch_interval = 0.9, + max_drop_level = 0, + groupcaps = { + snappy = {times={[1]=1.00, [2]=0.65, [3]=0.25}, uses=30, maxlevel=2}, + fleshy = {times={[2]=1.10, [3]=0.60}, uses=30, maxlevel=1} + }, + damage_groups = {fleshy=4, snappy=5}, + }, + }, + hammer = { + makes = true, + texture = "glooptest_tool_steelhammer.png", + caps = { + full_punch_interval = 1.0, + max_drop_level = 0, + groupcaps = { + bendy = {times={[1]=1.30, [2]=0.80, [3]=0.50}, uses=30, maxlevel=2}, + cracky = {times={[2]=1.80, [3]=0.90}, uses=30, maxlevel=0} + }, + damage_groups = {fleshy=3, bendy=3, cracky=2}, + }, + }, +}) + +glooptest.tools_module.register_tools("glooptest", "bronze", "Bronze", "default:bronze_ingot", { + handsaw = { + makes = true, + texture = "glooptest_tool_bronzehandsaw.png", + caps = { + full_punch_interval = 0.9, + max_drop_level = 0, + groupcaps = { + snappy = {times={[1]=1.00, [2]=0.65, [3]=0.25}, uses=40, maxlevel=2}, + fleshy = {times={[2]=1.10, [3]=0.60}, uses=40, maxlevel=1} + }, + damage_groups = {fleshy=4, snappy=5}, + }, + }, + hammer = { + makes = true, + texture = "glooptest_tool_bronzehammer.png", + caps = { + full_punch_interval = 1.0, + max_drop_level = 0, + groupcaps = { + bendy = {times={[1]=1.30, [2]=0.80, [3]=0.50}, uses=40, maxlevel=2}, + cracky = {times={[2]=1.80, [3]=0.90}, uses=40, maxlevel=0} + }, + damage_groups = {fleshy=3, bendy=3, cracky=2}, + }, + }, +}) + +glooptest.tools_module.register_tools("glooptest", "mese", "Mese", "default:mese_crystal", { + handsaw = { + makes = true, + texture = "glooptest_tool_mesehandsaw.png", + caps = { + full_punch_interval = 0.9, + max_drop_level = 0, + groupcaps = { + snappy = {times={[1]=0.70, [2]=0.40, [3]=0.20}, uses=30, maxlevel=3}, + fleshy = {times={[2]=1.00, [3]=0.55}, uses=30, maxlevel=1} + }, + damage_groups = {fleshy=5, snappy=6}, + }, + }, + hammer = { + makes = true, + texture = "glooptest_tool_mesehammer.png", + caps = { + full_punch_interval = 1.0, + max_drop_level = 0, + groupcaps = { + bendy = {times={[1]=1.00, [2]=0.60, [3]=0.40}, uses=30, maxlevel=3}, + cracky = {times={[2]=1.70, [3]=0.85}, uses=30, maxlevel=0} + }, + damage_groups = {fleshy=4, bendy=4, cracky=2}, + }, + }, +}) + +glooptest.tools_module.register_tools("glooptest", "diamond", "Diamond", "default:diamond", { + handsaw = { + makes = true, + texture = "glooptest_tool_diamondhandsaw.png", + caps = { + full_punch_interval = 0.9, + max_drop_level = 0, + groupcaps = { + snappy = {times={[1]=0.60, [2]=0.30, [3]=0.20}, uses=30, maxlevel=3}, + fleshy = {times={[2]=0.90, [3]=0.55}, uses=30, maxlevel=1} + }, + damage_groups = {fleshy=5, snappy=7}, + }, + }, + hammer = { + makes = true, + texture = "glooptest_tool_diamondhammer.png", + caps = { + full_punch_interval = 1.0, + max_drop_level = 0, + groupcaps = { + bendy = {times={[1]=0.90, [2]=0.50, [3]=0.40}, uses=30, maxlevel=3}, + cracky = {times={[2]=1.70, [3]=0.85}, uses=30, maxlevel=0} + }, + damage_groups = {fleshy=4, bendy=5, cracky=2}, + }, + }, +}) + +if LOAD_ORE_MODULE == true then + glooptest.tools_module.register_tools("glooptest", "alatro", "Alatro", "glooptest:alatro_ingot", { + handsaw = { + makes = true, + texture = "glooptest_tool_alatrohandsaw.png", + caps = { + full_punch_interval = 1.0, + max_drop_level = 0, + groupcaps = { + snappy = {times={[2]=0.70, [3]=0.30}, uses=40, maxlevel=1}, + fleshy = {times={[3]=0.65}, uses=40, maxlevel=0} + }, + damage_groups = {fleshy=3, snappy=3}, + }, + }, + hammer = { + makes = true, + texture = "glooptest_tool_alatrohammer.png", + caps = { + full_punch_interval = 1.0, + max_drop_level = 0, + groupcaps = { + bendy = {times={[2]=0.85, [3]=0.55}, uses=40, maxlevel=1}, + cracky = {times={[3]=0.95}, uses=40, maxlevel=0} + }, + damage_groups = {fleshy=2, bendy=2, cracky=1}, + }, + }, + }) + glooptest.tools_module.register_tools("glooptest", "arol", "Arol", "glooptest:arol_ingot", { + handsaw = { + makes = true, + texture = "glooptest_tool_arolhandsaw.png", + caps = { + full_punch_interval = 0.5, + max_drop_level = 0, + groupcaps = { + snappy = {times={[2]=1.00, [3]=0.80}, uses=300, maxlevel=1}, + fleshy = {times={[3]=1.20}, uses=300, maxlevel=0} + }, + damage_groups = {fleshy=3, snappy=3}, + }, + }, + hammer = { + makes = true, + texture = "glooptest_tool_arolhammer.png", + caps = { + full_punch_interval = 0.5, + max_drop_level = 0, + groupcaps = { + bendy = {times={[2]=1.65, [3]=1.00}, uses=300, maxlevel=1}, + cracky = {times={[3]=1.65}, uses=300, maxlevel=0} + }, + damage_groups = {fleshy=2, bendy=2, cracky=1}, + }, + }, + }) +end
\ No newline at end of file diff --git a/glooptest/modpack.txt b/glooptest/modpack.txt new file mode 100644 index 0000000..b7e6b84 --- /dev/null +++ b/glooptest/modpack.txt @@ -0,0 +1,3 @@ +This file exists for the lazy who will just extract this file to the mods folder. + +Shame on you. |