changeset 11:fa8bb78832e6

Added basic components
author KarstenBock@gmx.net
date Mon, 25 Jul 2011 13:39:01 +0200
parents e0477f8983cb
children 9c7a96c6fe41
files objects/components.py
diffstat 1 files changed, 71 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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 <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)     
+    
+    
\ No newline at end of file