Mercurial > parpg-core
comparison src/parpg/gamemodel.py @ 137:140e5e93f026
Added ExamineContentsAction.
Added "Examine Contents" to the context menu, when the object is a container and does not have a characterstats component.
author | KarstenBock@gmx.net |
---|---|
date | Fri, 30 Sep 2011 15:31:53 +0200 |
parents | e1fd4cda237d |
children | c9fba51214ed |
comparison
equal
deleted
inserted
replaced
136:e1fd4cda237d | 137:140e5e93f026 |
---|---|
305 | 305 |
306 def readAgentsOfMap(self, map_name): | 306 def readAgentsOfMap(self, map_name): |
307 """Read the agents of the map | 307 """Read the agents of the map |
308 @param map_name: Name of the map | 308 @param map_name: Name of the map |
309 @type map_name: str """ | 309 @type map_name: str """ |
310 #Get the agents of the map | 310 #Get the agents of the map |
311 map_agents_file = self.map_files[map_name].\ | 311 map_agents_file = self.map_files[map_name].\ |
312 replace(".xml", "_agents.yaml") | 312 replace(".xml", "_agents.yaml") |
313 agents_data = vfs.VFS.open(map_agents_file) | 313 agents_data = vfs.VFS.open(map_agents_file) |
314 agents = yaml.load_all(agents_data) | 314 agents = yaml.load_all(agents_data) |
315 self.agents[map_name] = {} | |
315 for agent in agents: | 316 for agent in agents: |
316 if not agent == None: | 317 if not agent == None: |
317 self.addAgent(map_name, agent) | 318 self.addAgent(map_name, agent) |
318 | 319 |
319 def readAllAgents(self): | 320 def readAllAgents(self): |