10 Commits

Author SHA1 Message Date
c37ba9dc56 Merge branch 'master' into nalc-1.2 2019-06-02 19:13:10 +02:00
d0a1798b0b Use carts mod functions to register copper rails
This makes them behave similarly to default rails.
2019-05-22 11:32:17 +02:00
336d16373e Supprime la dépendance de farming devenue obsolète et problématique
- Moreores est devenue une dépendance de farming afin de définir les
  hoes en argent et mythril. Les hoes définies par moreores sont donc
  devenues redondantes. De plus, cela a créé une dépendance circulaire
  entre les mods farming -> toolranks -> moreores -> farming
2019-05-10 10:16:44 +02:00
564cb11ba6 Add description and dependencies to mod.conf
The legacy `depends.txt` and `description.txt` files are no longer
needed since Minetest 5.0.0 or later will read everything from
`mod.conf`.

This raises the minimum supported Minetest version to 5.0.0.
2019-04-23 21:54:14 +02:00
34d096832c Remove the optional mod loading message 2019-04-03 00:19:05 +02:00
8cd2d3de89 Travis CI: Add Luacheck to the PATH 2019-04-01 11:46:29 +02:00
cea44dce57 Use Luacheck as a pre-commit hook 2019-04-01 11:02:31 +02:00
1075b4678f Update the changelog for the new Polish translation 2019-04-01 11:01:32 +02:00
ead1f1d82d Polish translation (#32) 2019-04-01 10:59:22 +02:00
7ed6ffe7a7 Add intllib as an optional dependency
This addresses #9.
2019-03-30 00:56:06 +01:00
8 changed files with 61 additions and 71 deletions

View File

@ -7,3 +7,8 @@ repos:
- id: mixed-line-ending
args: [--fix=lf]
- repo: https://github.com/Calinou/pre-commit-luacheck
rev: v1.0.0
hooks:
- id: luacheck

View File

@ -11,5 +11,6 @@ install:
- luarocks install --local luacheck
script:
# All linters are run with pre-commit hooks
- export PATH="$HOME/.luarocks/bin:$PATH"
- $HOME/.local/bin/pre-commit run --all-files
- $HOME/.luarocks/bin/luacheck .

View File

@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
### Added
- Polish translation.
### Changed
- The minimum supported Minetest version is now 5.0.0.
- Copper rails are now registered using functions from the `carts` mod,
making them interoperate seamlessly with default rails.
- Copper rails can no longer be placed in the air.
## [1.1.0] - 2019-03-23
### Added

View File

@ -1,3 +0,0 @@
default
mg?
farming?

View File

@ -1 +0,0 @@
Adds new Ore types.

View File

@ -195,25 +195,13 @@ local function add_ore(modname, description, mineral_name, oredef)
local fulltool_name = tool_base .. tool_name .. tool_post
if tool_name == "hoe" and minetest.get_modpath("farming") then
tdef.max_uses = tooldef.uses
tdef.description = S("%s Hoe"):format(S(description))
farming.register_hoe(fulltool_name, tdef)
end
minetest.register_tool(fulltool_name, tdef)
-- Hoe registration is handled above.
-- There are no crafting recipes for hoes, as they have been
-- deprecated from Minetest Game:
-- https://github.com/minetest/minetest_game/commit/9c459e77a
if tool_name ~= "hoe" then
minetest.register_tool(fulltool_name, tdef)
if oredef.makes.ingot then
minetest.register_craft({
output = fulltool_name,
recipe = get_recipe(ingot, tool_name)
})
end
if oredef.makes.ingot then
minetest.register_craft({
output = fulltool_name,
recipe = get_recipe(ingot, tool_name)
})
end
minetest.register_alias(tool_name .. tool_post, fulltool_name)
@ -235,9 +223,6 @@ local oredefs = {
pick = {
cracky = {times = {[1] = 2.60, [2] = 1.00, [3] = 0.60}, uses = 100, maxlevel = 1},
},
hoe = {
uses = 300,
},
shovel = {
crumbly = {times = {[1] = 1.10, [2] = 0.40, [3] = 0.25}, uses = 100, maxlevel = 1},
},
@ -268,9 +253,6 @@ local oredefs = {
pick = {
cracky = {times = {[1] = 2.25, [2] = 0.55, [3] = 0.35}, uses = 200, maxlevel = 2}
},
hoe = {
uses = 1000,
},
shovel = {
crumbly = {times = {[1] = 0.70, [2] = 0.35, [3] = 0.20}, uses = 200, maxlevel = 2},
},
@ -329,45 +311,20 @@ else
end
-- Copper rail (unique node)
minetest.register_node("moreores:copper_rail", {
description = S("Copper Rail"),
drawtype = "raillike",
tiles = {
"moreores_copper_rail.png",
"moreores_copper_rail_curved.png",
"moreores_copper_rail_t_junction.png",
"moreores_copper_rail_crossing.png",
},
inventory_image = "moreores_copper_rail.png",
wield_image = "moreores_copper_rail.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
selection_box = {
type = "fixed",
fixed = {
-1/2,
-1/2,
-1/2,
1/2,
-1/2 + 1/16,
1/2,
if minetest.get_modpath("carts") then
carts:register_rail("moreores:copper_rail", {
description = S("Copper Rail"),
tiles = {
"moreores_copper_rail.png",
"moreores_copper_rail_curved.png",
"moreores_copper_rail_t_junction.png",
"moreores_copper_rail_crossing.png",
},
},
sounds = default_metal_sounds,
groups = {bendy = 2, snappy = 1, dig_immediate = 2, rail = 1, connect_to_raillike = 1},
mesecons = {
effector = {
action_on = function(pos, node)
minetest.get_meta(pos):set_string("cart_acceleration", "0.5")
end,
action_off = function(pos, node)
minetest.get_meta(pos):set_string("cart_acceleration", "0")
end,
},
},
})
inventory_image = "moreores_copper_rail.png",
wield_image = "moreores_copper_rail.png",
groups = carts:get_rail_groups(),
}, {})
end
minetest.register_craft({
output = "moreores:copper_rail 24",
@ -382,7 +339,3 @@ for orename, def in pairs(oredefs) do
-- Register everything
add_ore("moreores", def.description, orename, def)
end
if minetest.settings:get_bool("log_mods") then
minetest.log("action", S("[moreores] loaded."))
end

21
locale/pl.txt Normal file
View File

@ -0,0 +1,21 @@
# Translation by mat9117
[moreores] loaded. = [moreores] załadowano.
%s Ore = %Ruda
%s Lump = %Bryłka
%s Ingot = %Sztabka
%s Block = %sBlok
%s Pickaxe = %sKilof
%s Shovel = %sŁopatka
%s Axe = %sSiekiera
%s Sword = %sMiecz
Copper = Miedź
Tin = Cyna
Bronze = Brąz
Silver = Srebro
Gold = Złoto
Mithril = Mithril
Copper Rail = Miedziany tor

View File

@ -1 +1,4 @@
name = moreores
description = Adds new ore types.
depends = default
optional_depends = carts,farming,intllib,mg