소스 검색

Transportable: state in parent class

Bastien Sevajol 10 년 전
부모
커밋
74b287498c
3개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 0 2
      intelligine/synergy/object/Egg.py
  2. 0 2
      intelligine/synergy/object/Food.py
  3. 1 0
      intelligine/synergy/object/Transportable.py

+ 0 - 2
intelligine/synergy/object/Egg.py 파일 보기

@@ -7,6 +7,4 @@ class Egg(BaseBug):
7 7
     def __init__(self, collection, context):
8 8
         super().__init__(collection, context)
9 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 10
         self._life_points = 1

+ 0 - 2
intelligine/synergy/object/Food.py 파일 보기

@@ -7,8 +7,6 @@ class Food(Resource):
7 7
     def __init__(self, collection, context):
8 8
         super().__init__(collection, context)
9 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 11
     def get_what_carry(self):
14 12
         clone = self.__class__(self._collection, self._context)

+ 1 - 0
intelligine/synergy/object/Transportable.py 파일 보기

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