comparison src/parpg/components/container.py @ 37:799fc37fec6d

Changes for the container system
author KarstenBock@gmx.net
date Sun, 31 Jul 2011 23:48:54 +0200
parents 5ac50245e42c
children 74f09d6417f4
comparison
equal deleted inserted replaced
36:6a637c737d20 37:799fc37fec6d
18 Component that allows an entity to contain one or more child entities. 18 Component that allows an entity to contain one or more child entities.
19 """ 19 """
20 20
21 def __init__(self): 21 def __init__(self):
22 Component.__init__(children=list, max_bulk=int) 22 Component.__init__(children=list, max_bulk=int)
23
24 def get_bulk(container):
25 bulk = 0
26 for child in container.children:
27 bulk += child.bulk
28 return bulk