1
0
mirror of https://github.com/tacigar/maidroid.git synced 2024-11-14 14:20:22 +01:00

Merge pull request #164 from tacigar/tacigar/nametag

Modify nametag
This commit is contained in:
tacigar 2017-01-11 17:43:42 +09:00 committed by GitHub
commit cb5305573d

View File

@ -28,7 +28,7 @@ minetest.register_craftitem("maidroid_tool:nametag", {
if not obj:is_player() and luaentity then
local name = luaentity.name
if maidroid.registered_maidroids[name] and not luaentity:is_named() then
if maidroid.registered_maidroids[name] then
local player_name = user:get_player_name()
minetest.show_formspec(player_name, "maidroid_tool:nametag", formspec)
@ -51,8 +51,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local luaentity = maidroid_buf[player:get_player_name()]
luaentity.nametag = fields.name
luaentity.object:set_nametag_attributes{
text = fields.name,
luaentity.object:set_properties{
nametag = fields.name,
}
end
end)