role,race,&c options: environment vs config file

Due to the unorthodox values for role, race, gender, and alignment,
specifying a negated value or set of values in NETHACKOPTIONS wasn't
overriding a specific value set in the run-time config file.  The
command line should take priority, then environment, then config file,
lastly builtin defaults.

This could probably use some improvement.  It now treats role:!val
as if there was no val role and the entry was role:random rather than
previous role:none (affects prompting).

[I've just realized that role:!foo in environment will be combined
with role:!bar in config file rather than replacing it.  I'm not sure
how to deal with that.]
This commit is contained in:
PatR
2022-12-15 15:56:52 -08:00
parent df7e575500
commit dfa5bb5941
2 changed files with 14 additions and 0 deletions

View File

@@ -1070,6 +1070,8 @@ throwing recoil while levitating could send hero out of shop while carrying
a step other than back into the shop was treated as a robbery
if punished and iron ball was cursed and wielded--so welded to hand--falling
when doors would drop it instead of keeping it welded
if player's run-time config file had OPTIONS=role:Val and the environment had
NETHACKOPTIONS='role:!Val' the hero would be a Val instead of !Val
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository