Distance bug Dev 2924


#1

I think the range limitations are still present. I was able to get my people to dig out a mine very far from my main village but after leaving it for a while I tried to upgrade my farmer to a cook. My cook did nothing because all of my stone was in the mine, which was apparently too far away, and he couldn’t build his workshops. When trying to move a Large Crate, contained a lot of stone, I received the following error:

develop-2924 (x64)
No matching overload found, candidates: custom [double] distance_to(Point3 const&,Point3 const&)
stack traceback:
	radiant/modules/common.lua:237: in function 'report_traceback'
	radiant/modules/common.lua:248: in function <radiant/modules/common.lua:242>
	[C]: in function 'distance_to'
	stonehearth/services/server/inventory/inventory.lua:612: in function 'find_closest_unused_placable_item'
	.../fixture_fabricator/fixture_fabricator_component.lua:221: in function '_place_fixture'
	.../fixture_fabricator/fixture_fabricator_component.lua:227: in function 'cb'
	stonehearth/services/server/inventory/inventory.lua:566: in function 'instance'
	radiant/modules/events.lua:206: in function <radiant/modules/events.lua:200>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:257: in function 'xpcall'
	radiant/modules/events.lua:200: in function 'trigger'
	radiant/modules/events.lua:241: in function '_fire_async_triggers'
	radiant/modules/events.lua:319: in function '_update'
	radiant/server.lua:62: in function <radiant/server.lua:58>

I was attempting to a Large Crate from the circled mine to the circled ghost crate. Also, my hearthlings stopped building the road, presumably because they didn’t have access to the stone.

Here’s my save: https://onedrive.live.com/redir?resid=7AE203B9DDD1D565!286662&authkey=!AIe418dpw5qncPY&ithint=folder%2Cjson


#2

Small update: Finding a few pieces of stone nearby fixed all of my woes. Not only were my hearthlings able to finish my road, they were able to grab my crates from the mine and they are once again able to go back and forth, even after vacating it for a while. Of note, when the issue was happening my warriors also weren’t patrolling the area. I had originally assumed the AI was being smart enough not to bother protecting an area where nobody is at, but my warriors are once again patrolling the vacant mine.