Obey statue type gender
The gnome king statue in minetn-5 was generated as a gnome leader, obey the gender of the statue name, so generating a statue of for example "gnome king" and "gnome queen" works correctly.
This commit is contained in:
@@ -20,6 +20,7 @@ doc: use full URL for nethack.org in Guidebook.mn
|
|||||||
doc: fix a paste error in Guidebook.tex
|
doc: fix a paste error in Guidebook.tex
|
||||||
doc: fix spelling correction in nethack.6
|
doc: fix spelling correction in nethack.6
|
||||||
spelling: "Flanian Pobble Bead" to "Flainian Pobble Bead"
|
spelling: "Flanian Pobble Bead" to "Flainian Pobble Bead"
|
||||||
|
obey statue type gender (gnome king statue in minetn-5)
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+11
-6
@@ -3671,6 +3671,7 @@ lspo_object(lua_State *L)
|
|||||||
boolean nonpmobj = FALSE;
|
boolean nonpmobj = FALSE;
|
||||||
int i;
|
int i;
|
||||||
char *montype = get_table_str_opt(L, "montype", NULL);
|
char *montype = get_table_str_opt(L, "montype", NULL);
|
||||||
|
int lflags = 0;
|
||||||
|
|
||||||
if (montype) {
|
if (montype) {
|
||||||
if ((tmpobj.id == TIN && (!strcmpi(montype, "spinach")
|
if ((tmpobj.id == TIN && (!strcmpi(montype, "spinach")
|
||||||
@@ -3688,11 +3689,16 @@ lspo_object(lua_State *L)
|
|||||||
G_NOGEN | G_IGNORE);
|
G_NOGEN | G_IGNORE);
|
||||||
} else {
|
} else {
|
||||||
for (i = LOW_PM; i < NUMMONS; i++)
|
for (i = LOW_PM; i < NUMMONS; i++)
|
||||||
if (!strcmpi(mons[i].pmnames[NEUTRAL], montype)
|
if (!strcmpi(mons[i].pmnames[NEUTRAL], montype)) {
|
||||||
|| (mons[i].pmnames[MALE] != 0
|
pm = &mons[i];
|
||||||
&& !strcmpi(mons[i].pmnames[MALE], montype))
|
break;
|
||||||
|| (mons[i].pmnames[FEMALE] != 0
|
} else if (mons[i].pmnames[MALE] != 0
|
||||||
&& !strcmpi(mons[i].pmnames[FEMALE], montype))) {
|
&& !strcmpi(mons[i].pmnames[MALE], montype)) {
|
||||||
|
lflags |= CORPSTAT_MALE;
|
||||||
|
pm = &mons[i];
|
||||||
|
} else if (mons[i].pmnames[FEMALE] != 0
|
||||||
|
&& !strcmpi(mons[i].pmnames[FEMALE], montype)) {
|
||||||
|
lflags |= CORPSTAT_FEMALE;
|
||||||
pm = &mons[i];
|
pm = &mons[i];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -3704,7 +3710,6 @@ lspo_object(lua_State *L)
|
|||||||
nhl_error(L, "Unknown montype");
|
nhl_error(L, "Unknown montype");
|
||||||
}
|
}
|
||||||
if (tmpobj.id == STATUE || tmpobj.id == CORPSE) {
|
if (tmpobj.id == STATUE || tmpobj.id == CORPSE) {
|
||||||
int lflags = 0;
|
|
||||||
|
|
||||||
if (get_table_boolean_opt(L, "historic", 0))
|
if (get_table_boolean_opt(L, "historic", 0))
|
||||||
lflags |= CORPSTAT_HISTORIC;
|
lflags |= CORPSTAT_HISTORIC;
|
||||||
|
|||||||
Reference in New Issue
Block a user