summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-06-23 08:57:51 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-06-23 08:57:51 +0100
commit53563fe43088b18cdcc8577a43627d7bf0c0bdcf (patch)
tree666b8d8c31a73e12772c97debc44adab1f5f212f
parent0d27bbe02da67ed6bdf9a171179077919b23eba4 (diff)
added animation loop flag
-rw-r--r--api.lua10
-rw-r--r--api.txt4
2 files changed, 8 insertions, 6 deletions
diff --git a/api.lua b/api.lua
index df33ec1..f56f36a 100644
--- a/api.lua
+++ b/api.lua
@@ -1,9 +1,9 @@
--- Mobs Api (19th June 2017)
+-- Mobs Api (23rd June 2017)
mobs = {}
mobs.mod = "redo"
-mobs.version = "20170619"
+mobs.version = "20170623"
-- Intllib
@@ -157,9 +157,9 @@ local set_animation = function(self, anim)
self.object:set_animation({
x = self.animation[anim .. "_start"],
- y = self.animation[anim .. "_end"]
- }, self.animation[anim .. "_speed"] or self.animation.speed_normal or 15)
-
+ y = self.animation[anim .. "_end"]},
+ self.animation[anim .. "_speed"] or self.animation.speed_normal or 15,
+ 0, self.animation[anim .. "_loop"] ~= false)
end
diff --git a/api.txt b/api.txt
index de3c0fb..c118395 100644
--- a/api.txt
+++ b/api.txt
@@ -1,5 +1,5 @@
-MOB API (10th June 2017)
+MOB API (23rd June 2017)
The mob api is a function that can be called on by other mods to add new animals or monsters into minetest.
@@ -127,6 +127,8 @@ can be added to the mob definition under pre-defined mob animation names like:
'punch_start', 'punch_end', 'punch_speed' when mob attacks
'punch2_start', 'punch2_end', 'punch2_speed' when mob attacks (alternative)
'die_start', 'die_end', 'die_speed' when mob dies
+ '*_loop' bool value to determine if any set animation loops e.g (die_loop = false)
+ defaults to true if not set
also 'speed_normal' for compatibility with older mobs for animation speed (deprecated)