Manual:DIL Manual/illum
Jump to navigation
Jump to search
Contents
illum
Field (integer, read-only; units: all).
u.illum : integer
The part of a unit's bright that comes from what is inside it: the light that shines out of an open transparent container (a glass lantern with a candle in it). It is 0 for units that aren't transparent (UNIT_FL_TRANS in flags) or are closed.
u.bright - u.illum is the unit's own brightness.
Notes
- It can't be assigned (vmc: "Illegal lvalue").
- Setting or clearing
UNIT_FL_TRANSthrough.flagsin DIL doesn't recount the light; the wizardsetcommand does. - On null it fails.
Example
dilbegin shine_report(item : unitptr);
code
{
if (item.illum > 0)
act("Light shines out of $2n.", A_ALWAYS, self, item, null, TO_CHAR);
if (item.bright - item.illum > 0)
act("$2n itself is shining.", A_ALWAYS, self, item, null, TO_CHAR);
return;
}
dilend
Tells whether a container shines because of what is in it, or by itself.