Increase cache search distance from 80 to 105

This commit is contained in:
Tanner committed 2026-11-10 15:56:24 +00:00
1 parent 36dfa312ad
commit 032b4cfd33
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -76,7 +76,7 @@ class CacheItemsStates:
position = self.g.get('pos')
if not callable(finder) or position is None or position is False:
return []
return finder(utils.pint(position), self.g.get('name', ''), 80)
return finder(utils.pint(position), self.g.get('name', ''), 105)
def _throwable_slots(self, item_ids, excluded=()):
item_ids = set(item_ids)
@@ -226,7 +226,7 @@ class CacheItemsStates:
self.throw_signs = self._find_throw_signs()
self.checked_throw_signs = set()
self.labeled_chests = w.find_labeled_chests(p, 80)
self.labeled_chests = w.find_labeled_chests(p, 105)
self.checked_labeled_chests = set()
self.trapped_chests = w.find_blocks_indexed(p, blocks.TRAPPED_CHEST_IDS)
print('Found {} labeled chests; found {} trapped chests: {}'.format(
+2 -2
View File
@@ -121,7 +121,7 @@ class World:
normal = tuple(-component for component in normal)
return normal
def find_throw_signs(self, center, bot_name, distance=80):
def find_throw_signs(self, center, bot_name, distance=105):
"""Find nearby signs directing this bot to throw an item at them."""
bot_name = str(bot_name).casefold()
group_name = (bot_name[:-1] if len(bot_name) > 1 and
@@ -213,7 +213,7 @@ class World:
return tuple(sorted((tuple(chest), partner)))
return (tuple(chest),)
def find_labeled_chests(self, center, distance=80):
def find_labeled_chests(self, center, distance=105):
"""Find single/double chests assigned item categories by nearby signs."""
grouped = {}
sign_offsets = (