Mercurial > parpg-core
comparison src/parpg/gamemodel.py @ 188:d0aa0f3eecc1
Activaed loading of character statistic scripts.
author | KarstenBock@gmx.net |
---|---|
date | Sat, 05 Nov 2011 16:08:16 +0100 |
parents | f612b4638744 |
children | 728eabc921f2 |
comparison
equal
deleted
inserted
replaced
187:f612b4638744 | 188:d0aa0f3eecc1 |
---|---|
98 self.dialogues = {} | 98 self.dialogues = {} |
99 self.agent_import_files = {} | 99 self.agent_import_files = {} |
100 self.obj_loader = XMLObjectLoader(self.engine) | 100 self.obj_loader = XMLObjectLoader(self.engine) |
101 # FIXME M. George Hansen 2011-06-06: character stats scripts aren't | 101 # FIXME M. George Hansen 2011-06-06: character stats scripts aren't |
102 # finished, unfortunately. | 102 # finished, unfortunately. |
103 #primary_stats_file = \ | 103 # NOTE Beliar 2011-11-05 Activated the stats. Testing needed if it |
104 # vfs.VFS.open('character_scripts/primary_stats.xml') | 104 # works correctly, or if they are still unfinished. |
105 #self.primary_stats = XmlSerializer.deserialize(primary_stats_file) | 105 primary_stats_file = ( |
106 #secondary_stats_file = \ | 106 vfs.VFS.open('character_scripts/primary_stats.xml') |
107 # vfs.VFS.open('character_scripts/secondary_stats.xml') | 107 ) |
108 #self.secondary_stats = XmlSerializer.deserialize(secondary_stats_file) | 108 self.primary_stats = XmlSerializer.deserialize(primary_stats_file) |
109 self.primary_stats = [] | 109 secondary_stats_file = ( |
110 self.secondary_stats = [] | 110 vfs.VFS.open('character_scripts/secondary_stats.xml') |
111 ) | |
112 self.secondary_stats = XmlSerializer.deserialize(secondary_stats_file) | |
113 | |
111 | 114 |
112 def create_stats(self, entity): | 115 def create_stats(self, entity): |
113 for primary_stat in self.primary_stats: | 116 for primary_stat in self.primary_stats: |
114 long_name = primary_stat.long_name | 117 long_name = primary_stat.long_name |
115 entity.characterstats.primary_stats[long_name] = ( | 118 entity.characterstats.primary_stats[long_name] = ( |