diff --git a/src/inventory.cpp b/src/inventory.cpp index a7ef5d0542694..822b24dd7ba33 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -44,6 +44,10 @@ struct itype; const invlet_wrapper inv_chars( "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#&()+.:;=@[\\]^_{|}" ); +// chars to skip for auto inventory +const std::string +inv_chars_no_auto("hjkl"); + bool invlet_wrapper::valid( const int invlet ) const { if( invlet > std::numeric_limits::max() || invlet < std::numeric_limits::min() ) { @@ -1041,6 +1045,10 @@ void inventory::assign_empty_invlet( item &it, const Character &p, const bool fo // don't overwrite assigned keys continue; } + if( inv_chars_no_auto.find( static_cast( inv_char ) ) != std::string::npos ) { + // don't auto-assign certain keys + continue; + } if( !cur_inv[inv_char] ) { it.invlet = inv_char; return;