Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CmdInhand(Command):
- key = 'inhand'
- aliases = 'inh'
- def func(self):
- caller = self.caller
- left_wield, right_wield, both_wield = caller.db.wielding.values()
- left_hand, right_hand = caller.db.hands.values()
- if left_hand:
- left_item = left_hand.name
- else:
- left_item = 'nothing'
- if right_hand:
- right_item = right_hand.name
- else:
- right_item = 'nothing'
- if not left_hand and not right_hand:
- caller.msg(f"Your hands are empty.")
- return
- if left_wield and not right_wield:
- caller.msg(f"You are wielding {left_item} in your left hand and holding {right_item} in your right hand.")
- elif right_wield and not left_wield:
- caller.msg(f"You are holding {left_item} in your left hand and wielding {right_item} in your right hand.")
- elif left_wield and right_wield:
- caller.msg(f"You are wielding {left_item} in your left hand and {right_item} in your right hand.")
- elif both_wield:
- caller.msg(f"You are wielding {right_item} in both hands.")
- else:
- caller.msg(f"You are holding {left_item} in your left hand and {right_item} in your right hand.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement