Browse Source

Transportable: state in parent class

Bastien Sevajol 9 years ago
parent
commit
74b287498c

+ 0 - 2
intelligine/synergy/object/Egg.py View File

7
     def __init__(self, collection, context):
7
     def __init__(self, collection, context):
8
         super().__init__(collection, context)
8
         super().__init__(collection, context)
9
         context.metas.list.add(TYPE, self.get_id(), TYPE_NURSERY)
9
         context.metas.list.add(TYPE, self.get_id(), TYPE_NURSERY)
10
-        # TODO: ?? TRANSPORTABLE ne devrait pas ette du cote de Transportable ?
11
-        context.metas.states.add(self.get_id(), TRANSPORTABLE)
12
         self._life_points = 1
10
         self._life_points = 1

+ 0 - 2
intelligine/synergy/object/Food.py View File

7
     def __init__(self, collection, context):
7
     def __init__(self, collection, context):
8
         super().__init__(collection, context)
8
         super().__init__(collection, context)
9
         context.metas.list.add(TYPE, self.get_id(), TYPE_RESOURCE_TRANSFORMABLE)
9
         context.metas.list.add(TYPE, self.get_id(), TYPE_RESOURCE_TRANSFORMABLE)
10
-        # TODO: ?? TRANSPORTABLE ne devrait pas ette du cote de Transportable ?
11
-        context.metas.states.add(self.get_id(), TRANSPORTABLE)
12
 
10
 
13
     def get_what_carry(self):
11
     def get_what_carry(self):
14
         clone = self.__class__(self._collection, self._context)
12
         clone = self.__class__(self._collection, self._context)

+ 1 - 0
intelligine/synergy/object/Transportable.py View File

7
     def __init__(self, collection, context):
7
     def __init__(self, collection, context):
8
         super().__init__(collection, context)
8
         super().__init__(collection, context)
9
         self._carried_by = None
9
         self._carried_by = None
10
+        context.metas.states.add(self.get_id(), TRANSPORTABLE)
10
 
11
 
11
     def set_carried_by(self, obj):
12
     def set_carried_by(self, obj):
12
         if obj is not None:
13
         if obj is not None: