comparison src/parpg/components/containable.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 Containable(Base): 18 class Containable(Base):
17 """Component that allows an entity to be contained by Container entity.""" 19 """Component that allows an entity to be contained by Container entity."""
18 20
19 def __init__(self): 21 def __init__(self):
20 """Constructor""" 22 """Constructor"""
21 Base.__init__(self, bulk=int, weight=int, item_type=str, image=str, container=object, slot=int) 23 Base.__init__(self, bulk=int, weight=int, item_type=str, image=str, container=object, slot=int)
24
25 @property
26 def saveable_fields(self):
27 fields = deepcopy(self.fields)
28 del fields["container"]
29 return fields