mirror of
https://github.com/minetest-mods/moreores.git
synced 2025-07-21 17:20:29 +02:00
Compare commits
10 Commits
v1.1.0
...
c37ba9dc56
Author | SHA1 | Date | |
---|---|---|---|
c37ba9dc56 | |||
d0a1798b0b | |||
336d16373e | |||
564cb11ba6 | |||
34d096832c | |||
8cd2d3de89 | |||
cea44dce57 | |||
1075b4678f | |||
ead1f1d82d | |||
7ed6ffe7a7 |
@ -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
|
||||
|
@ -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 .
|
||||
|
11
CHANGELOG.md
11
CHANGELOG.md
@ -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
|
||||
|
@ -1,3 +0,0 @@
|
||||
default
|
||||
mg?
|
||||
farming?
|
@ -1 +0,0 @@
|
||||
Adds new Ore types.
|
85
init.lua
85
init.lua
@ -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
21
locale/pl.txt
Normal 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
|
Reference in New Issue
Block a user