summaryrefslogtreecommitdiff
path: root/api.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-09-05 16:32:46 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-09-05 16:32:46 +0100
commit80cf1ddb1c8751f769ce6b2f309acacf499380c7 (patch)
treeb92c50ac7a92ccd9334eac644e5d11ee3d22fdfe /api.lua
parentd28c4100950df54fe0d57d573e1f3ba0b5d4a0d1 (diff)
added nametag setting to mob registry
Diffstat (limited to 'api.lua')
-rw-r--r--api.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/api.lua b/api.lua
index 36fa6a1..a3a941a 100644
--- a/api.lua
+++ b/api.lua
@@ -1,9 +1,9 @@
--- Mobs Api (1st September 2017)
+-- Mobs Api (5th September 2017)
mobs = {}
mobs.mod = "redo"
-mobs.version = "20170901"
+mobs.version = "20170905"
-- Intllib
@@ -2443,6 +2443,11 @@ local mob_activate = function(self, staticdata, def, dtime)
self.visual_size = vis_size
self.standing_in = ""
+ -- check existing nametag
+ if not self.nametag then
+ self.nametag = def.nametag
+ end
+
-- set anything changed above
self.object:set_properties(self)
set_yaw(self.object, (random(0, 360) - 180) / 180 * pi)