mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-07-12 15:52:40 +02:00
Fixed Doors
This commit is contained in:
marl_factory_grid
@ -91,7 +91,7 @@ class Entity(Object, abc.ABC):
|
||||
for observer in self.observers:
|
||||
observer.notify_add_entity(self)
|
||||
# Aftermath Collision Check
|
||||
if len([x for x in state.entities.by_pos(next_pos) if x.var_can_collide]):
|
||||
if len([x for x in state.entities.by_pos(next_pos) if x.var_can_collide]) > 1:
|
||||
# The entity did move, but there was something to collide with...
|
||||
# Is then reported as a non-valid move, which did work.
|
||||
valid = False
|
||||
|
Reference in New Issue
Block a user