# HG changeset patch # User KarstenBock@gmx.net # Date 1311593941 -7200 # Node ID fa8bb78832e6d3c9aa4c597d2a9e4645c7ba994d # Parent e0477f8983cb123ce85547fe1d9977f1890393b9 Added basic components diff -r e0477f8983cb -r fa8bb78832e6 objects/components.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/objects/components.py Mon Jul 25 13:39:01 2011 +0200 @@ -0,0 +1,71 @@ +# This file is part of PARPG. + +# PARPG 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. + +# PARPG 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 PARPG. If not, see . + +from parpg.grease.component import Component +from parpg.grease.geometry import Vec2d + +""" Contains the components for PARPG +""" + +class FifeAgent(Component): + """Component that stores the values for a fife agent""" + + def __init__(self): + """Constructor""" + Component.__init__(identifier=int, layer=object, behaviour=object, gfx=str) + +class Description(Component): + """Component that stores the description of an object""" + + def __init__(self): + """Constructor""" + Component.__init__(view_name=str, real_name=str, desc=str) + +class Statistics(Component): + """Component that stores statistics""" + + def __init__(self): + """Constructor""" + Component.__init__(statistics=object) + +class Dialogue(Component): + """Component that stores the dialogue""" + + def __init__(self): + """Constructor""" + Component.__init__(dialogue=object) + +class Inventory(Component): + """Component that stores the inventory""" + + def __init__(self): + """Constructor""" + Component.__init__(inventory=object, hidden=bool) + +class Lock(Component): + """Component that stores the data of a lock""" + + def __init__(self): + """Constructor""" + Component.__init__(open=bool, locked=bool) + +class Item(Component): + """Component that stores the data of an item""" + + def __init__(self): + """Constructor""" + Component.__init__(bulk=int, weight=int, image=str, container=object) + + \ No newline at end of file