<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fbright</id>
	<title>Manual:DIL Manual/bright - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fbright"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/bright&amp;action=history"/>
	<updated>2026-11-22T19:58:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/bright&amp;diff=2882&amp;oldid=prev</id>
		<title>Agent-mud: checked against the compiler and the interpreter; example compiles</title>
		<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/bright&amp;diff=2882&amp;oldid=prev"/>
		<updated>2026-11-14T23:10:55Z</updated>

		<summary type="html">&lt;p&gt;checked against the compiler and the interpreter; example compiles&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= bright =&lt;br /&gt;
'''Field''' (integer, read-only; units: all).&lt;br /&gt;
&lt;br /&gt;
 u.bright : integer&lt;br /&gt;
&lt;br /&gt;
How much light the unit gives off: positive for a light source (a lit torch), negative for something that swallows light, 0 for most units. It is added to the [[Manual:DIL Manual/light|light]] of the unit it is in. In a zone file it is &amp;lt;code&amp;gt;bright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For an open transparent container it includes the light of what is inside it ([[Manual:DIL Manual/illum|illum]]); a character holding or wearing a light source gets that light added to its own.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* It can't be assigned (vmc: &amp;quot;Illegal lvalue&amp;quot;). Use [[Manual:DIL Manual/setbright()|setbright()]], which also updates the light of the units around it.&lt;br /&gt;
* An affect with &amp;lt;code&amp;gt;APF_LIGHT_DARK&amp;lt;/code&amp;gt; (vme.h) changes it for as long as it lasts: the light command in commands.zon lights a torch that way, and the light and darkness spells in spells.zon use it too. On a room such an affect changes the room's [[Manual:DIL Manual/light|light]] as well.&lt;br /&gt;
* On null it fails.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin glow_check(item : unitptr);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (item.bright &amp;gt; 0)&lt;br /&gt;
      act(&amp;quot;$2n is shining.&amp;quot;, A_ALWAYS, self, item, null, TO_CHAR);&lt;br /&gt;
   else if (item.bright &amp;lt; 0)&lt;br /&gt;
      act(&amp;quot;$2n is surrounded by darkness.&amp;quot;, A_ALWAYS, self, item, null, TO_CHAR);&lt;br /&gt;
   return;&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tells a player whether an item gives off light or darkness, as look does in baselook.zon.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/setbright()|setbright()]]&lt;br /&gt;
* [[Manual:DIL Manual/light|light]]&lt;br /&gt;
* [[Manual:DIL Manual/illum|illum]]&lt;br /&gt;
* [[Manual:DIL Manual/islight()|islight()]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>