Mercurial > parpg-source
diff components/equip.py @ 117:f2ef124128db
Added belt and neck as equipment slots.
author | KarstenBock@gmx.net |
---|---|
date | Wed, 05 Oct 2011 10:54:56 +0200 |
parents | f94d4577ca5e |
children | fa5c769468f0 |
line wrap: on
line diff
--- a/components/equip.py Mon Oct 03 18:25:31 2011 +0200 +++ b/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):