# HG changeset patch # User KarstenBock@gmx.net # Date 1316875686 -7200 # Node ID b10de03107716eb09926ed3815870ba2e393687d # Parent 9b5498e3bda0ab1d89b077ff3f3d706698bf9a69 Changed way of setting the possible components of the world. diff -r 9b5498e3bda0 -r b10de0310771 src/parpg/components/__init__.py --- a/src/parpg/components/__init__.py Sat Sep 24 15:48:24 2011 +0200 +++ b/src/parpg/components/__init__.py Sat Sep 24 16:48:06 2011 +0200 @@ -9,4 +9,19 @@ from change_map import ChangeMap from equipable import Equipable from equip import Equip -from general import General \ No newline at end of file +from general import General + +components = { + "general": General(), + "characterstats": CharacterStatistics(), + "containable": Containable(), + "container": Container(), + "description": Description(), + "dialogue": Dialogue(), + "fifeagent": FifeAgent(), + "lockable": Lockable(), + "usable": Usable(), + "change_map": ChangeMap(), + "equipable": Equipable(), + "equip": Equip(), + } \ No newline at end of file diff -r 9b5498e3bda0 -r b10de0310771 src/parpg/world.py --- a/src/parpg/world.py Sat Sep 24 15:48:24 2011 +0200 +++ b/src/parpg/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: