Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue L61118     [previous patch]

'thedark.initial' is never called
Submitted by: Nathan Summers     Appeared in: Library 6/11 or before     Fixed in: -
Problem

The library thoughtfully provides thedark.initial, but it is never called unless you are diabolical enough to make thedark contained by some location, which I'm sure is not what it was meant for. The DM is a bit contradictory about the purpose of thedark.initial, but the functionality that makes the most sense is that it is called at the transition from lighted to darkened. This makes up a gap in functionality: NewRoom() is called on light-to-light and dark-to-light; DarkToDark() is called on dark-to-dark, but absolutely nothing is called on light-to-dark.

Solution

Move line 1962 of verblibm.h down two lines as shown:

  [ NoteArrival descin;
      if (location ~= lastdesc) {
          if (location.initial ~= 0) PrintOrRun(location, initial);
          if (location == thedark) { lastdesc = thedark; return; }   ! This line moved
          descin = location;
          NewRoom();
          lastdesc = descin;
      }
  ];


Last updated 17 April 2013. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Roger Firth.