comparison src/parpg/objects/components.py @ 33:32d8b4dd9d99

Added basic components
author KarstenBock@gmx.net
date Mon, 25 Jul 2011 13:39:01 +0200
parents
children
comparison
equal deleted inserted replaced
32:70738c470ad7 33:32d8b4dd9d99
1 # This file is part of PARPG.
2
3 # PARPG is free software: you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation, either version 3 of the License, or
6 # (at your option) any later version.
7
8 # PARPG is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12
13 # You should have received a copy of the GNU General Public License
14 # along with PARPG. If not, see <http://www.gnu.org/licenses/>.
15
16 from parpg.grease.component import Component
17 from parpg.grease.geometry import Vec2d
18
19 """ Contains the components for PARPG
20 """
21
22 class FifeAgent(Component):
23 """Component that stores the values for a fife agent"""
24
25 def __init__(self):
26 """Constructor"""
27 Component.__init__(identifier=int, layer=object, behaviour=object, gfx=str)
28
29 class Description(Component):
30 """Component that stores the description of an object"""
31
32 def __init__(self):
33 """Constructor"""
34 Component.__init__(view_name=str, real_name=str, desc=str)
35
36 class Statistics(Component):
37 """Component that stores statistics"""
38
39 def __init__(self):
40 """Constructor"""
41 Component.__init__(statistics=object)
42
43 class Dialogue(Component):
44 """Component that stores the dialogue"""
45
46 def __init__(self):
47 """Constructor"""
48 Component.__init__(dialogue=object)
49
50 class Inventory(Component):
51 """Component that stores the inventory"""
52
53 def __init__(self):
54 """Constructor"""
55 Component.__init__(inventory=object, hidden=bool)
56
57 class Lock(Component):
58 """Component that stores the data of a lock"""
59
60 def __init__(self):
61 """Constructor"""
62 Component.__init__(open=bool, locked=bool)
63
64 class Item(Component):
65 """Component that stores the data of an item"""
66
67 def __init__(self):
68 """Constructor"""
69 Component.__init__(bulk=int, weight=int, image=str, container=object)
70
71