Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing parserm.h

HasLightSource (lines 4174-4194)

4174  [ HasLightSource i j ad;
4175     if (i==0) rfalse;
4176     if (i has light) rtrue;
4177     if (i has enterable || IsSeeThrough(i)==1)
4178         if (~~(HidesLightSource(i)))
4179             objectloop (j in i)
4180                 if (HasLightSource(j)==1) rtrue;
4181     ad = i.&add_to_scope;
4182     if (parent(i)~=0 && ad ~= 0)
4183     {   if (metaclass(ad-->0) == Routine)
4184         {   ats_hls = 0; ats_flag = 1;
4185             RunRoutines(i, add_to_scope);
4186             ats_flag = 0; if (ats_hls == 1) rtrue;
4187         }
4188         else
4189         {   for (j=0:(2*j)<i.#add_to_scope:j++)
4190                 if (HasLightSource(ad-->j)==1) rtrue;
4191         }
4192     }
4193     rfalse;
4194  ];


Last updated 27 February 2004. 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 Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.