# HG changeset patch # User KarstenBock@gmx.net # Date 1317804896 -7200 # Node ID f2ef124128db75e683495b4dfa2b8b2aa6576b01 # Parent 7f7f54c4077b29f9a0e41c5135497c3abe95f14c Added belt and neck as equipment slots. diff -r 7f7f54c4077b -r f2ef124128db components/equip.py --- 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):