Increase cache search distance from 80 to 105
This commit is contained in:
1 parent
36dfa312ad
commit
032b4cfd33
2 files changed
+4
-4
No files matched your search
@@ -76,7 +76,7 @@ class CacheItemsStates:
|
|||||||
position = self.g.get('pos')
|
position = self.g.get('pos')
|
||||||
if not callable(finder) or position is None or position is False:
|
if not callable(finder) or position is None or position is False:
|
||||||
return []
|
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=()):
|
def _throwable_slots(self, item_ids, excluded=()):
|
||||||
item_ids = set(item_ids)
|
item_ids = set(item_ids)
|
||||||
@@ -226,7 +226,7 @@ class CacheItemsStates:
|
|||||||
|
|
||||||
self.throw_signs = self._find_throw_signs()
|
self.throw_signs = self._find_throw_signs()
|
||||||
self.checked_throw_signs = set()
|
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.checked_labeled_chests = set()
|
||||||
self.trapped_chests = w.find_blocks_indexed(p, blocks.TRAPPED_CHEST_IDS)
|
self.trapped_chests = w.find_blocks_indexed(p, blocks.TRAPPED_CHEST_IDS)
|
||||||
print('Found {} labeled chests; found {} trapped chests: {}'.format(
|
print('Found {} labeled chests; found {} trapped chests: {}'.format(
|
||||||
|
|||||||
+2
-2
@@ -121,7 +121,7 @@ class World:
|
|||||||
normal = tuple(-component for component in normal)
|
normal = tuple(-component for component in normal)
|
||||||
return 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."""
|
"""Find nearby signs directing this bot to throw an item at them."""
|
||||||
bot_name = str(bot_name).casefold()
|
bot_name = str(bot_name).casefold()
|
||||||
group_name = (bot_name[:-1] if len(bot_name) > 1 and
|
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(sorted((tuple(chest), partner)))
|
||||||
return (tuple(chest),)
|
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."""
|
"""Find single/double chests assigned item categories by nearby signs."""
|
||||||
grouped = {}
|
grouped = {}
|
||||||
sign_offsets = (
|
sign_offsets = (
|
||||||
|
|||||||
Reference in new issue
Block a user