Food.py 501B

123456789101112131415
  1. from intelligine.synergy.object.ressource.Ressource import Resource
  2. from intelligine.cst import TRANSPORTABLE, TYPE, TYPE_RESOURCE_TRANSFORMABLE
  3. class Food(Resource):
  4. def __init__(self, collection, context):
  5. super().__init__(collection, context)
  6. context.metas.list.add(TYPE, self.get_id(), TYPE_RESOURCE_TRANSFORMABLE)
  7. def get_what_carry(self):
  8. clone = self.__class__(self._collection, self._context)
  9. self._collection.add_object(clone)
  10. return clone