Skip to content

Commit

Permalink
Let equip_unequip work on weapons (xbon)
Browse files Browse the repository at this point in the history
And fix the options_guide description for it being inaccurate.
  • Loading branch information
Chris Campbell committed Mar 27, 2018
1 parent 4a852b3 commit c4e68a0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions crawl-ref/docs/options_guide.txt
Expand Up @@ -970,9 +970,9 @@ easy_unequip = true
Allows auto removal of armour and jewellery when dropping it.

equip_unequip = false
If this is true, 'W'ear will also allow you to 'T'ake off worn
armour, and vice versa, and the same is true for 'P'utting on/
'R'emoving jewellery.
If this is true, selecting an already-equipped piece of equipment via
the 'w', 'W' or 'P' menus (for weapons, armour or jewellery
respectively) will unequip that item.

jewellery_prompt = false
If this is true, equipping rings will always prompt for the slot to
Expand Down
9 changes: 7 additions & 2 deletions crawl-ref/source/item-use.cc
Expand Up @@ -487,8 +487,13 @@ bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages,
return false;
else if (item_slot == you.equip[EQ_WEAPON])
{
mpr("You are already wielding that!");
return true;
if (Options.equip_unequip)
item_slot = SLOT_BARE_HANDS;
else
{
mpr("You are already wielding that!");
return true;
}
}

// Reset the warning counter.
Expand Down

0 comments on commit c4e68a0

Please sign in to comment.