Add entity name to debug box

This commit is contained in:
cora 2022-11-11 20:18:16 +01:00
parent 6948b77226
commit 3c6d79ecb3

View File

@ -58,7 +58,11 @@ end
function mob_class:update_tag() --update nametag and/or the debug box
local tag
if mobs_debug then
tag = "nametag = '"..tostring(self.nametag).."'\n"..
local name = self.name
if self.nametag and self.nametag ~= "" then
name = self.nametag
end
tag = "name = '"..tostring(name).."'\n"..
"state = '"..tostring(self.state).."'\n"..
"order = '"..tostring(self.order).."'\n"..
"attack = "..tostring(self.attack).."\n"..