view objects/components.py @ 11:fa8bb78832e6

Added basic components
author KarstenBock@gmx.net
date Mon, 25 Jul 2011 13:39:01 +0200
parents
children
line wrap: on
line source

#   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 <http://www.gnu.org/licenses/>.

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)