forked from whosit/waypoint_compass
optionally depend on waypoint_announce; use hook to update recent
This commit is contained in:
parent
73bb4a1eab
commit
6c369e2b6b
9
init.lua
9
init.lua
@ -629,6 +629,15 @@ end
|
||||
-- -- Usage example:
|
||||
-- waypoint_compass.add_point_to_recent_personal('singleplayer', {x=0,y=1,z=2}, "death", "from lava")
|
||||
|
||||
if waypoint_announce and waypoint_announce.post_announcement_hooks then
|
||||
local _announcement_callback = function(announcer_name, message, pointed_pos)
|
||||
waypoint_compass.add_point_to_recent_global(pointed_pos, announcer_name, message)
|
||||
end
|
||||
|
||||
local hooks = waypoint_announce.post_announcement_hooks
|
||||
hooks["waypoint_compass"] = _announcement_callback
|
||||
end
|
||||
|
||||
|
||||
return waypoint_compass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user