From be7b6bc5fedcd100418e621269dfed013c7e5898 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 5 Dec 2023 08:23:04 +0000 Subject: [PATCH] can now add 'nametag = "mob name"' in mob definition --- api.lua | 3 ++- api.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api.lua b/api.lua index 77d5514..e103104 100644 --- a/api.lua +++ b/api.lua @@ -14,7 +14,7 @@ local use_vh1 = minetest.get_modpath("visual_harm_1ndicators") -- Global mobs = { mod = "redo", - version = "20231202", + version = "20231205", translate = S, invis = minetest.global_exists("invisibility") and invisibility or {}, node_snow = minetest.registered_aliases["mapgen_snow"] @@ -3569,6 +3569,7 @@ minetest.register_entity(":" .. name, setmetatable({ name = name, type = def.type, + _nametag = def.nametag, attack_type = def.attack_type, fly = def.fly, fly_in = def.fly_in, diff --git a/api.txt b/api.txt index 2524367..8f29db4 100644 --- a/api.txt +++ b/api.txt @@ -561,7 +561,7 @@ This function registers a arrow for mobs with the attack type shoot. 0 for no glow) 'rotate' integer value in degrees to rotate arrow 'on_step' is a custom function when arrow is active, nil for - default. + default. (self, dtime, moveresult) 'on_punch' is a custom function when arrow is punched, nil by default 'collisionbox' is hitbox table for arrow, {-.1,-.1,-.1,.1,.1,.1} by default. 'lifetime' contains float value for how many seconds arrow exists in