# HG changeset patch # User KarstenBock@gmx.net # Date 1311593941 -7200 # Node ID 32d8b4dd9d99b2db9942369948dd36023fb35464 # Parent 70738c470ad7765a1978d781aa6ef357665c4334 Added basic components diff -r 70738c470ad7 -r 32d8b4dd9d99 src/parpg/objects/components.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/parpg/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