Movement printing and Results, state, state reset.

This commit is contained in:
Steffen Illium
2023-11-16 17:08:08 +01:00
parent 7f1d99fe18
commit 6c27aa8eaf
11 changed files with 45 additions and 21 deletions

View File

@@ -90,7 +90,14 @@ class Entity(Object, abc.ABC):
self.set_pos(next_pos)
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]):
# The entity did move, but there was something to collide with...
# Is then reported as a non-valid move, which did work.
valid = False
return valid
# Bad naming... Was the same was the same pos, not moving....
return not_same_pos
def __init__(self, pos, bind_to=None, **kwargs):