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>
		<a href="../modules/obj.Map.html">obj.Map</a>
	</li>

	<li><strong>obj.MapObject</strong></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.MapObject</code></h1>

<p>Cloneable that is used to represent objects on a Map.</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="#MapObject:addToContents">MapObject:addToContents</a>&nbsp;(mapObject)</td>
	<td class="summary">Adds a MapObject to our contents and fires self:onEnter(mapObject).</td>
	</tr>

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

	<tr>
	<td class="name" nowrap><a href="#MapObject:getDescription">MapObject:getDescription</a>&nbsp;()</td>
	<td class="summary">Get current description.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:getLoc">MapObject:getLoc</a>&nbsp;()</td>
	<td class="summary">Get current MapObject location.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:getMap">MapObject:getMap</a>&nbsp;()</td>
	<td class="summary">Get map we're currently occupying.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:getName">MapObject:getName</a>&nbsp;()</td>
	<td class="summary">Get current name.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:getX">MapObject:getX</a>&nbsp;()</td>
	<td class="summary">Get the X of the tile we occupy.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:getY">MapObject:getY</a>&nbsp;()</td>
	<td class="summary">Get the Y of the tile we occupy.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:getZ">MapObject:getZ</a>&nbsp;()</td>
	<td class="summary">Get the Z of the tile we occupy.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:initialize">MapObject:initialize</a>&nbsp;(map, loc)</td>
	<td class="summary">Creates a unique contents table per MapObject.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:move">MapObject:move</a>&nbsp;(mapObject)</td>
	<td class="summary">Respects result of permitEntrance before setting location directly.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:moveToMap">MapObject:moveToMap</a>&nbsp;(map)</td>
	<td class="summary">Moves a MapObject into a Map.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:onEnter">MapObject:onEnter</a>&nbsp;(mapObject)</td>
	<td class="summary">Fires when a MapObject is added to our contents.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:permitEntrance">MapObject:permitEntrance</a>&nbsp;(mapObject, true)</td>
	<td class="summary">Check if this MapObject will perment the given MapObject to enter.</td>
	</tr>

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

	<tr>
	<td class="name" nowrap><a href="#MapObject:setDescription">MapObject:setDescription</a>&nbsp;(description)</td>
	<td class="summary">Assign a description.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:setLoc">MapObject:setLoc</a>&nbsp;(mapObject)</td>
	<td class="summary">Directly assigns a new location to the MapObject.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:setName">MapObject:setName</a>&nbsp;(name)</td>
	<td class="summary">Assign a name.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:setXYZLoc">MapObject:setXYZLoc</a>&nbsp;(x, y, z)</td>
	<td class="summary">Attempts to set our location to the tile at the XYZ location.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:step">MapObject:step</a>&nbsp;(direction)</td>
	<td class="summary">Attempts to make a MapObject step into a new tile in the given direction.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject:toString">MapObject:toString</a>&nbsp;()</td>
	<td class="summary">String identifier for this mob.</td>
	</tr>

</table>



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

	<tr>
	<td class="name" nowrap><a href="#MapObject">MapObject</a></td>
	<td class="summary">Cloneable that is used to represent objects on a Map.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#MapObject.contents">MapObject.contents</a></td>
	<td class="summary">Contains all of the MapObjects inhabiting this MapObject.</td>
	</tr>

</table>



<br/>
<br/>



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



<dt><a name="MapObject:addToContents"></a><strong>MapObject:addToContents</strong>&nbsp;(mapObject)</dt>
<dd>
Adds a MapObject to our contents and fires self:onEnter(mapObject).


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








</dd>




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







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



</dd>




<dt><a name="MapObject:getDescription"></a><strong>MapObject:getDescription</strong>&nbsp;()</dt>
<dd>
Get current description.







<h3>Return value:</h3>
<ul>Current description.</ul>



</dd>




<dt><a name="MapObject:getLoc"></a><strong>MapObject:getLoc</strong>&nbsp;()</dt>
<dd>
Get current MapObject location.







<h3>Return value:</h3>
<ul>Current location.</ul>



</dd>




<dt><a name="MapObject:getMap"></a><strong>MapObject:getMap</strong>&nbsp;()</dt>
<dd>
Get map we're currently occupying.







<h3>Return value:</h3>
<ul>Current map.</ul>



</dd>




<dt><a name="MapObject:getName"></a><strong>MapObject:getName</strong>&nbsp;()</dt>
<dd>
Get current name.







<h3>Return value:</h3>
<ul>Current name.</ul>



</dd>




<dt><a name="MapObject:getX"></a><strong>MapObject:getX</strong>&nbsp;()</dt>
<dd>
Get the X of the tile we occupy.







<h3>Return value:</h3>
<ul>Current x loc or nil.</ul>



</dd>




<dt><a name="MapObject:getY"></a><strong>MapObject:getY</strong>&nbsp;()</dt>
<dd>
Get the Y of the tile we occupy.







<h3>Return value:</h3>
<ul>Current y loc or nil.</ul>



</dd>




<dt><a name="MapObject:getZ"></a><strong>MapObject:getZ</strong>&nbsp;()</dt>
<dd>
Get the Z of the tile we occupy.







<h3>Return value:</h3>
<ul>Current z loc or nil.</ul>



</dd>




<dt><a name="MapObject:initialize"></a><strong>MapObject:initialize</strong>&nbsp;(map, loc)</dt>
<dd>
Creates a unique contents table per MapObject. Also has the potential to assign a Map and MapObject location to move the MapObject to.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>map</em></code>: Map to be moved to.
	</li>
	
	<li>
	  <code><em>loc</em></code>: MapObject loc to be moved to.
	</li>
	
</ul>








</dd>




<dt><a name="MapObject:move"></a><strong>MapObject:move</strong>&nbsp;(mapObject)</dt>
<dd>
Respects result of permitEntrance before setting location directly.


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






<h3>Return value:</h3>
<ul>true on successful move.<br/>false otherwise.</ul>



</dd>




<dt><a name="MapObject:moveToMap"></a><strong>MapObject:moveToMap</strong>&nbsp;(map)</dt>
<dd>
Moves a MapObject into a Map.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>map</em></code>: The map to be moved to.
	</li>
	
</ul>








</dd>




<dt><a name="MapObject:onEnter"></a><strong>MapObject:onEnter</strong>&nbsp;(mapObject)</dt>
<dd>
Fires when a MapObject is added to our contents.


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








</dd>




<dt><a name="MapObject:permitEntrance"></a><strong>MapObject:permitEntrance</strong>&nbsp;(mapObject, true)</dt>
<dd>
Check if this MapObject will perment the given MapObject to enter.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>mapObject</em></code>: MapObject to check eligiblity of.
	</li>
	
	<li>
	  <code><em>true</em></code>: on permitted entrance.<br/>false otherwise.
	</li>
	
</ul>








</dd>




<dt><a name="MapObject:removeFromContents"></a><strong>MapObject:removeFromContents</strong>&nbsp;(mapObject)</dt>
<dd>
Removes a MapObject from our contents.


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








</dd>




<dt><a name="MapObject:setDescription"></a><strong>MapObject:setDescription</strong>&nbsp;(description)</dt>
<dd>
Assign a description.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>description</em></code>: Descrition to assign.
	</li>
	
</ul>








</dd>




<dt><a name="MapObject:setLoc"></a><strong>MapObject:setLoc</strong>&nbsp;(mapObject)</dt>
<dd>
Directly assigns a new location to the MapObject.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>mapObject</em></code>: MapObject to be our new location.
	</li>
	
</ul>








</dd>




<dt><a name="MapObject:setName"></a><strong>MapObject:setName</strong>&nbsp;(name)</dt>
<dd>
Assign a name.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>name</em></code>: Name to assign.
	</li>
	
</ul>








</dd>




<dt><a name="MapObject:setXYZLoc"></a><strong>MapObject:setXYZLoc</strong>&nbsp;(x, y, z)</dt>
<dd>
Attempts to set our location to the tile at the XYZ location.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>x</em></code>: 
	</li>
	
	<li>
	  <code><em>y</em></code>: 
	</li>
	
	<li>
	  <code><em>z</em></code>: 
	</li>
	
</ul>








</dd>




<dt><a name="MapObject:step"></a><strong>MapObject:step</strong>&nbsp;(direction)</dt>
<dd>
Attempts to make a MapObject step into a new tile in the given direction. Uses move() to actuall do the moving, so it does respect MapObject:permitEntrance(self).


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>direction</em></code>: Direction to move in. Always a member of the Direction table.
	</li>
	
</ul>






<h3>Return value:</h3>
<ul>true on successful step.<br/>false otherwise.</ul>



</dd>




<dt><a name="MapObject:toString"></a><strong>MapObject:toString</strong>&nbsp;()</dt>
<dd>
String identifier for this mob.







<h3>Return value:</h3>
<ul>Returns a string in format of "&lt;MapObject's name&gt;".</ul>



</dd>


</dl>




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

<dt><a name="MapObject"></a><strong>MapObject</strong></dt>
<dd>Cloneable that is used to represent objects on a Map.<br /><br />


<h3>Fields:</h3>
<ul>
	
	<li>
	  <code><em>name</em></code>: Name of the MapObject.
	</li>
	
	<li>
	  <code><em>description</em></code>: Complete description of the MapObject.
	</li>
	
	<li>
	  <code><em>map</em></code>: Map that the MapObject is a part of.
	</li>
	
	<li>
	  <code><em>loc</em></code>: MapObject that the MapObject inhabits.
	</li>
	
</ul>


</dd>


<dt><a name="MapObject.contents"></a><strong>MapObject.contents</strong></dt>
<dd>Contains all of the MapObjects inhabiting this MapObject.<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>