# HG changeset patch # User KarstenBock@gmx.net # Date 1316354827 -7200 # Node ID e2004c9549d7d20878c56bfa8e9909fae329ff71 # Parent 535801aec63ee22534132f83e680d4bb371b6fe8 Added ChangeMap component. diff -r 535801aec63e -r e2004c9549d7 components/__init__.py --- a/components/__init__.py Fri Sep 09 16:12:46 2011 +0200 +++ b/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 535801aec63e -r e2004c9549d7 components/change_map.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/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 535801aec63e -r e2004c9549d7 world.py --- a/world.py Fri Sep 09 16:12:46 2011 +0200 +++ b/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: