diff world.py @ 87:aed2e094e0c7

Changed way of setting the possible components of the world.
author KarstenBock@gmx.net
date Sat, 24 Sep 2011 16:48:06 +0200
parents a9cc5559ec2a
children 79d6b17b80a3
line wrap: on
line diff
--- a/world.py	Sat Sep 24 15:48:24 2011 +0200
+++ b/world.py	Sat Sep 24 16:48:06 2011 +0200
@@ -12,18 +12,8 @@
         
     def configure(self):
         """Configure the game world's components, systems and renderers"""
-        self.components.general = components.General()
-        self.components.characterstats = components.CharacterStatistics()
-        self.components.containable = components.Containable()
-        self.components.container = components.Container()
-        self.components.description = components.Description()
-        self.components.dialogue = components.Dialogue()
-        self.components.fifeagent = components.FifeAgent()
-        self.components.lockable = components.Lockable()
-        self.components.usable = components.Usable()
-        self.components.change_map = components.ChangeMap()
-        self.components.equipable = components.Equipable()
-        self.components.equip = components.Equip()
+        for name, component in components.components.iteritems():
+            setattr(self.components, name, component)
     
     def pump(self, dt):
         for component in self.components: