annotate world.py @ 189:4381be70e1bb tip

Fixed incompatibility with latest changes to bgrease.
author Beliar <KarstenBock@gmx.net>
date Sun, 08 Apr 2012 20:30:43 +0200
parents 2a12e2843984
children
rev   line source
188
2a12e2843984 Removed bGrease, which is in a seperate repository, here: https://github.com/Beliaar/bGrease
Beliar <KarstenBock@gmx.net>
parents: 160
diff changeset
1 from bGrease.grease_fife.world import World
2a12e2843984 Removed bGrease, which is in a seperate repository, here: https://github.com/Beliaar/bGrease
Beliar <KarstenBock@gmx.net>
parents: 160
diff changeset
2 from bGrease.component import Component
65
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 63
diff changeset
3
188
2a12e2843984 Removed bGrease, which is in a seperate repository, here: https://github.com/Beliaar/bGrease
Beliar <KarstenBock@gmx.net>
parents: 160
diff changeset
4 from bGrease.grease_fife.mode import Mode
65
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 63
diff changeset
5 from parpg import components
160
75c0b728ccf3 Further work on the scripting system.
KarstenBock@gmx.net
parents: 157
diff changeset
6 from parpg.components.fifeagent import commands
157
79d6b17b80a3 Implemented simple script system.
KarstenBock@gmx.net
parents: 87
diff changeset
7 from parpg.systems import ScriptingSystem
160
75c0b728ccf3 Further work on the scripting system.
KarstenBock@gmx.net
parents: 157
diff changeset
8 from parpg.entities.action import ACTIONS
65
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 63
diff changeset
9
188
2a12e2843984 Removed bGrease, which is in a seperate repository, here: https://github.com/Beliaar/bGrease
Beliar <KarstenBock@gmx.net>
parents: 160
diff changeset
10 class PARPGWorld(World):
65
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 63
diff changeset
11
189
4381be70e1bb Fixed incompatibility with latest changes to bgrease.
Beliar <KarstenBock@gmx.net>
parents: 188
diff changeset
12 def __init__(self, engine):
4381be70e1bb Fixed incompatibility with latest changes to bgrease.
Beliar <KarstenBock@gmx.net>
parents: 188
diff changeset
13 '''
4381be70e1bb Fixed incompatibility with latest changes to bgrease.
Beliar <KarstenBock@gmx.net>
parents: 188
diff changeset
14 Constructor
4381be70e1bb Fixed incompatibility with latest changes to bgrease.
Beliar <KarstenBock@gmx.net>
parents: 188
diff changeset
15 @param engine: Instance of the active fife engine
4381be70e1bb Fixed incompatibility with latest changes to bgrease.
Beliar <KarstenBock@gmx.net>
parents: 188
diff changeset
16 @type engine: fife.Engine
4381be70e1bb Fixed incompatibility with latest changes to bgrease.
Beliar <KarstenBock@gmx.net>
parents: 188
diff changeset
17 '''
4381be70e1bb Fixed incompatibility with latest changes to bgrease.
Beliar <KarstenBock@gmx.net>
parents: 188
diff changeset
18 World.__init__(self, engine)
4381be70e1bb Fixed incompatibility with latest changes to bgrease.
Beliar <KarstenBock@gmx.net>
parents: 188
diff changeset
19
65
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 63
diff changeset
20
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 63
diff changeset
21 def configure(self):
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 63
diff changeset
22 """Configure the game world's components, systems and renderers"""
87
aed2e094e0c7 Changed way of setting the possible components of the world.
KarstenBock@gmx.net
parents: 86
diff changeset
23 for name, component in components.components.iteritems():
aed2e094e0c7 Changed way of setting the possible components of the world.
KarstenBock@gmx.net
parents: 86
diff changeset
24 setattr(self.components, name, component)
160
75c0b728ccf3 Further work on the scripting system.
KarstenBock@gmx.net
parents: 157
diff changeset
25 self.systems.scripting = ScriptingSystem(commands, ACTIONS)