Some fixes to item_names and waypoints.
This commit is contained in:
parent
b46f4217ae
commit
833a255ad4
@ -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,12 +108,9 @@ 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
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if formname ~= "" then
|
||||
|
Loading…
Reference in New Issue
Block a user