summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--areas/.luacheckrc15
-rw-r--r--areas/api.lua19
-rw-r--r--areas/api.md5
-rw-r--r--areas/hud.lua12
-rw-r--r--areas/internal.lua34
-rw-r--r--areas/pos.lua12
-rw-r--r--areas/settings.lua2
-rw-r--r--farming/README.md4
-rw-r--r--farming/hoes.lua26
-rw-r--r--moreblocks/CHANGELOG.md4
-rw-r--r--moreblocks/locale/pl.po289
-rw-r--r--moreores/.pre-commit-config.yaml5
-rw-r--r--moreores/.travis.yml3
-rw-r--r--moreores/CHANGELOG.md4
-rw-r--r--moreores/locale/pl.txt21
15 files changed, 441 insertions, 14 deletions
diff --git a/areas/.luacheckrc b/areas/.luacheckrc
new file mode 100644
index 0000000..15eed66
--- /dev/null
+++ b/areas/.luacheckrc
@@ -0,0 +1,15 @@
+unused_args = false
+allow_defined_top = true
+
+read_globals = {
+ "DIR_DELIM",
+ "minetest", "core",
+ "dump",
+ "vector", "nodeupdate",
+ "VoxelManip", "VoxelArea",
+ "PseudoRandom", "ItemStack",
+ "intllib",
+ "default",
+ table = { fields = { "copy", "getn" } }
+}
+
diff --git a/areas/api.lua b/areas/api.lua
index 730e96d..8103b84 100644
--- a/areas/api.lua
+++ b/areas/api.lua
@@ -1,5 +1,23 @@
local hudHandlers = {}
+
+areas.registered_on_adds = {}
+areas.registered_on_removes = {}
+areas.registered_on_moves = {}
+
+function areas:registerOnAdd(func)
+ table.insert(areas.registered_on_adds, func)
+end
+
+function areas:registerOnRemove(func)
+ table.insert(areas.registered_on_removes, func)
+end
+
+function areas:registerOnMove(func)
+ table.insert(areas.registered_on_moves, func)
+end
+
+
--- Adds a function as a HUD handler, it will be able to add items to the Areas HUD element.
function areas:registerHudHandler(handler)
table.insert(hudHandlers, handler)
@@ -141,4 +159,3 @@ function areas:canInteractInArea(pos1, pos2, name, allow_open)
-- intersecting areas and they are all owned by the player.
return true
end
-
diff --git a/areas/api.md b/areas/api.md
index c74b4c7..e243a8a 100644
--- a/areas/api.md
+++ b/areas/api.md
@@ -4,7 +4,10 @@ Areas mod API
API list
---
- * `areas.registerHudHandler(handler)` - Registers a handler to add items to the Areas HUD. See [HUD](#hud).
+ * `areas:registerHudHandler(handler)` - Registers a handler to add items to the Areas HUD. See [HUD](#hud).
+ * `areas:registerOnAdd(func(id, area))`
+ * `areas:registerOnRemove(func(id))`
+ * `areas:registerOnMove(func(id, area, pos1, pos2))`
HUD
diff --git a/areas/hud.lua b/areas/hud.lua
index 0b7931f..b29152d 100644
--- a/areas/hud.lua
+++ b/areas/hud.lua
@@ -1,11 +1,23 @@
-- This is inspired by the landrush mod by Bremaweb
areas.hud = {}
+areas.hud.refresh = 0
minetest.register_globalstep(function(dtime)
+
+ areas.hud.refresh = areas.hud.refresh + dtime
+ if areas.hud.refresh > areas.config["tick"] then
+ areas.hud.refresh = 0
+ else
+ return
+ end
+
for _, player in pairs(minetest.get_connected_players()) do
local name = player:get_player_name()
local pos = vector.round(player:getpos())
+ pos = vector.apply(pos, function(p)
+ return math.max(math.min(p, 2147483), -2147483)
+ end)
local areaStrings = {}
for id, area in pairs(areas:getAreasAtPos(pos)) do
diff --git a/areas/internal.lua b/areas/internal.lua
index bf7e92c..27f85ed 100644
--- a/areas/internal.lua
+++ b/areas/internal.lua
@@ -3,6 +3,18 @@ function areas:player_exists(name)
return minetest.get_auth_handler().get_auth(name) ~= nil
end
+local safe_file_write = minetest.safe_file_write
+if safe_file_write == nil then
+ function safe_file_write(path, content)
+ local file, err = io.open(path, "w")
+ if err then
+ return err
+ end
+ file:write(content)
+ file:close()
+ end
+end
+
-- Save the areas table to a file
function areas:save()
local datastr = minetest.serialize(self.areas)
@@ -10,12 +22,7 @@ function areas:save()
minetest.log("error", "[areas] Failed to serialize area data!")
return
end
- local file, err = io.open(self.config.filename, "w")
- if err then
- return err
- end
- file:write(datastr)
- file:close()
+ return safe_file_write(self.config.filename, datastr)
end
-- Load the areas table from the save file
@@ -86,6 +93,11 @@ function areas:add(owner, name, pos1, pos2, parent)
owner = owner,
parent = parent
}
+
+ for i=1, #areas.registered_on_adds do
+ areas.registered_on_adds[i](id, self.areas[id])
+ end
+
-- Add to AreaStore
if self.store then
local sid = self.store:insert_area(pos1, pos2, tostring(id))
@@ -118,6 +130,10 @@ function areas:remove(id, recurse)
end
end
+ for i=1, #areas.registered_on_removes do
+ areas.registered_on_removes[i](id)
+ end
+
-- Remove main entry
self.areas[id] = nil
@@ -133,6 +149,11 @@ function areas:move(id, area, pos1, pos2)
area.pos1 = pos1
area.pos2 = pos2
+
+ for i=1, #areas.registered_on_moves do
+ areas.registered_on_moves[i](id, area, pos1, pos2)
+ end
+
if self.store then
self.store:remove_area(areas.store_ids[id])
local sid = self.store:insert_area(pos1, pos2, tostring(id))
@@ -282,4 +303,3 @@ function areas:isAreaOwner(id, name)
end
return false
end
-
diff --git a/areas/pos.lua b/areas/pos.lua
index 8d3e6fe..e97e4fc 100644
--- a/areas/pos.lua
+++ b/areas/pos.lua
@@ -129,13 +129,21 @@ function areas:getPos(playerName)
return areas:sortPos(pos1, pos2)
end
+local function posLimit(pos)
+ return {
+ x = math.max(math.min(pos.x, 31000), -31000)
+ y = math.max(math.min(pos.y, 31000), -31000)
+ z = math.max(math.min(pos.z, 31000), -31000)
+ }
+end
+
function areas:setPos1(playerName, pos)
- areas.pos1[playerName] = pos
+ areas.pos1[playerName] = posLimit(pos)
areas.markPos1(playerName)
end
function areas:setPos2(playerName, pos)
- areas.pos2[playerName] = pos
+ areas.pos2[playerName] = posLimit(pos)
areas.markPos2(playerName)
end
diff --git a/areas/settings.lua b/areas/settings.lua
index ffb5355..feaa687 100644
--- a/areas/settings.lua
+++ b/areas/settings.lua
@@ -41,3 +41,5 @@ setting("number", "self_protection_max_areas_high", 32)
-- legacy_table (owner_defs) compatibility. Untested and has known issues.
setting("boolean", "legacy_table", false)
+-- configure the refresh delay for the name displays in the HUD
+setting("number", "tick", 0.5)
diff --git a/farming/README.md b/farming/README.md
index 8f3e671..939417d 100644
--- a/farming/README.md
+++ b/farming/README.md
@@ -13,14 +13,14 @@ This mod works by adding your new plant to the {growing=1} group and numbering t
### Changelog:
-- 1.40 - Added Mithril Scythe to quick harvest and replant crops on right-click.
+- 1.40 - Added Mithril Scythe to quick harvest and replant crops on right-click. Added Hoe's for MoreOres with Toolrank support.
- 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. Added Jaffa Cake and multigrain bread.
- 1.38 - Pumpkin grows into block, use chopping board to cut into 4x slices, same with melon block, 2x2 slices makes a block, cocoa pods are no longer walkable
- 1.37 - Added custom 'growth_check(pos, nodename) function for crop nodes to use (check cocoa.lua for example)
- 1.36 - Added Beetroot, Beetroot Soup (6x beetroot, 1x bowl), fix register_plant() issue, add new recipes
- 1.35 - Deprecated bronze/mese/diamond hoe's, added hoe bomb and deprecated hoe's as lucky block prizes
- 1.34 - Added scarecrow Base (5x sticks in a cross shape)
-- 1.33 - Added cooking utensils (wooden bowl, saucepan, cooking pot, baking tray, skillet, cutting board, mortar & pestle, juicer, glass mixing bowl) for easier food crafts.
+- 1.33 - Added cooking utensils (wooden bowl, saucepan, cooking pot, baking tray, skillet, cutting board, mortar & pestle, juicer, glass mixing bowl) for easier food crafts.
- 1.32 - Added Pea plant (textures by Andrey01) - also added Wooden Bowl and Pea Soup crafts
- 1.31 - Added Pineapple which can be found growing in savannah areas (place pineapple in crafting to obtain 5x rings to eat and a top for re-planting), also Salt which is made from cooking a bucket of water, added food groups so it's more compatible with Ruben's food mods.
- 1.30 - Added Garlic, Pepper and Onions thanks to Grizzly Adam for sharing textures
diff --git a/farming/hoes.lua b/farming/hoes.lua
index 430d0f7..ed833e5 100644
--- a/farming/hoes.lua
+++ b/farming/hoes.lua
@@ -469,4 +469,30 @@ if minetest.get_modpath("moreores") then
{"", "", "group:stick"}
}
})
+
+ farming.register_hoe(":moreores:hoe_silver", {
+ description = S("%s Hoe"):format(S("Silver")),
+ inventory_image = "moreores_tool_silverhoe.png",
+ max_uses = 300,
+ material = "moreores:silver_ingot",
+ })
+
+ farming.register_hoe(":moreores:hoe_mithril", {
+ description = S("%s Hoe"):format(S("Mithril")),
+ inventory_image = "moreores_tool_mithrilhoe.png",
+ max_uses = 1000,
+ material = "moreores:mithril_ingot",
+ })
+
+ -- Toolranks support
+ if tr then
+
+ minetest.override_item("moreores:hoe_silver", {
+ original_description = S("%s Hoe"):format(S("Silver")),
+ description = toolranks.create_description("Silver Hoe")})
+
+ minetest.override_item("moreores:hoe_mithril", {
+ original_description = S("%s Hoe"):format(S("Mithril")),
+ description = toolranks.create_description("Mithril Hoe")})
+ end
end
diff --git a/moreblocks/CHANGELOG.md b/moreblocks/CHANGELOG.md
index 0c94859..154f885 100644
--- a/moreblocks/CHANGELOG.md
+++ b/moreblocks/CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
+### Added
+
+- Polish translation.
+
## [1.3.0] - 2019-03-23
### Changed
diff --git a/moreblocks/locale/pl.po b/moreblocks/locale/pl.po
new file mode 100644
index 0000000..237e5eb
--- /dev/null
+++ b/moreblocks/locale/pl.po
@@ -0,0 +1,289 @@
+# Polish translation for More Blocks.
+# Copyright © 2011-2019 Hugo Locurcio and contributors
+# This file is distributed under the same license as the More Blocks package.
+# mat9117, 2019
+# CodeXP <codexp@gmx.net>, 2018.
+msgid ""
+msgstr ""
+"Project-Id-Version: More Blocks\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-07-13 12:37+0200\n"
+"PO-Revision-Date: \n"
+"Last-Translator: CodeXP <codexp@gmx.net>\n"
+"Language-Team: \n"
+"Language: pl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: circular_saw.lua
+msgid "Circular Saw"
+msgstr "Piła tarczowa"
+
+#: circular_saw.lua
+msgid ""
+"Input\n"
+"material"
+msgstr ""
+"wejście\n"
+"materiał"
+
+#: circular_saw.lua
+msgid "Left-over"
+msgstr "Resztki"
+
+#: circular_saw.lua
+msgid "Max"
+msgstr "Maks"
+
+#: circular_saw.lua
+msgid ""
+"Recycle\n"
+"output"
+msgstr ""
+"Przetwarzanie\n"
+"Wyjście"
+
+#: circular_saw.lua
+msgid "Set"
+msgstr "Ustaw"
+
+#: circular_saw.lua
+msgid "owned by @1"
+msgstr "Należy do @1"
+
+#: circular_saw.lua
+msgid "Circular Saw is empty"
+msgstr "Piła tarczowa jest pusta"
+
+#: circular_saw.lua
+msgid "Circular Saw is working on @1"
+msgstr "Piła tarczowa pracuje na @1"
+
+#: init.lua
+msgid "[moreblocks] loaded."
+msgstr "[moreblocks] załadowane."
+
+#: nodes.lua
+msgid "Deprecated"
+msgstr "Przestarzałe"
+
+#: nodes.lua
+msgid "All-faces Acacia Tree"
+msgstr "Wielostronna tekstura akacji"
+
+#: nodes.lua
+msgid "All-faces Aspen Tree"
+msgstr "Wielostronna tekstura osiki"
+
+#: nodes.lua
+msgid "All-faces Jungle Tree"
+msgstr "Wielostronna tekstura drzewa dżunglowego"
+
+#: nodes.lua
+msgid "All-faces Pine Tree"
+msgstr "Wielostronna tekstura sosny"
+
+#: nodes.lua
+msgid "All-faces Tree"
+msgstr "Wielostronna tekstura drzewa"
+
+#: nodes.lua
+msgid "Cactus Brick"
+msgstr "Kaktusowa cegła"
+
+#: nodes.lua
+msgid "Cactus Checker"
+msgstr "Kaktusowa szachownica"
+
+#: nodes.lua
+msgid "Centered Wooden Tile"
+msgstr "Wyśrodkowany drewniany kafelek"
+
+#: nodes.lua
+msgid "Checker Stone Tile"
+msgstr "Kamienna szachownica"
+
+#: nodes.lua
+msgid "Circle Stone Bricks"
+msgstr "Okrągłe kamienne cegły"
+
+#: nodes.lua
+msgid "Clean Glass"
+msgstr "Czyste szkło"
+
+#: nodes.lua
+msgid "Coal Checker"
+msgstr "Węglowa szachownica"
+
+#: nodes.lua
+msgid "Coal Glass"
+msgstr "Szkło węglowe"
+
+#: nodes.lua
+msgid "Coal Stone"
+msgstr "Kamień węglowy"
+
+#: nodes.lua
+msgid "Coal Stone Bricks"
+msgstr "Węglowe kamienne cegły"
+
+#: nodes.lua
+msgid "Compressed Cobblestone"
+msgstr "Skompresowany bruk"
+
+#: nodes.lua
+msgid "Compressed Dirt"
+msgstr "Skompresowana ziemia"
+
+#: nodes.lua
+msgid "Copper Patina Block"
+msgstr "Blok patynowanej miedzi"
+
+#: nodes.lua
+msgid "Empty Shelf"
+msgstr "Pusta półka"
+
+#: nodes.lua
+msgid "Full Wooden Tile"
+msgstr "Pełny drewniany kafelek"
+
+#: nodes.lua
+msgid "Glow Glass"
+msgstr "Świecące szkło"
+
+#: nodes.lua
+msgid "Iron Checker"
+msgstr "Żelazna szachownica"
+
+#: nodes.lua
+msgid "Iron Glass"
+msgstr "Żelazne szkło"
+
+#: nodes.lua
+msgid "Iron Stone"
+msgstr "Żelazny kamień"
+
+#: nodes.lua
+msgid "Iron Stone Bricks"
+msgstr "Żelazne kamienne cegły"
+
+#: nodes.lua
+msgid "Plankstone"
+msgstr "Deskokamień"
+
+#: nodes.lua
+msgid "Rope"
+msgstr "Lina"
+
+#: nodes.lua
+msgid "Split Stone Tile"
+msgstr "Kamienny blok kafelkowy"
+
+#: nodes.lua
+msgid "Stone Bricks"
+msgstr "Kamienne cegły"
+
+#: nodes.lua
+msgid "Stone Tile"
+msgstr "Kamienny kafelek"
+
+#: nodes.lua
+msgid "Super Glow Glass"
+msgstr "Super świecące szkło"
+
+#: nodes.lua
+msgid "Sweeper"
+msgstr "Miotła"
+
+#: nodes.lua
+msgid "Tar"
+msgstr "Smoła"
+
+#: nodes.lua
+msgid "Trap Desert Stone"
+msgstr "Pułapka z pustynnego kamienia"
+
+#: nodes.lua
+msgid "Trap Glass"
+msgstr "Szklana pułapka"
+
+#: nodes.lua
+msgid "Trap Glow Glass"
+msgstr "Pułapka ze świecącego szkłą"
+
+#: nodes.lua
+msgid "Trap Obsidian"
+msgstr "Obsydianowa pułapka"
+
+#: nodes.lua
+msgid "Trap Obsidian Glass"
+msgstr "Pułapka z obsydianowego szkła"
+
+#: nodes.lua
+msgid "Trap Sandstone"
+msgstr "Pułapka z piaskowca"
+
+#: nodes.lua
+msgid "Trap Stone"
+msgstr "Kamienna pułapka"
+
+#: nodes.lua
+msgid "Trap Super Glow Glass"
+msgstr "Pułapka z super świecącego szkła"
+
+#: nodes.lua
+msgid "Wooden Tile"
+msgstr "Drewniany kafelek"
+
+#: nodes.lua
+msgid "Offset Wooden Tile"
+msgstr ""
+
+# @deprecated
+#: nodes.lua
+msgid "Downwards Wooden Tile"
+msgstr "Dolny drewniany kafelek"
+
+# @deprecated
+#: nodes.lua
+msgid "Leftwards Wooden Tile"
+msgstr "Lewy drewniany kafelek"
+
+# @deprecated
+#: nodes.lua
+msgid "Rightwards Wooden Tile"
+msgstr "Prawy drewniany kafelek"
+
+#: ownership.lua
+msgid "Sorry, @1 owns that spot."
+msgstr "Przykro mi, to miejsce należy do @1"
+
+#: ownership.lua
+msgid "someone"
+msgstr "ktoś"
+
+#: stairsplus/common.lua
+#, lua-format
+msgid "%s Microblock"
+msgstr "%s Mikroblok"
+
+#: stairsplus/common.lua stairsplus/slabs.lua
+#, lua-format
+msgid "%s Slab"
+msgstr "%s Płyta"
+
+#: stairsplus/common.lua
+#, lua-format
+msgid "%s Slope"
+msgstr "%s Spad"
+
+#: stairsplus/common.lua
+#, lua-format
+msgid "%s Panel"
+msgstr "%s Panel"
+
+#: stairsplus/common.lua
+#, lua-format
+msgid "%s Stairs"
+msgstr "% Schody"
diff --git a/moreores/.pre-commit-config.yaml b/moreores/.pre-commit-config.yaml
index 9c72498..22f1dbe 100644
--- a/moreores/.pre-commit-config.yaml
+++ b/moreores/.pre-commit-config.yaml
@@ -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
diff --git a/moreores/.travis.yml b/moreores/.travis.yml
index 1c4c0d8..a032acb 100644
--- a/moreores/.travis.yml
+++ b/moreores/.travis.yml
@@ -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 .
diff --git a/moreores/CHANGELOG.md b/moreores/CHANGELOG.md
index eec6244..e386b83 100644
--- a/moreores/CHANGELOG.md
+++ b/moreores/CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
+### Added
+
+- Polish translation.
+
## [1.1.0] - 2019-03-23
### Added
diff --git a/moreores/locale/pl.txt b/moreores/locale/pl.txt
new file mode 100644
index 0000000..fb65804
--- /dev/null
+++ b/moreores/locale/pl.txt
@@ -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