Merge branch 'master' of yunohost.local:minetest-mods/moreores into nalc-1.2-dev
@ -25,7 +25,9 @@ stds.minetest = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
read_globals = {
|
read_globals = {
|
||||||
|
"carts",
|
||||||
"farming",
|
"farming",
|
||||||
|
"frame",
|
||||||
"intllib",
|
"intllib",
|
||||||
"mg",
|
"mg",
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v2.1.0
|
rev: v2.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
|
16
.travis.yml
@ -1,16 +1,16 @@
|
|||||||
language: generic
|
dist: bionic
|
||||||
|
language: python
|
||||||
|
|
||||||
addons:
|
python:
|
||||||
apt:
|
- 3.7.1
|
||||||
packages:
|
|
||||||
- luarocks
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pyenv global 3.6.3
|
- sudo apt-get update -qq
|
||||||
- pip3 install --user pre-commit
|
- sudo apt-get install -qqq luarocks
|
||||||
|
- pip3 install pre-commit
|
||||||
- luarocks install --local luacheck
|
- luarocks install --local luacheck
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# All linters are run with pre-commit hooks
|
# All linters are run with pre-commit hooks
|
||||||
- export PATH="$HOME/.luarocks/bin:$PATH"
|
- export PATH="$HOME/.luarocks/bin:$PATH"
|
||||||
- $HOME/.local/bin/pre-commit run --all-files
|
- pre-commit run --all-files
|
||||||
|
10
CHANGELOG.md
@ -7,13 +7,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [2.0.0] - 2019-11-25
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
- More Ores nodes/items/tools can now be placed in item frames
|
||||||
|
from the [`frame`](https://github.com/minetest-mods/frame) mod.
|
||||||
- Polish translation.
|
- Polish translation.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- The minimum supported Minetest version is now 5.0.0.
|
- 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
|
## [1.1.0] - 2019-03-23
|
||||||
|
|
||||||
@ -44,5 +51,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
|
|
||||||
- Initial versioned release.
|
- Initial versioned release.
|
||||||
|
|
||||||
[Unreleased]: https://github.com/minetest-mods/moreores/compare/v1.1.0...HEAD
|
[Unreleased]: https://github.com/minetest-mods/moreores/compare/v2.0.0...HEAD
|
||||||
|
[2.0.0]: https://github.com/minetest-mods/moreores/compare/v1.1.0...v2.0.0
|
||||||
[1.1.0]: https://github.com/minetest-mods/moreores/compare/v1.0.0...v1.1.0
|
[1.1.0]: https://github.com/minetest-mods/moreores/compare/v1.0.0...v1.1.0
|
||||||
|
@ -60,9 +60,9 @@ on that line.
|
|||||||
|
|
||||||
## Version compatibility
|
## Version compatibility
|
||||||
|
|
||||||
More Ores is currently primarily tested with Minetest 0.4.17.
|
More Ores is currently primarily tested with Minetest 5.1.0.
|
||||||
It may or may not work with newer or older versions. Issues arising in older
|
It may or may not work with newer or older versions. Issues arising in older
|
||||||
versions than 0.4.17 will generally not be fixed.
|
versions than 5.0.0 will generally not be fixed.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
70
init.lua
@ -23,6 +23,9 @@ if minetest.get_modpath("mg") then
|
|||||||
dofile(modpath .. "/mg.lua")
|
dofile(modpath .. "/mg.lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- `frame` support
|
||||||
|
local use_frame = minetest.get_modpath("frame")
|
||||||
|
|
||||||
local default_stone_sounds = default.node_sound_stone_defaults()
|
local default_stone_sounds = default.node_sound_stone_defaults()
|
||||||
local default_metal_sounds = default.node_sound_metal_defaults()
|
local default_metal_sounds = default.node_sound_metal_defaults()
|
||||||
|
|
||||||
@ -89,6 +92,10 @@ local function add_ore(modname, description, mineral_name, oredef)
|
|||||||
sounds = default_stone_sounds,
|
sounds = default_stone_sounds,
|
||||||
drop = lump_item,
|
drop = lump_item,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if use_frame then
|
||||||
|
frame.register(modname .. ":mineral_" .. mineral_name)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if oredef.makes.block then
|
if oredef.makes.block then
|
||||||
@ -112,6 +119,9 @@ local function add_ore(modname, description, mineral_name, oredef)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
if use_frame then
|
||||||
|
frame.register(block_item)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if oredef.makes.lump then
|
if oredef.makes.lump then
|
||||||
@ -127,6 +137,9 @@ local function add_ore(modname, description, mineral_name, oredef)
|
|||||||
recipe = lump_item,
|
recipe = lump_item,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
if use_frame then
|
||||||
|
frame.register(lump_item)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if oredef.makes.ingot then
|
if oredef.makes.ingot then
|
||||||
@ -135,6 +148,9 @@ local function add_ore(modname, description, mineral_name, oredef)
|
|||||||
inventory_image = img_base .. "_ingot.png",
|
inventory_image = img_base .. "_ingot.png",
|
||||||
})
|
})
|
||||||
minetest.register_alias(mineral_name .. "_ingot", ingot)
|
minetest.register_alias(mineral_name .. "_ingot", ingot)
|
||||||
|
if use_frame then
|
||||||
|
frame.register(ingot)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if oredef.makes.chest then
|
if oredef.makes.chest then
|
||||||
@ -205,6 +221,9 @@ local function add_ore(modname, description, mineral_name, oredef)
|
|||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_alias(tool_name .. tool_post, fulltool_name)
|
minetest.register_alias(tool_name .. tool_post, fulltool_name)
|
||||||
|
if use_frame then
|
||||||
|
frame.register(fulltool_name)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -311,45 +330,20 @@ else
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Copper rail (unique node)
|
-- Copper rail (unique node)
|
||||||
minetest.register_node("moreores:copper_rail", {
|
if minetest.get_modpath("carts") then
|
||||||
description = S("Copper Rail"),
|
carts:register_rail("moreores:copper_rail", {
|
||||||
drawtype = "raillike",
|
description = S("Copper Rail"),
|
||||||
tiles = {
|
tiles = {
|
||||||
"moreores_copper_rail.png",
|
"moreores_copper_rail.png",
|
||||||
"moreores_copper_rail_curved.png",
|
"moreores_copper_rail_curved.png",
|
||||||
"moreores_copper_rail_t_junction.png",
|
"moreores_copper_rail_t_junction.png",
|
||||||
"moreores_copper_rail_crossing.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,
|
|
||||||
},
|
},
|
||||||
},
|
inventory_image = "moreores_copper_rail.png",
|
||||||
sounds = default_metal_sounds,
|
wield_image = "moreores_copper_rail.png",
|
||||||
groups = {bendy = 2, snappy = 1, dig_immediate = 2, rail = 1, connect_to_raillike = 1},
|
groups = carts:get_rail_groups(),
|
||||||
mesecons = {
|
}, {})
|
||||||
effector = {
|
end
|
||||||
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,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "moreores:copper_rail 24",
|
output = "moreores:copper_rail 24",
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
[moreores] loaded. = [moreores] załadowano.
|
[moreores] loaded. = [moreores] załadowano.
|
||||||
|
|
||||||
%s Ore = %Ruda
|
%s Ore = %s Ruda
|
||||||
%s Lump = %Bryłka
|
%s Lump = %s Bryłka
|
||||||
%s Ingot = %Sztabka
|
%s Ingot = %s Sztabka
|
||||||
%s Block = %sBlok
|
%s Block = %s Blok
|
||||||
%s Pickaxe = %sKilof
|
%s Pickaxe = %s Kilof
|
||||||
%s Shovel = %sŁopatka
|
%s Shovel = %s Łopatka
|
||||||
%s Axe = %sSiekiera
|
%s Axe = %s Siekiera
|
||||||
%s Sword = %sMiecz
|
%s Sword = %s Miecz
|
||||||
|
|
||||||
Copper = Miedź
|
Copper = Miedź
|
||||||
Tin = Cyna
|
Tin = Cyna
|
||||||
|
2
mod.conf
@ -1,4 +1,4 @@
|
|||||||
name = moreores
|
name = moreores
|
||||||
description = Adds new ore types.
|
description = Adds new ore types.
|
||||||
depends = default
|
depends = default
|
||||||
optional_depends = intllib,mg
|
optional_depends = carts,farming,frame,intllib,mg
|
||||||
|
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 306 B After Width: | Height: | Size: 272 B |
Before Width: | Height: | Size: 141 B After Width: | Height: | Size: 140 B |
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 149 B |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 171 B |
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 213 B |
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 193 B After Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 196 B After Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 200 B After Width: | Height: | Size: 199 B |