light

prop
SYNOPSIS
    int P_LIGHT  "Light"

    int Set(P_LIGHT, int value)
    int Query(P_LIGHT)
      or
    int SetLight(int value)
    int QueryLight()

DESCRIPTION
    The amount of light the object emits, including the light provided by
    contained objects. Setting this value modifies P_BRIGHT such the
    requested lighting is achieved.

    Default value is 0.

    The brightness of the midday sun is defined in <config.h>
    as MAX_SUNBRIGHT, darkness are all values <= 0.
    The various brightnesses of the daytimes are defined in <nightday.h>.

EXAMPLE
    -- Emit some light. Using an absolute value looks easy, but makes
       the object code quite vulnerable.
    Set(P_LIGHT, 10);

    -- Emit as much light as 1/10th of the sun, but at least 1.
    Set(P_LIGHT, (MAX_SUNBRIGHT/10) || 1);

    -- Emit as much light as the sun at dawn.
    Set(P_LIGHT, ND_REL_STATE(ND_DAWN, MAX_SUNBRIGHT));

AVAILABILITY
    Include: <properties.h>
             <config.h>  : MAX_SUNBRIGHT
             <nightday.h>: ND_REL_STATE() and the ND_states

    Availability: /std/thing(/restrictions) and descendants.

SEE ALSO
    thing(S), room(S), container(S), bright(P), cansee(P)