limit mob names to 64 chars, update mount lib to new 0.4.15 functions

This commit is contained in:
TenPlus1
2017-03-02 20:41:45 +00:00
parent 8d8779da2f
commit 18d42f2285
2 changed files with 14 additions and 7 deletions

View File

@ -1,5 +1,5 @@
-- Mobs Api (24th February 2017)
-- Mobs Api (2nd March 2017)
mobs = {}
mobs.mod = "redo"
@ -3383,6 +3383,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
return
end
-- limit name entered to 64 characters long
if string.len(fields.name) > 64 then
fields.name = string.sub(fields.name, 1, 64)
end
-- update nametag
mob_obj[name].nametag = fields.name