Skip to content

Commit

Permalink
no spam on locate (#1185)
Browse files Browse the repository at this point in the history
* no spam on locate

* bugfix
  • Loading branch information
Delwing authored Nov 21, 2021
1 parent fa9d6ff commit 07342fc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions mapper/localization.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,5 @@ function amap.localization:try_to_locate()
if #results == 1 then
amap:set_position(results[1].room_id, true)
return true
else
for k,v in pairs(results) do
scripts:print_log("Mozliwa lokacja: " .. v.room_id)
end
end
end
2 changes: 1 addition & 1 deletion mapper/map.lua
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function amap:init_self_locating()
scripts.event_register:kill_event_handler(amap.locate_handler)
end
end)
amap.set_position_handler = scripts.event_register:register_event_handler(amap.set_position_handler, "setPosition", function()
amap.set_position_handler = scripts.event_register:force_register_event_handler(amap.set_position_handler, "setPosition", function()
scripts.event_register:kill_event_handler(amap.locate_handler)
end, true)
end
Expand Down

0 comments on commit 07342fc

Please sign in to comment.