goodbye END-CHOOSE
Instead of an additional options file directive to end the last section of a CHOOSE directive, simplify by using an empty-name section, [], instead. So ... CHOOSE one,two [one] ... [two] ... [] ... As with the short-lived END-CHOOSE directive, if no [] is present then the rest of the file is part of the last choice.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.\" $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.394 $ $NHDT-Date: 1596754607 2020/08/06 22:56:47 $
|
||||
.\" $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.395 $ $NHDT-Date: 1596785362 2020/08/07 07:29:22 $
|
||||
.\"
|
||||
.\" This is an excerpt from the 'roff' man page from the 'groff' package.
|
||||
.\" Guidebook.mn currently does *not* fully adhere to these guidelines.
|
||||
@@ -3130,16 +3130,20 @@ the configuration file for you using the default template file.
|
||||
.pg
|
||||
On MS-DOS, it is \(lqdefaults.nh\(rq in the same folder as nethack.exe.
|
||||
.pg
|
||||
Any line in the configuration file starting with \(oq#\(cq is treated
|
||||
as a comment.
|
||||
Any line in the configuration file starting with \(oq\f(CR#\fP\(cq is treated
|
||||
as a comment and ignored.
|
||||
Empty lines are ignored.
|
||||
.pg
|
||||
Any line beginning with \(oq[\(cq and ending in \(oq]\(cq is considered
|
||||
a section marker.
|
||||
Any line beginning with \(oq\f(CR[\fP\(cq and ending in \(oq\f(CR]\fP\(cq
|
||||
is a section marker (the closing \(oq\f(CR]\fP\(cq can be followed
|
||||
by whitespace and then an arbitrary comment beginning with \(oq\f(CR#\fP\(cq).
|
||||
The text between the square brackets is the section name.
|
||||
Lines after a section marker belong to that section, and are
|
||||
ignored unless a CHOOSE directive was used to select that section.
|
||||
Section names are case insensitive.
|
||||
Section markers are only valid after a CHOOSE directive and their names
|
||||
are case insensitive.
|
||||
Lines after a section marker belong to that section up until another
|
||||
section starts or a marker without a name is encountered or the file ends.
|
||||
Lines within sections are ignored unless a CHOOSE directive has selected
|
||||
that section.
|
||||
.pg
|
||||
You can use different configuration directives in the file, some
|
||||
of which can be used multiple times.
|
||||
@@ -3232,17 +3236,13 @@ CHOOSE=char A,char B
|
||||
OPTIONS=role:arc,race:dwa,align:law,gender:fem
|
||||
[char B]
|
||||
OPTIONS=role:wiz,race:elf,align:cha,gender:mal
|
||||
END-CHOOSE
|
||||
[] #end of CHOOSE
|
||||
OPTIONS=!rest_on_space
|
||||
.ft \" revert to previous font
|
||||
.ed
|
||||
.lp END-CHOOSE
|
||||
An optional way to terminate CHOOSE.
|
||||
.\" use of the \% prefix prevents END-CHOOSE from being hyphenated across
|
||||
.\" line boundary despite its hyphen; needed for the plain text output to
|
||||
.\" avoid splitting the directive name
|
||||
You can place an \%END-CHOOSE directive after the last CHOOSE section in
|
||||
order to follow that with other options which are common to all sections.
|
||||
.lp ""
|
||||
If \f(CR[]\fP is present, the preceding section is closed and no new
|
||||
section begins; whatever follows will be common to all sections.
|
||||
Otherwise the last section extends to the end of the options file.
|
||||
.lp MENUCOLOR
|
||||
Highlight menu lines with different colors.
|
||||
|
||||
@@ -3355,12 +3355,20 @@ On MS-DOS it is \mbox{``defaults.nh''} in the same folder as
|
||||
\mbox{{\it nethack.exe\/}}.\\
|
||||
|
||||
%.lp ""
|
||||
Any line in the configuration file starting with `{\tt \#}' is treated as a comment.
|
||||
Empty lines are ignored. Any line beginning with `{\tt [}' and ending in `{\tt ]}' is considered a section
|
||||
marker. The text between the square brackets is the section name.
|
||||
Lines after a section marker belong to that section, and are
|
||||
ignored unless a CHOOSE -directive was used to select that section.
|
||||
Section names are case insensitive.
|
||||
Any line in the configuration file starting with `{\tt \#}' is treated
|
||||
as a comment and ignored.
|
||||
Empty lines are ignored.
|
||||
|
||||
Any line beginning with `{\tt [}' and ending in `{\tt ]}'
|
||||
is a section marker (the closing `{\tt ]}' can be followed
|
||||
by whitespace and then an arbitrary comment beginning with `{\tt #}').
|
||||
The text between the square brackets is the section name.
|
||||
Section markers are only valid after a CHOOSE directive and their names
|
||||
are case insensitive.
|
||||
Lines after a section marker belong to that section up until another
|
||||
section starts or a marker without a name is encountered or the file ends.
|
||||
Lines within sections are ignored unless a CHOOSE directive has selected
|
||||
that section.
|
||||
|
||||
%.pg
|
||||
You can use different configuration directives in the file, some
|
||||
@@ -3474,16 +3482,14 @@ Example:
|
||||
OPTIONS=role:arc,race:dwa,align:law,gender:fem
|
||||
[char B]
|
||||
OPTIONS=role:wiz,race:elf,align:cha,gender:mal
|
||||
END-CHOOSE
|
||||
[] #end of CHOOSE
|
||||
OPTIONS=!rest_on_space
|
||||
\end{verbatim}
|
||||
%.ed
|
||||
|
||||
%.lp
|
||||
\item[\bb{END-CHOOSE}]
|
||||
An optional way to terminate CHOOSE.
|
||||
You can place an END-CHOOSE directive after the last CHOOSE section in
|
||||
order to follow that with other options which are common to all sections.
|
||||
%.lp ""
|
||||
If {\tt []} is present, the preceding section is closed and no new
|
||||
section begins; whatever follows will be common to all sections.
|
||||
Otherwise the last section extends to the end of the options file.
|
||||
|
||||
%.lp
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.275 $ $NHDT-Date: 1596754606 2020/08/06 22:56:46 $
|
||||
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.276 $ $NHDT-Date: 1596785361 2020/08/07 07:29:21 $
|
||||
|
||||
General Fixes and Modified Features
|
||||
-----------------------------------
|
||||
@@ -459,11 +459,11 @@ add 'Sokoban' conduct, tracking the number of times the special Sokoban rules
|
||||
reduce verbosity when a mind flayer attacks a headless monster; when a
|
||||
tentacle-to-head attack hits but fails to accomplish anything skip
|
||||
remaining attacks (mind flayer has 3, master mind flayer has 5)
|
||||
add END-CHOOSE directive for run-time config file; CHOOSE section1,section2
|
||||
add section marker [] support to run-time config file; CHOOSE section1,section2
|
||||
followed by [section1] ... [section2] ... forced all the rest of the
|
||||
file to be part of the last section; that still works the same but
|
||||
END-CHOOSE can be used to terminate the last section and revert to
|
||||
common options for the remainder of the file
|
||||
file to be part of the last section; that still works the same, but []
|
||||
can be used to terminate the last section and revert to common options
|
||||
for the remainder of the file
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific New Features
|
||||
|
||||
Reference in New Issue
Block a user