Mercurial > parpg-core
changeset 147:3aff9dee1b4f
Added belt and neck as equipment slots.
author | KarstenBock@gmx.net |
---|---|
date | Wed, 05 Oct 2011 10:54:56 +0200 |
parents | 6e1eb964a6e5 |
children | 5756e615b029 |
files | src/parpg/components/equip.py |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parpg/components/equip.py Mon Oct 03 18:25:31 2011 +0200 +++ b/src/parpg/components/equip.py Wed Oct 05 10:54:56 2011 +0200 @@ -15,11 +15,12 @@ class Equip(Base): """ - Component that stores the equipment (what is being worn/wieled). + Component that stores the equipment (what is being worn/wielded). """ def __init__(self): - Base.__init__(self, head=object, body=object, leg=object, feet=object, l_arm=object, r_arm=object) + Base.__init__(self, head=object, neck=object, body=object, belt=object, + leg=object, feet=object, l_arm=object, r_arm=object) @property def saveable_fields(self): @@ -41,14 +42,17 @@ return "The equipable is already weared." class CannotBeEquippedInSlot(Exception): - """Error that gets raised when the equipable can't be equiped in that slot""" + """Error that gets raised when the equipable can't be equiped in that + slot""" def __init__(self, slot, equipable): self.slot = slot self.equipable = equipable def __str__(self): - return "%s is not in the equipables slots. (%s)" % (self.slot, ', '.join(self.equipable.possible_slots)) + return ("%s is not in the equipables slots. (%s)" % + (self.slot, ', '.join(self.equipable.possible_slots)) + ) def equip(wearer, equipable, slot):