<?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%2Fcapacity</id>
	<title>Manual:DIL Manual/capacity - 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%2Fcapacity"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/capacity&amp;action=history"/>
	<updated>2026-11-22T21:11:28Z</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/capacity&amp;diff=2895&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/capacity&amp;diff=2895&amp;oldid=prev"/>
		<updated>2026-11-14T23:11:34Z</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;= capacity =&lt;br /&gt;
'''Field''' (integer, read/write; units: all).&lt;br /&gt;
&lt;br /&gt;
 u.capacity : integer&lt;br /&gt;
&lt;br /&gt;
How much the unit can hold inside it, in pounds: the &amp;lt;code&amp;gt;capacity&amp;lt;/code&amp;gt; line in the zone file, 0 when it has none. The put command (baseget.zon) and enter (basemove.zon) compare it with what is inside, &amp;lt;code&amp;gt;u.weight - u.baseweight&amp;lt;/code&amp;gt;; for a drink container it is how much liquid fits. The server itself checks it before a unit is teleported into another.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* It is not a character's carry limit: that comes from Strength and body weight, see [[Manual:DIL Manual/can carry()|can_carry()]].&lt;br /&gt;
* &amp;lt;code&amp;gt;INFINITE_CAPACITY&amp;lt;/code&amp;gt; (-1, vme.h) is allowed in the zone file, but the comparisons in the DIL commands don't treat it specially.&lt;br /&gt;
* Stored as a signed 16-bit number: values outside -32768 to 32767 wrap around.&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 string how_full(u : unitptr);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (u.objecttype != ITEM_DRINKCON)&lt;br /&gt;
      return (&amp;quot;&amp;quot;);&lt;br /&gt;
   if (u.value[0] &amp;gt;= u.capacity)&lt;br /&gt;
      return (&amp;quot;It is full.&amp;quot;);&lt;br /&gt;
   else if (u.value[0] &amp;gt; (u.capacity / 2))&lt;br /&gt;
      return (&amp;quot;It is more than half full.&amp;quot;);&lt;br /&gt;
   else if (u.value[0] &amp;gt; 0)&lt;br /&gt;
      return (&amp;quot;It is less than half full.&amp;quot;);&lt;br /&gt;
   return (&amp;quot;It is empty.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Describes how full a drink container is, as liq_content in baselook.zon.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/weight|weight]]&lt;br /&gt;
* [[Manual:DIL Manual/baseweight|baseweight]]&lt;br /&gt;
* [[Manual:DIL Manual/value|value]]&lt;br /&gt;
* [[Manual:DIL Manual/can carry()|can_carry()]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>