lama-0.8a/
lama-0.8a/data/character/
lama-0.8a/data/class/
lama-0.8a/data/map/
lama-0.8a/data/race/
lama-0.8a/doc/
lama-0.8a/log/
lama-0.8a/src/
lama-0.8a/src/ext/
lama-0.8a/txt/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <title>Reference</title>
    <link rel="stylesheet" href="../luadoc.css" type="text/css" />
	<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>

<body>
<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->

<div id="main">

<div id="navigation">


<h1>LuaDoc</h1>
<ul>
	
	<li><a href="../index.html">Index</a></li>
	
</ul>


<!-- Module list -->

<h1>Modules</h1>
<ul>

	<li>
		<a href="../modules/CharacterManager.html">CharacterManager</a>
	</li>

	<li>
		<a href="../modules/Direction.html">Direction</a>
	</li>

	<li>
		<a href="../modules/Game.html">Game</a>
	</li>

	<li>
		<a href="../modules/GameState.html">GameState</a>
	</li>

	<li>
		<a href="../modules/MessageMode.html">MessageMode</a>
	</li>

	<li>
		<a href="../modules/Nanny.html">Nanny</a>
	</li>

	<li>
		<a href="../modules/PlayerState.html">PlayerState</a>
	</li>

	<li>
		<a href="../modules/Telnet.html">Telnet</a>
	</li>

	<li>
		<a href="../modules/config.html">config</a>
	</li>

	<li>
		<a href="../modules/ext.string.html">ext.string</a>
	</li>

	<li>
		<a href="../modules/ext.table.html">ext.table</a>
	</li>

	<li>
		<a href="../modules/main.html">main</a>
	</li>

	<li>
		<a href="../modules/obj.Client.html">obj.Client</a>
	</li>

	<li>
		<a href="../modules/obj.Cloneable.html">obj.Cloneable</a>
	</li>

	<li>
		<a href="../modules/obj.Command.html">obj.Command</a>
	</li>

	<li>
		<a href="../modules/obj.CommandParser.html">obj.CommandParser</a>
	</li>

	<li>
		<a href="../modules/obj.Event.html">obj.Event</a>
	</li>

	<li><strong>obj.Map</strong></li>
	
	<li>
		<a href="../modules/obj.MapObject.html">obj.MapObject</a>
	</li>

	<li>
		<a href="../modules/obj.MapTile.html">obj.MapTile</a>
	</li>

	<li>
		<a href="../modules/obj.Mob.html">obj.Mob</a>
	</li>

	<li>
		<a href="../modules/obj.Player.html">obj.Player</a>
	</li>

	<li>
		<a href="../modules/obj.Scheduler.html">obj.Scheduler</a>
	</li>

	<li>
		<a href="../modules/obj.Server.html">obj.Server</a>
	</li>

</ul>



<!-- File list -->






</div><!-- id="navigation" -->

<div id="content">

<h1>Module <code>obj.Map</code></h1>

<p>Cloneable that handles map data and processing.</p>


<p><b>Author:</b>
<table class="authors_list">

	<tr><td class="name">milkmanjack</td></tr>

</table>
</p>





<h2>Functions</h2>
<table class="function_list">

	<tr>
	<td class="name" nowrap><a href="#Map:addToContents">Map:addToContents</a>&nbsp;(mapObject)</td>
	<td class="summary">Adds a MapObject to our contents.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Map:contains">Map:contains</a>&nbsp;(mapObject)</td>
	<td class="summary">Check if a Map contains a MapObject.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Map:generate">Map:generate</a>&nbsp;(width, height, layers)</td>
	<td class="summary">Generates a new map of the given dimensions.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Map:getContents">Map:getContents</a>&nbsp;()</td>
	<td class="summary">Gets contents list.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Map:getHeight">Map:getHeight</a>&nbsp;()</td>
	<td class="summary">Gets height of map.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Map:getLayers">Map:getLayers</a>&nbsp;()</td>
	<td class="summary">Gets layer count of map.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Map:getStep">Map:getStep</a>&nbsp;(mapObject, direction, The)</td>
	<td class="summary">Gets the tile in the given direction from a MapObject.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Map:getTile">Map:getTile</a>&nbsp;(x, y, z)</td>
	<td class="summary">Get a tile at the given XYZ location.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Map:getTiles">Map:getTiles</a>&nbsp;()</td>
	<td class="summary">Gets tile list.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Map:getWidth">Map:getWidth</a>&nbsp;()</td>
	<td class="summary">Gets width of map.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Map:initialize">Map:initialize</a>&nbsp;()</td>
	<td class="summary">Creates a unique contents table for each Map.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Map:removeFromContents">Map:removeFromContents</a>&nbsp;(mapObject)</td>
	<td class="summary">Removes a MapObject from our contents.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Map:setTile">Map:setTile</a>&nbsp;(tile, x, y, z)</td>
	<td class="summary">Assign a MapTile to a given XYZ location.</td>
	</tr>

</table>



<h2>Tables</h2>
<table class="table_list">

	<tr>
	<td class="name" nowrap><a href="#Map">Map</a></td>
	<td class="summary">Cloneable that handles map data and processing.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Map.contents">Map.contents</a></td>
	<td class="summary">Contains every MapObject within the Map, including MapTiles.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#Map.tiles">Map.tiles</a></td>
	<td class="summary">A 3D grid containing all of the MapTiles within a Map.</td>
	</tr>

</table>



<br/>
<br/>



<h2><a name="functions"></a>Functions</h2>
<dl class="function">



<dt><a name="Map:addToContents"></a><strong>Map:addToContents</strong>&nbsp;(mapObject)</dt>
<dd>
Adds a MapObject to our contents. MapObjects and Maps share mutual references to each other. If a MapObject is added to a Map's contents, the MapObject's map is set to it, and it is removed from whatever map it was in previously.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>mapObject</em></code>: MapObject to be added.
	</li>
	
</ul>








</dd>




<dt><a name="Map:contains"></a><strong>Map:contains</strong>&nbsp;(mapObject)</dt>
<dd>
Check if a Map contains a MapObject.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>mapObject</em></code>: The MapObject to check for.
	</li>
	
</ul>






<h3>Return value:</h3>
<ul>true if the Map contains it.<br/>false otherwise.</ul>



</dd>




<dt><a name="Map:generate"></a><strong>Map:generate</strong>&nbsp;(width, height, layers)</dt>
<dd>
Generates a new map of the given dimensions.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>width</em></code>: Width of the map.
	</li>
	
	<li>
	  <code><em>height</em></code>: Height of the map.
	</li>
	
	<li>
	  <code><em>layers</em></code>: Layers of the map.
	</li>
	
</ul>








</dd>




<dt><a name="Map:getContents"></a><strong>Map:getContents</strong>&nbsp;()</dt>
<dd>
Gets contents list.







<h3>Return value:</h3>
<ul>Contents list.</ul>



</dd>




<dt><a name="Map:getHeight"></a><strong>Map:getHeight</strong>&nbsp;()</dt>
<dd>
Gets height of map.







<h3>Return value:</h3>
<ul>Height of map.</ul>



</dd>




<dt><a name="Map:getLayers"></a><strong>Map:getLayers</strong>&nbsp;()</dt>
<dd>
Gets layer count of map.







<h3>Return value:</h3>
<ul>Layer count of map.</ul>



</dd>




<dt><a name="Map:getStep"></a><strong>Map:getStep</strong>&nbsp;(mapObject, direction, The)</dt>
<dd>
Gets the tile in the given direction from a MapObject.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>mapObject</em></code>: A MapObject on the Map.
	</li>
	
	<li>
	  <code><em>direction</em></code>: A direction. Always a member of the Direction table.
	</li>
	
	<li>
	  <code><em>The</em></code>: MapTile in the given direction.<br/>nil if none is found.
	</li>
	
</ul>








</dd>




<dt><a name="Map:getTile"></a><strong>Map:getTile</strong>&nbsp;(x, y, z)</dt>
<dd>
Get a tile at the given XYZ location.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>x</em></code>: X to check.
	</li>
	
	<li>
	  <code><em>y</em></code>: Y to check.
	</li>
	
	<li>
	  <code><em>z</em></code>: Z to check.
	</li>
	
</ul>






<h3>Return value:</h3>
<ul>MapTile if tile is found.<br/>nil otherwise.</ul>



</dd>




<dt><a name="Map:getTiles"></a><strong>Map:getTiles</strong>&nbsp;()</dt>
<dd>
Gets tile list.







<h3>Return value:</h3>
<ul>Tile list.</ul>



</dd>




<dt><a name="Map:getWidth"></a><strong>Map:getWidth</strong>&nbsp;()</dt>
<dd>
Gets width of map.







<h3>Return value:</h3>
<ul>Width of map.</ul>



</dd>




<dt><a name="Map:initialize"></a><strong>Map:initialize</strong>&nbsp;()</dt>
<dd>
Creates a unique contents table for each Map.









</dd>




<dt><a name="Map:removeFromContents"></a><strong>Map:removeFromContents</strong>&nbsp;(mapObject)</dt>
<dd>
Removes a MapObject from our contents. MapObjects and Maps share mutual references to each other. If a MapObject is removed from a Map's contents, the MapObject's map is set to nil, and it is removed from any location in that map.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>mapObject</em></code>: MapObject to be removed.
	</li>
	
</ul>








</dd>




<dt><a name="Map:setTile"></a><strong>Map:setTile</strong>&nbsp;(tile, x, y, z)</dt>
<dd>
Assign a MapTile to a given XYZ location.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>tile</em></code>: The tile to be assigned.
	</li>
	
	<li>
	  <code><em>x</em></code>: The X location.
	</li>
	
	<li>
	  <code><em>y</em></code>: The Y location.
	</li>
	
	<li>
	  <code><em>z</em></code>: The Z location.
	</li>
	
</ul>








</dd>


</dl>




<h2><a name="tables"></a>Tables</h2>
<dl class="table">

<dt><a name="Map"></a><strong>Map</strong></dt>
<dd>Cloneable that handles map data and processing.<br /><br />


<h3>Fields:</h3>
<ul>
	
	<li>
	  <code><em>width</em></code>: Horizontal width if the map.
	</li>
	
	<li>
	  <code><em>height</em></code>: Vertical height of the map.
	</li>
	
	<li>
	  <code><em>layers</em></code>: 3D height of the map.
	</li>
	
</ul>


</dd>


<dt><a name="Map.contents"></a><strong>Map.contents</strong></dt>
<dd>Contains every MapObject within the Map, including MapTiles.<br /><br />



</dd>


<dt><a name="Map.tiles"></a><strong>Map.tiles</strong></dt>
<dd>A 3D grid containing all of the MapTiles within a Map. The matrix is ordered in a layer->column->row format. Essentially, z->y->x.<br /><br />



</dd>


</dl>



</div> <!-- id="content" -->

</div> <!-- id="main" -->

<div id="about">
	<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->

</div> <!-- id="container" -->	
</body>
</html>