Skip to content

Commit 61fbd17

Browse files
committed
equip check if item is carryable
fixes #27
1 parent 5087946 commit 61fbd17

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/fantasy_forge/player.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ def equip(self, item_name: str):
153153
self.seen_entities.pop(item_name)
154154
return
155155

156+
if not isinstance(item, Item) or not item.carryable:
157+
self.messages.to([self], "pick-up-failed-message")
158+
return
159+
156160
# by equipping the item is implicitly picked up
157161
if item not in self.inventory.contents.values():
158162
# if it's not already in the inventory, place it there

0 commit comments

Comments
 (0)