



On page 93 of the DM4, the calling order of routines and properties for the
'Before' stage is defined as follows: 1. GamePreRoutine(). Nevertheless, in library 6/10 the steps 3 and 4 are executed in reverse order
(see BeforeRoutines in parserm.h).
In my opinion the order specified in the DM4 is more correct, before it gives
higher priority to the evaluation of the react_before of objects, allowing the
implementation of base behaviours for rooms, but letting objects override them
if necessary. My simple solution for what I think is a bug in the library is to 'replace'
BeforeRoutines in parserm.h with the following: which calls the before property of the current room after the react_before
properties of the objects in scope, as defined in the DM4.
About Patches
Issue L61027
Wrong execution order in 'Before' stage
Submitted by: Paolo Maroncelli
Appeared in: Library 6/10 or before
Fixed in: Library 6/11
Problem
2. orders of the player.
3. react_before of every object in scope.
4. before of the current room.
5. before of the first noun, if specified.Solution
[BeforeRoutines;
if (GamePreRoutine()~=0) rtrue;
if (RunRoutines(player,orders)~=0) rtrue;
scope_reason=REACT_BEFORE_REASON; parser_one=0;
SearchScope(ScopeCeiling(player),player,0);
scope_reason=PARSING_REASON;
if (parser_one~=0) rtrue;
if (location~=0 && RunRoutines(location,before)~=0) rtrue;
if (inp1>1 && RunRoutines(inp1,before)~=0) rtrue;
rfalse;
];
Last updated 2 May 2008. The librarian in charge of this page is Roger Firth. Please email any comments, suggestions or corrections to roger@firthworks.com.