Bug.py 552B

1234567891011121314151617
  1. from intelligine.synergy.object.BaseBug import BaseBug
  2. from intelligine.cst import WALKER, COL_WALKER
  3. class Bug(BaseBug):
  4. def __init__(self, collection, context):
  5. super().__init__(collection, context)
  6. context.metas.states.add(self.get_id(), WALKER)
  7. context.metas.collections.add(self.get_id(), COL_WALKER)
  8. def die(self):
  9. super().die()
  10. # TODO: Ca peut buger si pas , allow_not_in=True, pk ?
  11. self._remove_state(WALKER, allow_not_in=True)
  12. self._remove_col(COL_WALKER, allow_not_in=True)