comparison src/parpg/components/equipable.py @ 126:0ab8b61a8a56

Added saveable_fields to containable, dialogue and equipable.
author KarstenBock@gmx.net
date Tue, 27 Sep 2011 16:05:07 +0200
parents 3564a46544bc
children 90b49fda0340
comparison
equal deleted inserted replaced
125:d2008d4972c1 126:0ab8b61a8a56
9 # GNU General Public License for more details. 9 # GNU General Public License for more details.
10 # 10 #
11 # You should have received a copy of the GNU General Public License 11 # You should have received a copy of the GNU General Public License
12 # along with this program. If not, see <http://www.gnu.org/licenses/>. 12 # along with this program. If not, see <http://www.gnu.org/licenses/>.
13 13
14 from copy import deepcopy
15
14 from base import Base 16 from base import Base
15 17
16 class Equipable(Base): 18 class Equipable(Base):
17 """ 19 """
18 Component that stores the data for an entity that can be equipped. 20 Component that stores the data for an entity that can be equipped.
19 """ 21 """
20 22
21 def __init__(self): 23 def __init__(self):
22 Base.__init__(self, possible_slots=list, wearer=object, in_slot=str) 24 Base.__init__(self, possible_slots=list, wearer=object, in_slot=str)
25
26 @property
27 def saveable_fields(self):
28 fields = deepcopy(self.fields)
29 del fields["wearer"]
30 return fields