Merge branch 'autounlock' of https://github.com/copperwater/NetHack into copperwater-autounlock-3.7

github pull request #228 commentary follows:

This adds a boolean option, autounlock, defaulting to true. When this is
set to TRUE, messages stating that some door or container is locked are
automatically followed by a prompt asking if you would like to unlock
it, if you are carrying an unlocking tool (key, lock pick, or credit
card).

Architecturally, this extends the pick_lock function to take three
additional arguments (door coordinates or a box on the ground you are
autounlocking).

Because this adds a new field to struct flag, this is not a
save-compatible change. I have not adjusted EDITLEVEL or
VERSION_COMPATIBILITY, though.

The code that selects an unlocking tool will always look first for a
skeleton key, then a lock pick, then a credit card. Since curses, rust,
and other attributes don't really have an effect on the viability of the
unlocking device, it didn't seem to warrant making a more complex
function for that.

closes #228
This commit is contained in:
nhmall
2019-10-02 13:47:33 -04:00
7 changed files with 58 additions and 17 deletions

View File

@@ -32,6 +32,7 @@ Platform- and/or Interface-Specific New Features
NetHack Community Patches (or Variation) Included
-------------------------------------------------
autounlock feature originally from unnethack in github pull request #228
Code Cleanup and Reorganization