diff 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
line wrap: on
line diff
--- a/src/parpg/components/container.py	Sun Jul 31 23:47:28 2011 +0200
+++ b/src/parpg/components/container.py	Sun Jul 31 23:48:54 2011 +0200
@@ -20,3 +20,9 @@
     
     def __init__(self):
         Component.__init__(children=list, max_bulk=int)
+        
+def get_bulk(container):
+    bulk = 0
+    for child in container.children:
+        bulk += child.bulk
+    return bulk