From acf6f5fdff46ce02e8d60e4c795a205a1dcca6d6 Mon Sep 17 00:00:00 2001 From: Patric Mueller Date: Wed, 1 Apr 2020 22:36:30 +0200 Subject: [PATCH] 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. --- doc/fixes37.0 | 1 + src/sp_lev.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index cbc857b6b..91115ec73 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -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 diff --git a/src/sp_lev.c b/src/sp_lev.c index 1a5a2ac02..a6a5b6599 100755 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -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) {