# HG changeset patch # User KarstenBock@gmx.net # Date 1316354827 -7200 # Node ID b764229a0fad2983875cb1b6573437f2e3c65868 # Parent 2e307c4f78e3cb8e9a961eeb181bc48fb8dfe16b Added ChangeMap component. diff -r 2e307c4f78e3 -r b764229a0fad src/parpg/components/__init__.py --- a/src/parpg/components/__init__.py Fri Sep 09 16:12:46 2011 +0200 +++ b/src/parpg/components/__init__.py Sun Sep 18 16:07:07 2011 +0200 @@ -7,4 +7,4 @@ from fifeagent import FifeAgent from lockable import Lockable from usable import Usable - \ No newline at end of file +from change_map import ChangeMap \ No newline at end of file diff -r 2e307c4f78e3 -r b764229a0fad src/parpg/components/change_map.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/parpg/components/change_map.py Sun Sep 18 16:07:07 2011 +0200 @@ -0,0 +1,22 @@ +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +from bGrease.component import Component +from bGrease.geometry import Vec2d + +class ChangeMap(Component): + """Component that allows an entity to be contained by Container entity.""" + + def __init__(self): + """Constructor""" + Component.__init__(self, target_map=str, target_position=list) \ No newline at end of file diff -r 2e307c4f78e3 -r b764229a0fad src/parpg/world.py --- a/src/parpg/world.py Fri Sep 09 16:12:46 2011 +0200 +++ b/src/parpg/world.py Sun Sep 18 16:07:07 2011 +0200 @@ -20,9 +20,7 @@ self.components.fifeagent = components.FifeAgent() self.components.lockable = components.Lockable() self.components.usable = components.Usable() - - #WORKAROUND: To get rid of exception in gamescenecontroller - self.components.change_map = Component() + self.components.change_map = components.ChangeMap() def pump(self, dt): for component in self.components: