diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..e3c422fca6e6650c61a3398d866749ef346deafb --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Change Log + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + +## [1.0.0] - 2017-02-19 + +- Initial versioned release. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000000000000000000000000000000000..56fb5042cbd4cf17d2bb7df01315c0a4381a8125 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,10 @@ +# Contribution Guide + +Thank you for your interest in this mod! Before contributing, be sure to know +about these few guidelines: + +- Contributions have to be under the zlib license (or compatible) for code, + and CC BY-SA 3.0 license (or compatible) for assets. +- Make sure to update the change log, keeping the + [change log format](http://keepachangelog.com/) we use. +- Don't bump the version yourself. Maintainers will do this when necessary. diff --git a/LICENSE.md b/LICENSE.md index 45c5ff5a0929dc787b8870fa5b15b29f28458840..a3511ade7e117ea00f29df21b4d15a6b9cd7aeb8 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,7 +1,6 @@ -zlib license -============ +# zlib license -Copyright (c) 2011-2015 Calinou and contributors +Copyright (c) 2011-2017 Hugo Locurcio and contributors **This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.** diff --git a/README.md b/README.md index f54dda7b52b8922d0b2efe32dd77a0928424a0aa..bf702fc393bb5d896df7077072375dfc937129d0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ -More Ores -========= +# More Ores -More Ores for Minetest <http://minetest.net>, a free/libre infinite +More Ores for [Minetest](http://minetest.net), a free and open source infinite world block sandbox game. To install, just clone this repository into your "mods" directory. diff --git a/_config.txt b/_config.txt index e716b2e5b16ca4da9e5744fe0fc9693c399b0db4..42e7b3752e9d24d2df8674b3e7477f6ad7e7ac03 100644 --- a/_config.txt +++ b/_config.txt @@ -7,21 +7,21 @@ ------------------------------------------------------------------------------ -- Chunk sizes for ore generation (bigger = ore deposits are more scattered around) -moreores_tin_chunk_size = 7 -moreores_silver_chunk_size = 11 -moreores_mithril_chunk_size = 11 +moreores.tin_chunk_size = 7 +moreores.silver_chunk_size = 11 +moreores.mithril_chunk_size = 11 -- Amount of ore per chunk (higher = bigger ore deposits) -moreores_tin_ore_per_chunk = 3 -moreores_silver_ore_per_chunk = 4 -moreores_mithril_ore_per_chunk = 1 +moreores.tin_ore_per_chunk = 3 +moreores.silver_ore_per_chunk = 4 +moreores.mithril_ore_per_chunk = 1 -- Minimal depths of ore generation (Y coordinate, 0 being sea level by default) -moreores_tin_min_depth = -31000 -moreores_silver_min_depth = -31000 -moreores_mithril_min_depth = -31000 +moreores.tin_min_depth = -31000 +moreores.silver_min_depth = -31000 +moreores.mithril_min_depth = -31000 -- Maximal depths of ore generation (Y coordinate, 0 being sea level by default) -moreores_tin_max_depth = 8 -moreores_silver_max_depth = -2 -moreores_mithril_max_depth = -512 +moreores.tin_max_depth = 8 +moreores.silver_max_depth = -2 +moreores.mithril_max_depth = -512 diff --git a/init.lua b/init.lua index 4c7bd31c99a8e24098171e229c2b6a349e8f2026..2135472ce31349130dd4cc0965f23bb321dbc64a 100644 --- a/init.lua +++ b/init.lua @@ -3,11 +3,18 @@ ** More Ores ** By Calinou, with the help of Nore. -Copyright (c) 2011-2015 Calinou and contributors. +Copyright (c) 2011-2017 Hugo Locurcio and contributors. Licensed under the zlib license. See LICENSE.md for more information. ===================================================================== --]] +moreores = {} + +local default_tin = false +if minetest.registered_items["default:tin_ingot"] then + default_tin = true +end + local S if minetest.get_modpath("intllib") then S = intllib.Getter() @@ -28,6 +35,7 @@ end -- ================= local default_stone_sounds = default.node_sound_stone_defaults() +local default_metal_sounds = default.node_sound_metal_defaults() local function hoe_on_use(itemstack, user, pointed_thing, uses) local pt = pointed_thing @@ -110,7 +118,7 @@ local function add_ore(modname, description, mineral_name, oredef) description = S("%s Block"):format(S(description)), tiles = { img_base .. "_block.png" }, groups = {snappy = 1, bendy = 2, cracky = 1, melty = 2, level= 2}, - sounds = default_stone_sounds + sounds = default_metal_sounds, }) minetest.register_alias(mineral_name.."_block", block_item) if oredef.makes.ingot then @@ -177,7 +185,8 @@ local function add_ore(modname, description, mineral_name, oredef) tool_capabilities = { max_drop_level = 3, groupcaps = tooldef - } + }, + sound = {breaks = "default_tool_breaks"}, } if tool_name == "sword" then @@ -202,6 +211,7 @@ local function add_ore(modname, description, mineral_name, oredef) tdef.full_punch_interval = oredef.full_punch_interval tdef.tool_capabilities.damage_groups = oredef.damage_groups tdef.description = S("%s Shovel"):format(S(description)) + tdef.wield_image = toolimg_base .. tool_name .. ".png^[transformR90" end if tool_name == "hoe" then @@ -232,11 +242,11 @@ local oredefs = { silver = { description = "Silver", makes = {ore = true, block = true, lump = true, ingot = true, chest = true}, - oredef = {clust_scarcity = moreores_silver_chunk_size * moreores_silver_chunk_size * moreores_silver_chunk_size, - clust_num_ores = moreores_silver_ore_per_chunk, - clust_size = moreores_silver_chunk_size, - y_min = moreores_silver_min_depth, - y_max = moreores_silver_max_depth + oredef = {clust_scarcity = moreores.silver_chunk_size * moreores.silver_chunk_size * moreores.silver_chunk_size, + clust_num_ores = moreores.silver_ore_per_chunk, + clust_size = moreores.silver_chunk_size, + y_min = moreores.silver_min_depth, + y_max = moreores.silver_max_depth }, tools = { pick = { @@ -261,29 +271,17 @@ local oredefs = { full_punch_interval = 1.0, damage_groups = {fleshy = 6}, }, - tin = { - description = "Tin", - makes = {ore = true, block = true, lump = true, ingot = true, chest = false}, - oredef = {clust_scarcity = moreores_tin_chunk_size * moreores_tin_chunk_size * moreores_tin_chunk_size, - clust_num_ores = moreores_tin_ore_per_chunk, - clust_size = moreores_tin_chunk_size, - y_min = moreores_tin_min_depth, - y_max = moreores_tin_max_depth - }, - tools = {}, - }, mithril = { description = "Mithril", makes = {ore = true, block = true, lump = true, ingot = true, chest = false}, - oredef = {clust_scarcity = moreores_mithril_chunk_size * moreores_mithril_chunk_size * moreores_mithril_chunk_size, - clust_num_ores = moreores_mithril_ore_per_chunk, - clust_size = moreores_mithril_chunk_size, - y_min = moreores_mithril_min_depth, - y_max = moreores_mithril_max_depth + oredef = {clust_scarcity = moreores.mithril_chunk_size * moreores.mithril_chunk_size * moreores.mithril_chunk_size, + clust_num_ores = moreores.mithril_ore_per_chunk, + clust_size = moreores.mithril_chunk_size, + y_min = moreores.mithril_min_depth, + y_max = moreores.mithril_max_depth }, tools = { pick = { - -- cracky = {times = {[1] = 2.25, [2] = 0.55, [3] = 0.35}, uses = 300, maxlevel= 2} cracky = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=300, maxlevel=3} }, hoe = { @@ -307,6 +305,20 @@ local oredefs = { } } +if not default_tin then + oredefs.tin = { + description = "Tin", + makes = {ore = true, block = true, lump = true, ingot = true, chest = false}, + oredef = {clust_scarcity = moreores.tin_chunk_size * moreores.tin_chunk_size * moreores.tin_chunk_size, + clust_num_ores = moreores.tin_ore_per_chunk, + clust_size = moreores.tin_chunk_size, + y_min = moreores.tin_min_depth, + y_max = moreores.tin_max_depth + }, + tools = {}, + } +end + for orename,def in pairs(oredefs) do add_ore(modname, def.description, orename, def) end @@ -321,16 +333,23 @@ minetest.register_craft({ } }) --- Bronze has some special cases, because it is made from copper and tin: -minetest.register_craft( { - type = "shapeless", - output = "default:bronze_ingot 3", - recipe = { - "moreores:tin_ingot", - "default:copper_ingot", - "default:copper_ingot", - } -}) +if default_tin then + minetest.register_alias("moreores:mineral_tin", "default:stone_with_tin") + minetest.register_alias("moreores:tin_lump", "default:tin_lump") + minetest.register_alias("moreores:tin_ingot", "default:tin_ingot") + minetest.register_alias("moreores:tin_block", "default:tinblock") +else + -- Bronze has some special cases, because it is made from copper and tin: + minetest.register_craft( { + type = "shapeless", + output = "default:bronze_ingot 3", + recipe = { + "moreores:tin_ingot", + "default:copper_ingot", + "default:copper_ingot", + } + }) +end -- Unique node: minetest.register_node("moreores:copper_rail", { @@ -346,6 +365,7 @@ minetest.register_node("moreores:copper_rail", { type = "fixed", fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, }, + sounds = default_metal_sounds, groups = {bendy = 2,snappy = 1,dig_immediate = 2,rail= 1, connect_to_raillike = 1}, mesecons = { effector = { @@ -361,6 +381,6 @@ minetest.register_node("moreores:copper_rail", { }) -if minetest.setting_getbool("log_mods") then +if minetest.settings:get_bool("log_mods") then minetest.log("action", S("[moreores] loaded.")) end diff --git a/locale/pt_br.txt b/locale/pt_br.txt new file mode 100644 index 0000000000000000000000000000000000000000..ab84eebc5a7181150598dbaaf1cbb8bd90e73925 --- /dev/null +++ b/locale/pt_br.txt @@ -0,0 +1,21 @@ +# Translation by github.com/caiorrs + +[moreores] loaded. = [moreores] carregado. + +%s Ore = Minério de %s +%s Lump = Pepita de %s +%s Ingot = Lingote de %s +%s Block = Bloco de %s +%s Pickaxe = Picareta de %s +%s Shovel = Pá de %s +%s Axe = Machado de %s +%s Sword = Espada de %s + +Copper = Cobre +Tin = Estanho +Bronze = Bronze +Silver = Prata +Gold = Ouro +Mithril = Mitrilo + +Copper Rail = Trilho de Cobre diff --git a/mg.lua b/mg.lua index e323b7471e923bc20d01f3958f09d4214ff93208..6551ae5d36dd1b1ad74559021fa47eb55d9f8176 100644 --- a/mg.lua +++ b/mg.lua @@ -1,24 +1,26 @@ --[[ More Ores: `mg` mod support -Copyright (c) 2011-2015 Calinou and contributors. +Copyright (c) 2011-2017 Hugo Locurcio and contributors. Licensed under the zlib license. See LICENSE.md for more information. --]] -mg.register_ore({ - name = "moreores:mineral_tin", - wherein = "default:stone", - seeddiff = 8, - maxvdistance = 10.5, - maxheight = 8, - seglenghtn = 15, - seglenghtdev = 6, - segincln = 0, - segincldev = 0.6, - turnangle = 57, - forkturnangle = 57, - numperblock = 2 -}) +if not minetest.registered_items["default:tin_ingot"] then + mg.register_ore({ + name = "moreores:mineral_tin", + wherein = "default:stone", + seeddiff = 8, + maxvdistance = 10.5, + maxheight = 8, + seglenghtn = 15, + seglenghtdev = 6, + segincln = 0, + segincldev = 0.6, + turnangle = 57, + forkturnangle = 57, + numperblock = 2 + }) +end mg.register_ore({ name = "moreores:mineral_silver", diff --git a/textures/moreores_copper_rail_t_junction.png b/textures/moreores_copper_rail_t_junction.png index aac298135dac69a787185d72f4499364447d8bbc..1e1feaaf6aebd7839b799199b9961e139d8f5366 100644 Binary files a/textures/moreores_copper_rail_t_junction.png and b/textures/moreores_copper_rail_t_junction.png differ