From: PatR Date: Tue, 28 Jan 2020 23:28:31 +0000 (-0800) Subject: level teleport "you materialize" mesg sequencing X-Git-Tag: NetHack-3.7.0_WIP-2020-02-14~112^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e59f0ead98db2a73f597891a054b76c00aaafa3;p=nethack level teleport "you materialize" mesg sequencing If level teleport took you somewhere special, things like shop entry or quest summons or valley atmosphere messages were being given first, then "you materialize on a different level" after. schedule_goto() takes before-change-message and after-change-message arguments; it ought to be extended to have a mid-change-message one too but I didn't think of that until just now. --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 87f07e67f..c6de9e03b 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.79 $ $NHDT-Date: 1580252492 2020/01/28 23:01:32 $ +$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.80 $ $NHDT-Date: 1580254093 2020/01/28 23:28:13 $ General Fixes and Modified Features ----------------------------------- @@ -76,6 +76,8 @@ data.base lookup of an entry with any blank lines would falsely claim that "'data' file in wrong fromat or corrupted" after some extra checks were added while investigating tab handling anomalies using nhl_error() to report a Lua processing problem would clobber the stack +level teleporation's "You materialize on a different level!" could be given + out of sequence with other arrival messages Platform- and/or Interface-Specific Fixes diff --git a/src/do.c b/src/do.c index 0f0a08a30..69734ed6c 100644 --- a/src/do.c +++ b/src/do.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do.c $NHDT-Date: 1577063925 2019/12/23 01:18:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.220 $ */ +/* NetHack 3.6 do.c $NHDT-Date: 1580254093 2020/01/28 23:28:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.221 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1615,6 +1615,13 @@ boolean at_stairs, falling, portal; * Move all plines beyond the screen reset. */ + /* deferred arrival message for level teleport looks odd if given + after the various messages below so give it before them */ + if (g.dfr_post_msg && !strncmpi(g.dfr_post_msg, "You materialize", 15)) { + pline("%s", g.dfr_post_msg); + free((genericptr_t) g.dfr_post_msg), g.dfr_post_msg = 0; + } + /* special levels can have a custom arrival message */ deliver_splev_message(); @@ -1699,9 +1706,11 @@ boolean at_stairs, falling, portal; || g.quest_status.leader_is_dead)) { if (!u.uevent.qcalled) { u.uevent.qcalled = 1; - com_pager("quest_portal"); /* main "leader needs help" message */ - } else { /* reminder message */ - com_pager(Role_if(PM_ROGUE) ? "quest_portal_demand" : "quest_portal_again"); + /* main "leader needs help" message */ + com_pager("quest_portal"); + } else { /* reminder message */ + com_pager(Role_if(PM_ROGUE) ? "quest_portal_demand" + : "quest_portal_again"); } } }