Merge branch 'remove-tiles'

# Conflicts:
#	marl_factory_grid/environment/actions.py
#	marl_factory_grid/environment/entity/entity.py
#	marl_factory_grid/environment/factory.py
#	marl_factory_grid/modules/batteries/rules.py
#	marl_factory_grid/modules/clean_up/groups.py
#	marl_factory_grid/modules/destinations/entitites.py
#	marl_factory_grid/modules/destinations/groups.py
#	marl_factory_grid/modules/destinations/rules.py
#	marl_factory_grid/modules/items/rules.py
#	marl_factory_grid/modules/maintenance/entities.py
#	marl_factory_grid/utils/config_parser.py
#	marl_factory_grid/utils/level_parser.py
#	marl_factory_grid/utils/states.py
This commit is contained in:
Steffen Illium
2023-10-17 14:03:59 +02:00
40 changed files with 285 additions and 273 deletions

View File

@@ -39,7 +39,8 @@ class Destination(BoundEntityMixin, Entity):
def has_just_been_reached(self):
if self.was_reached:
return False
agent_at_position = any(self.bound_entity == x for x in self.tile.guests_that_can_collide)
agent_at_position = any(c.AGENT.lower() in x.name.lower() for x in state.entities.pos_dict[self.pos] if x.var_can_collide)
if self.bound_entity:
return ((agent_at_position and not self.action_counts)
or self._per_agent_actions[self.bound_entity.name] >= self.action_counts >= 1)