Level compiler creates correct novel with supplied name

Before this commit, the name of a novel in the level files was ignored for
setting novelidx. But the name was set nevertheless, so you got a named novel
that showed quotes from a different novel.

Now, 'des.object({ id = "novel", name="Raising Steam"});' will work as
expected.
This commit is contained in:
Patric Mueller
2020-04-01 22:36:30 +02:00
parent 3bfb5a6c35
commit acf6f5fdff
2 changed files with 7 additions and 1 deletions

View File

@@ -97,6 +97,7 @@ impose tighter restraints on 'summon nasties', both for spellcasting monsters
prevent swallowing monster ending up in a solid wall if it killed vault guard
fix attached ball getting deallocated if swallowed, going down into a pit,
and saving
level compiler creates correct novel with supplied name
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository

View File

@@ -2102,8 +2102,13 @@ struct mkroom *croom;
}
/* set_corpsenm() took care of egg hatch and corpse timers */
if (named)
if (named) {
otmp = oname(otmp, o->name.str);
if (otmp->otyp == SPE_NOVEL) {
/* needs to be an existing title */
(void) lookup_novel(o->name.str, &otmp->novelidx);
}
}
if (o->eroded) {
if (o->eroded < 0) {