diff --git a/mods/mobs/mob_npc.lua b/mods/mobs/mob_npc.lua index d37997cf..68dc5d5f 100644 --- a/mods/mobs/mob_npc.lua +++ b/mods/mobs/mob_npc.lua @@ -181,7 +181,21 @@ for _, npc_type_table in pairs(npc_types) do say_random("happy", name) end elseif minetest.get_item_group(iname, "nav_compass") == 1 then - say(S("Try magnetizing it on a wrought iron block"), name) + local r = math.random(1,3) + if r == 1 then + say(S("Try magnetizing it on a wrought iron block"), name) + elseif r == 2 then + say(S("Try magnetizing it on a steel block"), name) + else + say(S("Try magnetizing it on a carbon steel block"), name) + end + elseif minetest.get_item_group(iname, "nav_compass") == 2 then + local r = math.random(1,3) + if r == 1 then + say(S("If you use it on a cotton bale, it will point to the North again"), name) + else + say(S("If you use it on wool, it will point to the North again"), name) + end elseif iname == "rp_nav:map" then say(S("We live in a lovely place, don't we?"), name) elseif iname == "mobs:lasso" then diff --git a/mods/rp_nav/compass.lua b/mods/rp_nav/compass.lua index 0585f528..466d9bbb 100644 --- a/mods/rp_nav/compass.lua +++ b/mods/rp_nav/compass.lua @@ -104,9 +104,9 @@ local wield_imgs_magno = { } local d = S("Compass") -local t = S("It points to the North") +local t = S("It points to the North") .. "\n" .. S("Can be magnetized at magnetic blocks") local dm = S("Magno Compass") -local tm = S("It points to a position") +local tm = S("It points to a position") .. "\n" .. S("Can be demagnetized at unmagnetic blocks") for c=0,7 do local magnetize_on_place = function(itemstack, placer, pointed_thing) diff --git a/mods/rp_tt/init.lua b/mods/rp_tt/init.lua new file mode 100644 index 00000000..b97d1d06 --- /dev/null +++ b/mods/rp_tt/init.lua @@ -0,0 +1,12 @@ +local S = minetest.get_translator("rp_tt") +tt.register_snippet(function(itemstring) + local magnetic = minetest.get_item_group(itemstring, "magnetic") > 0 + local unmagnetic = minetest.get_item_group(itemstring, "unmagnetic") > 0 + local str = nil + if magnetic then + str = S("Magnetic") + elseif unmagnetic then + str = S("Unmagnetic") + end + return str +end) diff --git a/mods/rp_tt/mod.conf b/mods/rp_tt/mod.conf new file mode 100644 index 00000000..710522de --- /dev/null +++ b/mods/rp_tt/mod.conf @@ -0,0 +1,3 @@ +name = rp_tt +depends = tt +description = Tooltip extras for Repixture