Some fixes to item_names and waypoints.

这个提交包含在:
RealBadAngel
2014-05-26 11:43:25 +02:00
父节点 b46f4217ae
当前提交 833a255ad4
共有 2 个文件被更改,包括 7 次插入6 次删除

查看文件

@ -1,3 +1,5 @@
-- code based on 4itemnames mod by 4aiman
local wield = {}
local huds = {}
local dtimes = {}
@ -27,7 +29,7 @@ minetest.register_on_joinplayer(function(player)
number = 0xFFFFFF ,
text = "",
})
print(dump("item hud id: "..huds[player_name]))
--print(dump("item hud id: "..huds[player_name]))
end)
end)

查看文件

@ -96,8 +96,10 @@ unified_inventory.update_hud = function (player, waypoint)
else
name = waypoint.name
end
if waypoint.active then
if waypoint.hud then
player:hud_remove(waypoint.hud)
end
if waypoint.active then
waypoint.hud = player:hud_add({
hud_elem_type = "waypoint",
number = unified_inventory.hud_colors[waypoint.color][2] ,
@ -106,10 +108,7 @@ unified_inventory.update_hud = function (player, waypoint)
world_pos = waypoint.world_pos
})
else
if waypoint.hud ~= nil then
player:hud_remove(waypoint.hud)
waypoint.hud = nil
end
waypoint.hud = nil
end
end