itsapi / pycraft

A Minecraft-inspired game for the terminal
GNU General Public License v2.0
198 stars 21 forks source link

Simplify "Use" action #147

Open olls opened 6 years ago

olls commented 6 years ago

Using the h button to attack mobs is a bit clunky, as it is out of the way of the commonly used inputs. Intelligently using the k "use" button to attack when within range of an attack-able entity would make defending yourself much less frustrating.

This would also work nicely with a weapons system. If we created designated inventory slots with set purposes: weapon, tool, food; then pick which of those slots to use when the user presses k depending on the context. If the cursor is selecting a block, use the tool, otherwise use the weapon?

Having a separate key for eating makes more sense than for attacking, as there is not much detectable context for determining when the user wants to eat.