diff --git a/mods/fishing/bobber.lua b/mods/fishing/bobber.lua old mode 100755 new mode 100644 index 5600c58b..31f3e388 --- a/mods/fishing/bobber.lua +++ b/mods/fishing/bobber.lua @@ -5,6 +5,15 @@ -- Supports: 3d_armor, animal_clownfish, animal_fish_blue_white, animal_rat, flowers_plus, mobs, seaplants ----------------------------------------------------------------------------------------------- +-- Boilerplate to support localized strings if intllib mod is installed. +local S +if (minetest.get_modpath("intllib")) then + dofile(minetest.get_modpath("intllib").."/intllib.lua") + S = intllib.Getter(minetest.get_current_modname()) +else + S = function ( s ) return s end +end + local PoLeWeaR = (65535/(30-(math.random(15, 29)))) local BooTSWear = (2000*(math.random(20, 29))) -- Here's what you can catch @@ -98,11 +107,11 @@ local FISHING_BOBBER_ENTITY={ on_punch = function (self, puncher, time_from_last_punch, tool_capabilities, dir) local player = puncher:get_player_name() local inv = puncher:get_inventory() - if MESSAGES == true then minetest.chat_send_player(player, "You didn't catch anything.", false) end -- fish escaped + if MESSAGES == true then minetest.chat_send_player(player, S("You didn't catch anything."), false) end -- fish escaped if not minetest.setting_getbool("creative_mode") then if inv:room_for_item("main", {name="fishing:bait_worm", count=1, wear=0, metadata=""}) then inv:add_item("main", {name="fishing:bait_worm", count=1, wear=0, metadata=""}) - if MESSAGES == true then minetest.chat_send_player(player, "The bait is still there.", false) end -- bait still there + if MESSAGES == true then minetest.chat_send_player(player, S("The bait is still there."), false) end -- bait still there end end -- make sound and remove bobber @@ -130,12 +139,12 @@ local FISHING_BOBBER_ENTITY={ minetest.add_node({x=pos.x, y=pos.y, z=pos.z}, {name="air"}) if inv:room_for_item("main", {name=DRoP, count=1, wear=0, metadata=""}) then inv:add_item("main", {name=DRoP, count=1, wear=0, metadata=""}) - if MESSAGES == true then say(player, "You caught "..MeSSaGe, false) end -- caught Plant + if MESSAGES == true then say(player, S("You caught "..MeSSaGe), false) end -- caught Plant end if not minetest.setting_getbool("creative_mode") then if inv:room_for_item("main", {name="fishing:bait_worm", count=1, wear=0, metadata=""}) then inv:add_item("main", {name="fishing:bait_worm", count=1, wear=0, metadata=""}) - if MESSAGES == true then say(player, "The bait is still there.", false) end -- bait still there + if MESSAGES == true then say(player, S("The bait is still there."), false) end -- bait still there end end end @@ -145,7 +154,7 @@ local FISHING_BOBBER_ENTITY={ -- catch visible fish and invisible stuff if self.object:get_hp() <= 300 then if math.random(1, 100) < FISH_CHANCE then - local chance = math.random(1, 122) -- ><((((º> + local chance = math.random(1, 122) -- ><((((º> for i in pairs(CaTCH) do local MoD = CaTCH[i][1] local iTeM = CaTCH[i][2] @@ -164,42 +173,42 @@ local FISHING_BOBBER_ENTITY={ MoD = "animal_fish_blue_white" iTeM = "fish_blue_white" WeaR = 0 - MeSSaGe = "a Blue white fish." + MeSSaGe = S("a Blue white fish.") obj:remove() end end -- add (in)visible fish to inventory if inv:room_for_item("main", {name=MoD..":"..iTeM, count=1, wear=WeaR, metadata=""}) then inv:add_item("main", {name=MoD..":"..iTeM, count=1, wear=WeaR, metadata=""}) - if MESSAGES == true then say(player, "You caught "..MeSSaGe, false) end -- caught somethin' + if MESSAGES == true then say(player, S("You caught "..MeSSaGe), false) end -- caught somethin' end if not minetest.setting_getbool("creative_mode") then if GeTBaiTBack == true then if inv:room_for_item("main", {name="fishing:bait_worm", count=1, wear=0, metadata=""}) then inv:add_item("main", {name="fishing:bait_worm", count=1, wear=0, metadata=""}) - if MESSAGES == true then say(player, "The bait is still there.", false) end -- bait still there? + if MESSAGES == true then say(player, S("The bait is still there."), false) end -- bait still there? end end end else if inv:room_for_item("main", {name="fishing:fish_raw", count=1, wear=0, metadata=""}) then inv:add_item("main", {name="fishing:fish_raw", count=1, wear=0, metadata=""}) - if MESSAGES == true then say(player, "You caught a Fish.", false) end -- caught Fish + if MESSAGES == true then say(player, S("You caught a Fish."), false) end -- caught Fish end end end end else --if math.random(1, 100) > FISH_CHANCE then - if MESSAGES == true then say(player, "Your fish escaped.", false) end -- fish escaped + if MESSAGES == true then say(player, S("Your fish escaped."), false) end -- fish escaped end end if self.object:get_hp() > 300 and minetest.get_node(pos).name == "air" then - if MESSAGES == true then say(player, "You didn't catch anything.", false) end -- fish escaped + if MESSAGES == true then say(player, S("You didn't catch anything."), false) end -- fish escaped if not minetest.setting_getbool("creative_mode") then if math.random(1, 2) == 1 then if inv:room_for_item("main", {name="fishing:bait_worm", count=1, wear=0, metadata=""}) then inv:add_item("main", {name="fishing:bait_worm", count=1, wear=0, metadata=""}) - if MESSAGES == true then say(player, "The bait is still there.", false) end -- bait still there + if MESSAGES == true then say(player, S("The bait is still there."), false) end -- bait still there end end end @@ -307,4 +316,4 @@ local FISHING_BOBBER_ENTITY={ end, } -minetest.register_entity("fishing:bobber_entity", FISHING_BOBBER_ENTITY) \ No newline at end of file +minetest.register_entity("fishing:bobber_entity", FISHING_BOBBER_ENTITY) diff --git a/mods/fishing/bobber_shark.lua b/mods/fishing/bobber_shark.lua old mode 100755 new mode 100644 index 858f5327..ede4de25 --- a/mods/fishing/bobber_shark.lua +++ b/mods/fishing/bobber_shark.lua @@ -3,6 +3,15 @@ -- License (code & textures): WTFPL ----------------------------------------------------------------------------------------------- +-- Boilerplate to support localized strings if intllib mod is installed. +local S +if (minetest.get_modpath("intllib")) then + dofile(minetest.get_modpath("intllib").."/intllib.lua") + S = intllib.Getter(minetest.get_current_modname()) +else + S = function ( s ) return s end +end + -- Here's what you can catch if you use a fish as bait local CaTCH_BiG = { -- MoD iTeM WeaR MeSSaGe ("You caught "..) GeTBaiTBack NRMiN CHaNCe (../120) @@ -54,7 +63,7 @@ local FISHING_BOBBER_ENTITY_SHARK={ -- DESTROY BOBBER WHEN PUNCHING IT on_punch = function (self, puncher, time_from_last_punch, tool_capabilities, dir) local player = puncher:get_player_name() - if MESSAGES == true then minetest.chat_send_player(player, "Your fish escaped.", false) end -- fish escaped + if MESSAGES == true then minetest.chat_send_player(player, S("Your fish escaped."), false) end -- fish escaped minetest.sound_play("fishing_bobber1", { pos = self.object:getpos(), gain = 0.5, @@ -79,12 +88,12 @@ local FISHING_BOBBER_ENTITY_SHARK={ minetest.add_node({x=pos.x, y=pos.y, z=pos.z}, {name="air"}) if inv:room_for_item("main", {name=DRoP, count=1, wear=0, metadata=""}) then inv:add_item("main", {name=DRoP, count=1, wear=0, metadata=""}) - if MESSAGES == true then say(player, "You caught "..MeSSaGe, false) end -- caught Plant + if MESSAGES == true then say(player, S("You caught "..MeSSaGe), false) end -- caught Plant end if not minetest.setting_getbool("creative_mode") then if inv:room_for_item("main", {name="fishing:fish_raw", count=1, wear=0, metadata=""}) then inv:add_item("main", {name="fishing:bait_worm", count=1, wear=0, metadata=""}) - if MESSAGES == true then say(player, "The bait is still there.", false) end -- bait still there + if MESSAGES == true then say(player, S("The bait is still there."), false) end -- bait still there end end end @@ -93,7 +102,7 @@ local FISHING_BOBBER_ENTITY_SHARK={ --elseif minetest.get_node(pos).name == "air" then if self.object:get_hp() <= 300 then if math.random(1, 100) < SHARK_CHANCE then - local chance = math.random(1, 5) -- ><((((º> + local chance = math.random(1, 5) -- ><((((º> for i in pairs(CaTCH_BiG) do local MoD = CaTCH_BiG[i][1] local iTeM = CaTCH_BiG[i][2] @@ -107,13 +116,13 @@ local FISHING_BOBBER_ENTITY_SHARK={ if minetest.get_modpath(MoD) ~= nil then if inv:room_for_item("main", {name=MoD..":"..iTeM, count=1, wear=WeaR, metadata=""}) then inv:add_item("main", {name=MoD..":"..iTeM, count=1, wear=WeaR, metadata=""}) - if MESSAGES == true then say(player, "You caught "..MeSSaGe, false) end -- caught somethin' + if MESSAGES == true then say(player, S("You caught "..MeSSaGe), false) end -- caught somethin' end if not minetest.setting_getbool("creative_mode") then if GeTBaiTBack == true then if inv:room_for_item("main", {name="fishing:fish_raw", count=1, wear=0, metadata=""}) then inv:add_item("main", {name="fishing:fish_raw", count=1, wear=0, metadata=""}) - if MESSAGES == true then say(player, "The bait is still there.", false) end -- bait still there? + if MESSAGES == true then say(player, S("The bait is still there."), false) end -- bait still there? end end end @@ -121,23 +130,23 @@ local FISHING_BOBBER_ENTITY_SHARK={ end end else --if math.random(1, 100) > FISH_CHANCE then - if MESSAGES == true then say(player, "Your fish escaped.", false) end -- fish escaped + if MESSAGES == true then say(player, S("Your fish escaped."), false) end -- fish escaped end end if self.object:get_hp() > 300 and minetest.get_node(pos).name == "air" then - if MESSAGES == true then say(player, "You didn't catch any fish.", false) end -- fish escaped + if MESSAGES == true then say(player, S("You didn't catch any fish."), false) end -- fish escaped if not minetest.setting_getbool("creative_mode") then if math.random(1, 3) == 1 then if inv:room_for_item("main", {name="fishing:fish_raw", count=1, wear=0, metadata=""}) then inv:add_item("main", {name="fishing:fish_raw", count=1, wear=0, metadata=""}) - if MESSAGES == true then say(player, "The bait is still there.", false) end -- bait still there + if MESSAGES == true then say(player, S("The bait is still there."), false) end -- bait still there end end end end --end else - if MESSAGES == true then say(player, "Your fish escaped.", false) end -- fish escaped + if MESSAGES == true then say(player, S("Your fish escaped."), false) end -- fish escaped end minetest.sound_play("fishing_bobber1", { pos = self.object:getpos(), @@ -220,4 +229,4 @@ local FISHING_BOBBER_ENTITY_SHARK={ end, } -minetest.register_entity("fishing:bobber_entity_shark", FISHING_BOBBER_ENTITY_SHARK) \ No newline at end of file +minetest.register_entity("fishing:bobber_entity_shark", FISHING_BOBBER_ENTITY_SHARK) diff --git a/mods/fishing/crafting.lua b/mods/fishing/crafting.lua old mode 100755 new mode 100644 diff --git a/mods/fishing/depends.txt b/mods/fishing/depends.txt old mode 100755 new mode 100644 diff --git a/mods/fishing/fishes.lua b/mods/fishing/fishes.lua old mode 100755 new mode 100644 index 1290e1c2..5faca951 --- a/mods/fishing/fishes.lua +++ b/mods/fishing/fishes.lua @@ -3,11 +3,20 @@ -- License (code & textures): WTFPL ----------------------------------------------------------------------------------------------- +-- Boilerplate to support localized strings if intllib mod is installed. +local S +if (minetest.get_modpath("intllib")) then + dofile(minetest.get_modpath("intllib").."/intllib.lua") + S = intllib.Getter(minetest.get_current_modname()) +else + S = function ( s ) return s end +end + ----------------------------------------------------------------------------------------------- -- Fish ----------------------------------------------------------------------------------------------- minetest.register_craftitem("fishing:fish_raw", { - description = "Fish", + description = S("Fish"), groups = {}, inventory_image = "fishing_fish.png", on_use = minetest.item_eat(2), @@ -16,7 +25,7 @@ minetest.register_craftitem("fishing:fish_raw", { -- Roasted Fish ----------------------------------------------------- minetest.register_craftitem("fishing:fish", { - description = "Roasted Fish", + description = S("Roasted Fish"), groups = {}, inventory_image = "fishing_fish_cooked.png", on_use = minetest.item_eat(4), @@ -25,7 +34,7 @@ minetest.register_craftitem("fishing:fish_raw", { -- Sushi ----------------------------------------------------- minetest.register_craftitem("fishing:sushi", { - description = "Sushi (Hoso Maki)", + description = S("Sushi (Hoso Maki)"), groups = {}, inventory_image = "fishing_sushi.png", on_use = minetest.item_eat(6), @@ -35,7 +44,7 @@ minetest.register_craftitem("fishing:fish_raw", { -- Whatthef... it's a freakin' Shark! ----------------------------------------------------------------------------------------------- minetest.register_craftitem("fishing:shark", { - description = "Shark", + description = S("Shark"), groups = {}, inventory_image = "fishing_shark.png", on_use = minetest.item_eat(2), @@ -44,7 +53,7 @@ minetest.register_craftitem("fishing:shark", { -- Roasted Shark ----------------------------------------------------- minetest.register_craftitem("fishing:shark_cooked", { - description = "Roasted Shark", + description = S("Roasted Shark"), groups = {}, inventory_image = "fishing_shark_cooked.png", on_use = minetest.item_eat(6), @@ -54,7 +63,7 @@ minetest.register_craftitem("fishing:shark", { -- Pike ----------------------------------------------------------------------------------------------- minetest.register_craftitem("fishing:pike", { - description = "Northern Pike", + description = S("Northern Pike"), groups = {}, inventory_image = "fishing_pike.png", on_use = minetest.item_eat(2), @@ -63,8 +72,8 @@ minetest.register_craftitem("fishing:pike", { -- Roasted Pike ----------------------------------------------------- minetest.register_craftitem("fishing:pike_cooked", { - description = "Roasted Northern Pike", + description = S("Roasted Northern Pike"), groups = {}, inventory_image = "fishing_pike_cooked.png", on_use = minetest.item_eat(6), - }) \ No newline at end of file + }) diff --git a/mods/fishing/init.lua b/mods/fishing/init.lua old mode 100755 new mode 100644 index 6487db9e..ffdea4dc --- a/mods/fishing/init.lua +++ b/mods/fishing/init.lua @@ -26,6 +26,15 @@ local mname = "fishing" ----------------------------------------------------------------------------------------------- +-- Boilerplate to support localized strings if intllib mod is installed. +local S +if (minetest.get_modpath("intllib")) then + dofile(minetest.get_modpath("intllib").."/intllib.lua") + S = intllib.Getter(minetest.get_current_modname()) +else + S = function ( s ) return s end +end + dofile(minetest.get_modpath("fishing").."/settings.txt") dofile(minetest.get_modpath("fishing").."/bobber.lua") dofile(minetest.get_modpath("fishing").."/bobber_shark.lua") @@ -45,7 +54,7 @@ end minetest.register_tool("fishing:pole", { - description = "Fishing Pole", + description = S("Fishing Pole"), groups = {}, inventory_image = "fishing_pole.png", wield_image = "fishing_pole.png^[transformFXR270", @@ -117,7 +126,7 @@ minetest.register_tool("fishing:pole", { if SIMPLE_DECO_FISHING_POLE == true then minetest.register_node("fishing:pole_deco", { - description = "Fishing Pole", + description = S("Fishing Pole"), inventory_image = "fishing_pole.png", wield_image = "fishing_pole.png^[transformFXR270", drawtype = "nodebox", @@ -159,7 +168,7 @@ minetest.register_node("fishing:pole_deco", { else minetest.register_node("fishing:pole_deco", { - description = "Fishing Pole", + description = S("Fishing Pole"), inventory_image = "fishing_pole.png", wield_image = "fishing_pole.png^[transformFXR270", drawtype = "nodebox", @@ -229,7 +238,7 @@ end if NEW_WORM_SOURCE == false then minetest.register_node(":default:dirt", { - description = "Dirt", + description = S("Dirt"), tiles = {"default_dirt.png"}, is_ground_content = true, groups = {crumbly=3}, @@ -310,28 +319,28 @@ end -- didn't change the hoes, just here because hoe_on_use is local minetest.register_tool(":farming:hoe_wood", { - description = "Wooden Hoe", + description = S("Wooden Hoe"), inventory_image = "farming_tool_woodhoe.png", on_use = function(itemstack, user, pointed_thing) return hoe_on_use(itemstack, user, pointed_thing, 30) end, }) minetest.register_tool(":farming:hoe_stone", { - description = "Stone Hoe", + description = S("Stone Hoe"), inventory_image = "farming_tool_stonehoe.png", on_use = function(itemstack, user, pointed_thing) return hoe_on_use(itemstack, user, pointed_thing, 90) end, }) minetest.register_tool(":farming:hoe_steel", { - description = "Steel Hoe", + description = S("Steel Hoe"), inventory_image = "farming_tool_steelhoe.png", on_use = function(itemstack, user, pointed_thing) return hoe_on_use(itemstack, user, pointed_thing, 200) end, }) minetest.register_tool(":farming:hoe_bronze", { - description = "Bronze Hoe", + description = S("Bronze Hoe"), inventory_image = "farming_tool_bronzehoe.png", on_use = function(itemstack, user, pointed_thing) return hoe_on_use(itemstack, user, pointed_thing, 220) @@ -341,4 +350,4 @@ minetest.register_tool(":farming:hoe_bronze", { end ----------------------------------------------------------------------------------------------- print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...") ------------------------------------------------------------------------------------------------ \ No newline at end of file +----------------------------------------------------------------------------------------------- diff --git a/mods/fishing/locale/de.txt b/mods/fishing/locale/de.txt new file mode 100644 index 00000000..0e1ea572 --- /dev/null +++ b/mods/fishing/locale/de.txt @@ -0,0 +1,56 @@ +# Translation by Xanthin + +### bobber.lua ### +You caught a Fish. = Du hast einen Fisch gefangen. +You caught a Clownfish. = Du hast einen Clownfisch gefangen. +You caught a Blue white fish. = Du hast einen blau-weissen Fisch gefangen. +You caught a Twig. = Du hast einen Zweig gefangen. +You caught a Rat. = Du hast eine Ratte gefangen. +You caught some Seaweed. = Du hast etwas Seetang gefangen. +You caught a Green Kelp. = Du hast etwas gruenen Kelp gefangen. +You caught a String. = Du hast eine Schnur gefangen. +You caught an old Fishing Pole. = Du hast eine alte Angelrute gefangen. +You caught some very old Boots. = Du hast ein Paar sehr alte Schuhe gefangen. +You caught a Waterlily. = Du hast eine Seerose gefangen. +You didn't catch anything. = Du hast nichts gefangen. +The bait is still there. = Der Koeder ist noch vorhanden. +Your fish escaped. = Dein Fisch ist entkommen. + +### bobber_shark.lua ### +You caught a small Shark. = Du hast einen kleinen Hai gefangen. +You caught a Northern Pike. = Du hast einen Hecht gefangen. +You didn't catch any fish. = Du hast keinen Fisch gefangen. + +### crafting.lua ### +### fishes.lua ### +Fish = Fisch +Roasted Fish = Gebratener Fisch +Sushi (Hoso Maki) = Sushi (Hoso Maki) +Shark = Hai +Roasted Shark = Gebratener Hai +Northern Pike = Hecht +Roasted Northern Pike = Gebratener Hecht + +### init.lua ### +Fishing Pole = Angelrute +Dirt = Erde +Wooden Hoe = Holzhacke +Stone Hoe = Steinhacke +Steel Hoe = Stahlhacke +Bronze Hoe = Bronzehacke + +### trophies.lua ### +Fish Trophy = Fisch-Trophaee +Northern Pike Trophy = Hecht-Trophaee +Shark Trophy = Hai-Trophaee +Clownfish Trophy = Clownfisch-Trophaee +Blue white fish Trophy = Blau-weisser-Fisch-Trophaee +Trophy = Trophaee +This Huge Fish was caught by the Famous Angler %s ! = Dieser riesige Fisch wurde vom beruehmten Angler %s gefangen! +This Huge Northern Pike was caught by the Famous Angler %s ! = Dieser riesige Hecht wurde vom beruehmten Angler %s gefangen! +This Huge Shark was caught by the Famous Angler %s ! = Dieser riesige Hai wurde vom beruehmten Angler %s gefangen! +This Huge Clownfish was caught by the Famous Angler %s ! = Dieser riesige Clownfisch wurde vom beruehmten Angler %s gefangen! +This Huge Blue white fish was caught by the Famous Angler %s ! = Dieser riesige blau-weisse Fisch wurde vom beruehmten Angler %s gefangen! + +### worms.lua ### +Worm = Wurm diff --git a/mods/fishing/locale/template.txt b/mods/fishing/locale/template.txt new file mode 100644 index 00000000..3ed36dc8 --- /dev/null +++ b/mods/fishing/locale/template.txt @@ -0,0 +1,56 @@ +# Template + +### bobber.lua ### +You caught a Fish. = +You caught a Clownfish. = +You caught a Blue white fish. = +You caught a Twig. = +You caught a Rat. = +You caught some Seaweed. = +You caught a Green Kelp. = +You caught a String. = +You caught an old Fishing Pole. = +You caught some very old Boots. = +You caught a Waterlily. = +You didn't catch anything. = +The bait is still there. = +Your fish escaped. = + +### bobber_shark.lua ### +You caught small Shark. = +You caught a Northern Pike. = +You didn't catch any fish. = + +### crafting.lua ### +### fishes.lua ### +Fish = +Roasted Fish = +Sushi (Hoso Maki) = +Shark = +Roasted Shark = +Northern Pike = +Roasted Northern Pike = + +### init.lua ### +Fishing Pole = +Dirt = +Wooden Hoe = +Stone Hoe = +Steel Hoe = +Bronze Hoe = + +### trophies.lua ### +Fish Trophy = +Northern Pike Trophy = +Shark Trophy = +Clownfish Trophy = +Blue white fish Trophy = +Trophy = +This Huge Fish was caught by the Famous Angler %s ! = +This Huge Northern Pike was caught by the Famous Angler %s ! = +This Huge Shark was caught by the Famous Angler %s ! = +This Huge Clownfish was caught by the Famous Angler %s ! = +This Huge Blue white fish was caught by the Famous Angler %s ! = + +### worms.lua ### +Worm = diff --git a/mods/fishing/settings.txt b/mods/fishing/settings.txt old mode 100755 new mode 100644 diff --git a/mods/fishing/sounds/SoundLicense.txt b/mods/fishing/sounds/SoundLicense.txt old mode 100755 new mode 100644 diff --git a/mods/fishing/sounds/fishing_bobber1.ogg b/mods/fishing/sounds/fishing_bobber1.ogg old mode 100755 new mode 100644 diff --git a/mods/fishing/sounds/fishing_bobber2.ogg b/mods/fishing/sounds/fishing_bobber2.ogg old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/alternates/fishing_bobber.png b/mods/fishing/textures/alternates/fishing_bobber.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/alternates/fishing_bobber_bottom.png b/mods/fishing/textures/alternates/fishing_bobber_bottom.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/alternates/fishing_bobber_top.png b/mods/fishing/textures/alternates/fishing_bobber_top.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/alternates/fishing_pole.png b/mods/fishing/textures/alternates/fishing_pole.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/animal_clownfish_clownfish_item.png b/mods/fishing/textures/animal_clownfish_clownfish_item.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/animal_fish_blue_white_fish_blue_white_item.png b/mods/fishing/textures/animal_fish_blue_white_fish_blue_white_item.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_bobber.png b/mods/fishing/textures/fishing_bobber.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_bobber_bottom.png b/mods/fishing/textures/fishing_bobber_bottom.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_bobber_feather_1.png b/mods/fishing/textures/fishing_bobber_feather_1.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_bobber_top.png b/mods/fishing/textures/fishing_bobber_top.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_deco_pike.png b/mods/fishing/textures/fishing_deco_pike.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_fish.png b/mods/fishing/textures/fishing_fish.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_fish_cooked.png b/mods/fishing/textures/fishing_fish_cooked.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_pike.png b/mods/fishing/textures/fishing_pike.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_pike_cooked.png b/mods/fishing/textures/fishing_pike_cooked.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_pole.png b/mods/fishing/textures/fishing_pole.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_pole_back.png b/mods/fishing/textures/fishing_pole_back.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_pole_bottom.png b/mods/fishing/textures/fishing_pole_bottom.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_pole_deco.png b/mods/fishing/textures/fishing_pole_deco.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_pole_front.png b/mods/fishing/textures/fishing_pole_front.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_pole_simple.png b/mods/fishing/textures/fishing_pole_simple.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_pole_top.png b/mods/fishing/textures/fishing_pole_top.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_shark.png b/mods/fishing/textures/fishing_shark.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_shark_cooked.png b/mods/fishing/textures/fishing_shark_cooked.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_sushi.png b/mods/fishing/textures/fishing_sushi.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_trophy_label.png b/mods/fishing/textures/fishing_trophy_label.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/fishing_worm.png b/mods/fishing/textures/fishing_worm.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/not_in_use/fishing_bobber_feather_1.png b/mods/fishing/textures/not_in_use/fishing_bobber_feather_1.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/not_in_use/fishing_bobber_feather_2.png b/mods/fishing/textures/not_in_use/fishing_bobber_feather_2.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/not_in_use/fishing_bobber_ready.png b/mods/fishing/textures/not_in_use/fishing_bobber_ready.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/not_in_use/fishing_pole_on_use.png b/mods/fishing/textures/not_in_use/fishing_pole_on_use.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/old/fishing_bobber_alternate_old.png b/mods/fishing/textures/old/fishing_bobber_alternate_old.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/old/fishing_bobber_old.png b/mods/fishing/textures/old/fishing_bobber_old.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/old/fishing_pole_wield.png b/mods/fishing/textures/old/fishing_pole_wield.png old mode 100755 new mode 100644 diff --git a/mods/fishing/textures/old/fishing_shark_old6.png b/mods/fishing/textures/old/fishing_shark_old6.png old mode 100755 new mode 100644 diff --git a/mods/fishing/trophies.lua b/mods/fishing/trophies.lua old mode 100755 new mode 100644 index ebe7edb8..d2446450 --- a/mods/fishing/trophies.lua +++ b/mods/fishing/trophies.lua @@ -5,6 +5,15 @@ -- Supports: animal_clownfish, animal_fish_blue_white ----------------------------------------------------------------------------------------------- +-- Boilerplate to support localized strings if intllib mod is installed. +local S +if (minetest.get_modpath("intllib")) then + dofile(minetest.get_modpath("intllib").."/intllib.lua") + S = intllib.Getter(minetest.get_current_modname()) +else + S = function ( s ) return s end +end + local TRoPHY = { -- MoD iTeM NaMe iCoN {"fishing", "fish_raw", "Fish", "fishing_fish.png"}, @@ -27,7 +36,7 @@ for i in pairs(TRoPHY) do local NaMe = TRoPHY[i][3] local iCoN = TRoPHY[i][4] minetest.register_node("fishing:trophy_"..iTeM, { - description = NaMe.." Trophy", + description = S(NaMe.." Trophy"), inventory_image = "default_chest_top.png^"..iCoN.."^fishing_trophy_label.png", drawtype = "nodebox", tiles = { @@ -58,9 +67,8 @@ for i in pairs(TRoPHY) do sounds = default.node_sound_wood_defaults(), after_place_node = function(pos, placer) local meta = minetest.get_meta(pos) - meta:set_string("owner", placer:get_player_name() or "") - meta:set_string("infotext", "This Huge "..NaMe.." was caught by the Famous Angler ".. - meta:get_string("owner").."!") + meta:set_string("owner", placer:get_player_name() or "") + meta:set_string("infotext", S("This Huge "..NaMe.." was caught by the Famous Angler %s !"):format((placer:get_player_name() or ""))) end, on_construct = function(pos) local meta = minetest.get_meta(pos) @@ -79,4 +87,4 @@ for i in pairs(TRoPHY) do recipe = {MoD..":"..iTeM, "default:sign_wall"}, }) -end \ No newline at end of file +end diff --git a/mods/fishing/worm.lua b/mods/fishing/worm.lua old mode 100755 new mode 100644 index 88985576..a9e08925 --- a/mods/fishing/worm.lua +++ b/mods/fishing/worm.lua @@ -6,11 +6,21 @@ -- Looked at code from: my_mobs -- Dependencies: default ----------------------------------------------------------------------------------------------- + +-- Boilerplate to support localized strings if intllib mod is installed. +local S +if (minetest.get_modpath("intllib")) then + dofile(minetest.get_modpath("intllib").."/intllib.lua") + S = intllib.Getter(minetest.get_current_modname()) +else + S = function ( s ) return s end +end + ----------------------------------------------------------------------------------------------- -- WORM ITEM ----------------------------------------------------------------------------------------------- minetest.register_craftitem("fishing:bait_worm", { - description = "Worm", + description = S("Worm"), groups = { fishing_bait=1 }, inventory_image = "fishing_worm.png", on_use = minetest.item_eat(1), @@ -115,4 +125,4 @@ minetest.register_entity("fishing:bait_worm_entity", { end look_whats_up(self) end, -}) \ No newline at end of file +})