summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua10
-rw-r--r--sheep.lua6
2 files changed, 13 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index 1618780..c8c6d25 100644
--- a/init.lua
+++ b/init.lua
@@ -3,8 +3,14 @@ local path = minetest.get_modpath("mobs_animal")
-- Intllib
local S
-if minetest.get_modpath("intllib") then
- S = intllib.Getter()
+if minetest.global_exists("intllib") then
+ if intllib.make_gettext_pair then
+ -- New method using gettext.
+ S = intllib.make_gettext_pair()
+ else
+ -- Old method using text files.
+ S = intllib.Getter()
+ end
else
S = function(s) return s end
end
diff --git a/sheep.lua b/sheep.lua
index 4cd6506..757c34f 100644
--- a/sheep.lua
+++ b/sheep.lua
@@ -69,7 +69,11 @@ for _, col in ipairs(all_colours) do
replace_with = "air",
replace_offset = -1,
fear_height = 3,
-
+--[[
+ on_replace = function(self, pos, oldnode, newnode)
+ print ("---- replaced") ; return false -- false to keep node, true to replace
+ end,
+]]
on_rightclick = function(self, clicker)
--are we feeding?