summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bee.lua10
-rw-r--r--bunny.lua4
-rw-r--r--chicken.lua12
-rw-r--r--cow.lua12
-rw-r--r--depends.txt1
-rw-r--r--init.lua11
-rw-r--r--kitten.lua4
-rw-r--r--locale/de.txt60
-rw-r--r--locale/template.txt58
-rw-r--r--rat.lua6
-rw-r--r--sheep.lua34
-rw-r--r--warthog.lua8
12 files changed, 182 insertions, 38 deletions
diff --git a/bee.lua b/bee.lua
index ee4e99e..b64cdd1 100644
--- a/bee.lua
+++ b/bee.lua
@@ -1,4 +1,6 @@
+local S = mobs.intllib
+
-- Bee by KrupnoPavel
mobs:register_mob("mobs_animal:bee", {
@@ -41,21 +43,21 @@ mobs:register_mob("mobs_animal:bee", {
mobs:register_spawn("mobs_animal:bee", {"group:flower"}, 20, 10, 9000, 1, 31000, true)
-mobs:register_egg("mobs_animal:bee", "Bee", "mobs_bee_inv.png", 0)
+mobs:register_egg("mobs_animal:bee", S("Bee"), "mobs_bee_inv.png", 0)
-- compatibility
mobs:alias_mob("mobs:bee", "mobs_animal:bee")
-- honey
minetest.register_craftitem(":mobs:honey", {
- description = "Honey",
+ description = S("Honey"),
inventory_image = "mobs_honey_inv.png",
on_use = minetest.item_eat(6),
})
-- beehive (when placed spawns bee)
minetest.register_node(":mobs:beehive", {
- description = "Beehive",
+ description = S("Beehive"),
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"mobs_beehive.png"},
@@ -126,7 +128,7 @@ minetest.register_craft({
-- honey block
minetest.register_node(":mobs:honey_block", {
- description = "Honey Block",
+ description = S("Honey Block"),
tiles = {"mobs_honey_block.png"},
groups = {snappy = 3, flammable = 2},
sounds = default.node_sound_dirt_defaults(),
diff --git a/bunny.lua b/bunny.lua
index d1519a5..ea2ad2f 100644
--- a/bunny.lua
+++ b/bunny.lua
@@ -1,4 +1,6 @@
+local S = mobs.intllib
+
-- Bunny by ExeterDad
mobs:register_mob("mobs_animal:bunny", {
@@ -81,7 +83,7 @@ mobs:register_mob("mobs_animal:bunny", {
mobs:register_spawn("mobs_animal:bunny",
{"default:dirt_with_grass", "ethereal:prairie_dirt"}, 20, 10, 15000, 2, 31000, true)
-mobs:register_egg("mobs_animal:bunny", "Bunny", "mobs_bunny_inv.png", 0)
+mobs:register_egg("mobs_animal:bunny", S("Bunny"), "mobs_bunny_inv.png", 0)
-- compatibility
mobs:alias_mob("mobs:bunny", "mobs_animal:bunny")
diff --git a/chicken.lua b/chicken.lua
index 0d6bab4..0f429ed 100644
--- a/chicken.lua
+++ b/chicken.lua
@@ -1,4 +1,6 @@
+local S = mobs.intllib
+
-- Chicken by JK Murray
mobs:register_mob("mobs_animal:chicken", {
@@ -79,7 +81,7 @@ mobs:register_mob("mobs_animal:chicken", {
mobs:register_spawn("mobs_animal:chicken",
{"default:dirt_with_grass", "ethereal:bamboo_dirt"}, 20, 10, 15000, 1, 31000, true)
-mobs:register_egg("mobs_animal:chicken", "Chicken", "mobs_chicken_inv.png", 0)
+mobs:register_egg("mobs_animal:chicken", S("Chicken"), "mobs_chicken_inv.png", 0)
-- compatibility
mobs:alias_mob("mobs:chicken", "mobs_animal:chicken")
@@ -199,7 +201,7 @@ end
-- egg
minetest.register_node(":mobs:egg", {
- description = "Chicken Egg",
+ description = S("Chicken Egg"),
tiles = {"mobs_chicken_egg.png"},
inventory_image = "mobs_chicken_egg.png",
visual_scale = 0.7,
@@ -224,7 +226,7 @@ minetest.register_node(":mobs:egg", {
-- fried egg
minetest.register_craftitem(":mobs:chicken_egg_fried", {
-description = "Fried Egg",
+description = S("Fried Egg"),
inventory_image = "mobs_chicken_egg_fried.png",
on_use = minetest.item_eat(2),
})
@@ -237,14 +239,14 @@ minetest.register_craft({
-- raw chicken
minetest.register_craftitem(":mobs:chicken_raw", {
-description = "Raw Chicken",
+description = S("Raw Chicken"),
inventory_image = "mobs_chicken_raw.png",
on_use = minetest.item_eat(2),
})
-- cooked chicken
minetest.register_craftitem(":mobs:chicken_cooked", {
-description = "Cooked Chicken",
+description = S("Cooked Chicken"),
inventory_image = "mobs_chicken_cooked.png",
on_use = minetest.item_eat(6),
})
diff --git a/cow.lua b/cow.lua
index 6c43938..72b3e44 100644
--- a/cow.lua
+++ b/cow.lua
@@ -1,4 +1,6 @@
+local S = mobs.intllib
+
-- Cow by Krupnovpavel (additional texture by JurajVajda)
mobs:register_mob("mobs_animal:cow", {
@@ -68,7 +70,7 @@ mobs:register_mob("mobs_animal:cow", {
if self.gotten == true then
minetest.chat_send_player(clicker:get_player_name(),
- "Cow already milked!")
+ S("Cow already milked!"))
return
end
@@ -96,14 +98,14 @@ mobs:register_mob("mobs_animal:cow", {
mobs:register_spawn("mobs_animal:cow",
{"default:dirt_with_grass", "ethereal:green_dirt"}, 20, 10, 15000, 1, 31000, true)
-mobs:register_egg("mobs_animal:cow", "Cow", "default_grass.png", 1)
+mobs:register_egg("mobs_animal:cow", S("Cow"), "default_grass.png", 1)
-- compatibility
mobs:alias_mob("mobs:cow", "mobs_animal:cow")
-- bucket of milk
minetest.register_craftitem(":mobs:bucket_milk", {
- description = "Bucket of Milk",
+ description = S("Bucket of Milk"),
inventory_image = "mobs_bucket_milk.png",
stack_max = 1,
on_use = minetest.item_eat(8, 'bucket:bucket_empty'),
@@ -111,7 +113,7 @@ minetest.register_craftitem(":mobs:bucket_milk", {
-- cheese wedge
minetest.register_craftitem(":mobs:cheese", {
- description = "Cheese",
+ description = S("Cheese"),
inventory_image = "mobs_cheese.png",
on_use = minetest.item_eat(4),
})
@@ -126,7 +128,7 @@ minetest.register_craft({
-- cheese block
minetest.register_node(":mobs:cheeseblock", {
- description = "Cheese Block",
+ description = S("Cheese Block"),
tiles = {"mobs_cheeseblock.png"},
is_ground_content = false,
groups = {crumbly = 3},
diff --git a/depends.txt b/depends.txt
index cc03398..a3172c8 100644
--- a/depends.txt
+++ b/depends.txt
@@ -1,2 +1,3 @@
default
mobs
+intllib?
diff --git a/init.lua b/init.lua
index d8b284a..09a83de 100644
--- a/init.lua
+++ b/init.lua
@@ -1,6 +1,15 @@
local path = minetest.get_modpath("mobs_animal")
+-- Intllib
+local S
+if minetest.get_modpath("intllib") then
+ S = intllib.Getter()
+else
+ S = function(s) return s end
+end
+mobs.intllib = S
+
-- Animals
dofile(path .. "/chicken.lua") -- JKmurray
@@ -12,4 +21,4 @@ dofile(path .. "/bee.lua") -- KrupnoPavel
dofile(path .. "/bunny.lua") -- ExeterDad
dofile(path .. "/kitten.lua") -- Jordach/BFD
-print ("[MOD] Mobs Redo 'Animals' loaded")
+print (S("[MOD] Mobs Redo 'Animals' loaded"))
diff --git a/kitten.lua b/kitten.lua
index 401ffe5..499ce77 100644
--- a/kitten.lua
+++ b/kitten.lua
@@ -1,4 +1,6 @@
+local S = mobs.intllib
+
-- Kitten by Jordach / BFD
mobs:register_mob("mobs_animal:kitten", {
@@ -53,7 +55,7 @@ mobs:register_mob("mobs_animal:kitten", {
mobs:register_spawn("mobs_animal:kitten",
{"default:dirt_with_grass", "ethereal:grove_dirt"}, 20, 12, 22000, 1, 31000, true)
-mobs:register_egg("mobs_animal:kitten", "Kitten", "mobs_kitten_inv.png", 0)
+mobs:register_egg("mobs_animal:kitten", S("Kitten"), "mobs_kitten_inv.png", 0)
-- compatibility
mobs:alias_mob("mobs:kitten", "mobs_animal:kitten")
diff --git a/locale/de.txt b/locale/de.txt
new file mode 100644
index 0000000..185003b
--- /dev/null
+++ b/locale/de.txt
@@ -0,0 +1,60 @@
+# German Translation for mobs_animal mod
+# Deutsche Übersetzung der mobs_animal Mod
+# last update: 2016/June/10
+# Author: Xanthin
+
+#bee.lua
+Bee = Biene
+Honey = Honig
+Beehive = Bienenstock
+Honey Block = Honigblock
+
+#bunny.lua
+Bunny = Häschen
+
+#chicken.lua
+Chicken = Huhn
+Chicken Egg = Hühnerei
+Fried Egg = Spiegelei
+Raw Chicken = Rohes Hühnchen
+Cooked Chicken = Gekochtes Hühnchen
+
+#cow.lua
+Cow already milked! = Kuh ist bereits gemolken!
+Cow = Kuh
+Bucket of Milk = Eimer Milch
+Cheese = Käse
+Cheese Block = Käseblock
+
+#init.lua
+[MOD] Mobs Redo 'Animals' loaded = [MOD] Mobs Redo 'Animals' geladen
+
+#kitten.lua
+Kitten = Kätzchen
+
+#rat.lua
+Rat = Ratte
+Cooked Rat = Gekochte Ratte
+
+#sheep.lua
+Black = Schwarzes
+Blue = Blaues
+Brown = Braunes
+Cyan = Cyan
+Dark Green = Dunkelgrünes
+Dark Grey = Dunkelgraues
+Green = Grünes
+Grey = Graues
+Magenta = Magenta
+Orange = Oranges
+Pink = Pinkes
+Red = Rotes
+Violet = Violettes
+White = Weißes
+Yellow = Gelbes
+Sheep = Schaf
+
+#warthog.lua
+Warthog = Warzenschwein
+Raw Porkchop = Rohes Schweinekotelett
+Cooked Porkchop = Gekochtes Schweinekotelett \ No newline at end of file
diff --git a/locale/template.txt b/locale/template.txt
new file mode 100644
index 0000000..cfe6238
--- /dev/null
+++ b/locale/template.txt
@@ -0,0 +1,58 @@
+# Template for translations of mobs_animal mod
+# last update: 2016/June/10
+
+#bee.lua
+Bee =
+Honey =
+Beehive =
+Honey Block =
+
+#bunny.lua
+Bunny =
+
+#chicken.lua
+Chicken =
+Chicken Egg =
+Fried Egg =
+Raw Chicken =
+Cooked Chicken =
+
+#cow.lua
+Cow already milked! =
+Cow =
+Bucket of Milk =
+Cheese =
+Cheese Block =
+
+#init.lua
+[MOD] Mobs Redo 'Animals' loaded =
+
+#kitten.lua
+Kitten =
+
+#rat.lua
+Rat =
+Cooked Rat =
+
+#sheep.lua
+Black =
+Blue =
+Brown =
+Cyan =
+Dark Green =
+Dark Grey =
+Green =
+Grey =
+Magenta =
+Orange =
+Pink =
+Red =
+Violet =
+White =
+Yellow =
+Sheep =
+
+#warthog.lua
+Warthog =
+Raw Porkchop =
+Cooked Porkchop = \ No newline at end of file
diff --git a/rat.lua b/rat.lua
index 11e4bd8..d76e151 100644
--- a/rat.lua
+++ b/rat.lua
@@ -1,4 +1,6 @@
+local S = mobs.intllib
+
-- Rat by PilzAdam
mobs:register_mob("mobs_animal:rat", {
@@ -57,14 +59,14 @@ mobs:register_mob("mobs_animal:rat", {
mobs:register_spawn("mobs_animal:rat", {"default:stone"}, 20, 5, 15000, 2, 0)
-mobs:register_egg("mobs_animal:rat", "Rat", "mobs_rat_inventory.png", 0)
+mobs:register_egg("mobs_animal:rat", S("Rat"), "mobs_rat_inventory.png", 0)
-- compatibility
mobs:alias_mob("mobs:rat", "mobs_animal:rat")
-- cooked rat, yummy!
minetest.register_craftitem(":mobs:rat_cooked", {
- description = "Cooked Rat",
+ description = S("Cooked Rat"),
inventory_image = "mobs_cooked_rat.png",
on_use = minetest.item_eat(3),
})
diff --git a/sheep.lua b/sheep.lua
index 209d074..37b9157 100644
--- a/sheep.lua
+++ b/sheep.lua
@@ -1,20 +1,22 @@
+local S = mobs.intllib
+
local all_colours = {
- {"black", "Black", "#000000b0"},
- {"blue", "Blue", "#015dbb70"},
- {"brown", "Brown", "#663300a0"},
- {"cyan", "Cyan", "#01ffd870"},
- {"dark_green", "Dark Green", "#005b0770"},
- {"dark_grey", "Dark Grey", "#303030b0"},
- {"green", "Green", "#61ff0170"},
- {"grey", "Grey", "#5b5b5bb0"},
- {"magenta", "Magenta", "#ff05bb70"},
- {"orange", "Orange", "#ff840170"},
- {"pink", "Pink", "#ff65b570"},
- {"red", "Red", "#ff0000a0"},
- {"violet", "Violet", "#2000c970"},
- {"white", "White", "#abababc0"},
- {"yellow", "Yellow", "#e3ff0070"},
+ {"black", S("Black"), "#000000b0"},
+ {"blue", S("Blue"), "#015dbb70"},
+ {"brown", S("Brown"), "#663300a0"},
+ {"cyan", S("Cyan"), "#01ffd870"},
+ {"dark_green", S("Dark Green"), "#005b0770"},
+ {"dark_grey", S("Dark Grey"), "#303030b0"},
+ {"green", S("Green"), "#61ff0170"},
+ {"grey", S("Grey"), "#5b5b5bb0"},
+ {"magenta", S("Magenta"), "#ff05bb70"},
+ {"orange", S("Orange"), "#ff840170"},
+ {"pink", S("Pink"), "#ff65b570"},
+ {"red", S("Red"), "#ff0000a0"},
+ {"violet", S("Violet"), "#2000c970"},
+ {"white", S("White"), "#abababc0"},
+ {"yellow", S("Yellow"), "#e3ff0070"},
}
-- Sheep by PilzAdam, texture converted to minetest by AMMOnym from Summerfield pack
@@ -168,7 +170,7 @@ for _, col in pairs(all_colours) do
end
})
- mobs:register_egg("mobs_animal:sheep_"..col[1], col[2] .. " Sheep", "wool_"..col[1]..".png", 1)
+ mobs:register_egg("mobs_animal:sheep_"..col[1], col[2] .. " " .. S("Sheep"), "wool_"..col[1]..".png", 1)
-- compatibility
mobs:alias_mob("mobs:sheep_" .. col[1], "mobs_animal:sheep_" .. col[1])
diff --git a/warthog.lua b/warthog.lua
index 043cb42..aa62db2 100644
--- a/warthog.lua
+++ b/warthog.lua
@@ -1,4 +1,6 @@
+local S = mobs.intllib
+
-- Warthog by KrupnoPavel
mobs:register_mob("mobs_animal:pumba", {
@@ -56,21 +58,21 @@ mobs:register_mob("mobs_animal:pumba", {
mobs:register_spawn("mobs_animal:pumba",
{"ethereal:mushroom_dirt", "default:dirt_with_dry_grass"}, 20, 10, 15000, 1, 31000, true)
-mobs:register_egg("mobs_animal:pumba", "Warthog", "wool_pink.png", 1)
+mobs:register_egg("mobs_animal:pumba", S("Warthog"), "wool_pink.png", 1)
-- compatibility
mobs:alias_mob("mobs:pumba", "mobs_animal:pumba")
-- raw porkchop
minetest.register_craftitem(":mobs:pork_raw", {
- description = "Raw Porkchop",
+ description = S("Raw Porkchop"),
inventory_image = "mobs_pork_raw.png",
on_use = minetest.item_eat(4),
})
-- cooked porkchop
minetest.register_craftitem(":mobs:pork_cooked", {
- description = "Cooked Porkchop",
+ description = S("Cooked Porkchop"),
inventory_image = "mobs_pork_cooked.png",
on_use = minetest.item_eat(8),
})