<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>btech.map on StompyMUX Documentation</title><link>https://stompymux.com/docs/scripting/packages/btech/map/</link><description>Recent content in btech.map on StompyMUX Documentation</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://stompymux.com/docs/scripting/packages/btech/map/index.xml" rel="self" type="application/rss+xml"/><item><title>blast_zones</title><link>https://stompymux.com/docs/scripting/packages/btech/map/blast-zones/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/blast-zones/</guid><description>&lt;p&gt;Lists the blast zones configured on a map.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.blast_zones( map )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object map&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The BattleTech map.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechBlastZone[] zones&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The configured blast zones.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.map&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>cargo_transfer_point</title><link>https://stompymux.com/docs/scripting/packages/btech/map/cargo-transfer-point/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/cargo-transfer-point/</guid><description>&lt;p&gt;Returns a map&amp;rsquo;s cargo-transfer point.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.cargo_transfer_point( map )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object map&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The BattleTech map.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechCargoTransferPoint|nil point&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The configured point, or &lt;code&gt;nil&lt;/code&gt; when unset.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.map&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>elevation</title><link>https://stompymux.com/docs/scripting/packages/btech/map/elevation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/elevation/</guid><description>&lt;p&gt;Returns the elevation of a map hex.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.elevation( map, hex )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object map&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The BattleTech map.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;BtechHex hex&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The zero-based map coordinates.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;integer elevation&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The hex elevation.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.map&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>emit</title><link>https://stompymux.com/docs/scripting/packages/btech/map/emit/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/emit/</guid><description>&lt;p&gt;Emits a message to units on a map.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.emit( map, message, options )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object map&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The BattleTech map.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;string message&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The non-empty message to emit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;BtechMapEmitOptions|nil options&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Optional audience, origin, and range controls.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;all&lt;/code&gt; audience forbids &lt;code&gt;origin&lt;/code&gt; and &lt;code&gt;range&lt;/code&gt;. The &lt;code&gt;range&lt;/code&gt; audience requires
both and requires a non-negative &lt;code&gt;range&lt;/code&gt;. A range emission uses two-dimensional
distance when &lt;code&gt;origin.z&lt;/code&gt; is omitted and three-dimensional distance when it is
provided. The &lt;code&gt;line_of_sight&lt;/code&gt; audience requires &lt;code&gt;origin&lt;/code&gt;, forbids &lt;code&gt;origin.z&lt;/code&gt;,
and forbids &lt;code&gt;range&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>in_blast_zone</title><link>https://stompymux.com/docs/scripting/packages/btech/map/in-blast-zone/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/in-blast-zone/</guid><description>&lt;p&gt;Tests whether a map hex lies in a configured blast zone.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.in_blast_zone( map, hex )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object map&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The BattleTech map.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;BtechHex hex&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The zero-based map coordinates.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;boolean inside&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Whether the hex lies in a blast zone.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.map&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>line_of_sight</title><link>https://stompymux.com/docs/scripting/packages/btech/map/line-of-sight/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/line-of-sight/</guid><description>&lt;p&gt;Tests line of sight from a unit to another unit or hex.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.line_of_sight( observer, target )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object observer&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The observing unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object|BtechHex target&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The target unit or map coordinates.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechLineOfSight state&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;For a unit target, &lt;code&gt;&amp;quot;none&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;blocked&amp;quot;&lt;/code&gt;, or &lt;code&gt;&amp;quot;clear&amp;quot;&lt;/code&gt;. &lt;code&gt;&amp;quot;none&amp;quot;&lt;/code&gt; means the
target is not visible or is on another map. For a hex target, only
&lt;code&gt;&amp;quot;blocked&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;clear&amp;quot;&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.map&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>link</title><link>https://stompymux.com/docs/scripting/packages/btech/map/link/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/link/</guid><description>&lt;p&gt;Returns a child map&amp;rsquo;s parent-link configuration.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.link( child )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object child&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The child BattleTech map.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechMapLink|nil link&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The parent link, or &lt;code&gt;nil&lt;/code&gt; when unset.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.map&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>load</title><link>https://stompymux.com/docs/scripting/packages/btech/map/load/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/load/</guid><description>&lt;p&gt;Loads map data from a named map file.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.load( map, name )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object map&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The BattleTech map.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;string name&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The non-empty map-file name. It cannot contain &lt;code&gt;..&lt;/code&gt;, &lt;code&gt;/&lt;/code&gt;, or &lt;code&gt;\&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Loading replaces the map&amp;rsquo;s terrain data and clears attached units and map objects.&lt;/p&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.map&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>place_unit</title><link>https://stompymux.com/docs/scripting/packages/btech/map/place-unit/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/place-unit/</guid><description>&lt;p&gt;Places a live unit at a position on a map.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.place_unit( unit, map, position )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object map&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The destination BattleTech map.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;BtechPosition position&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The zero-based &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; coordinates and optional &lt;code&gt;z&lt;/code&gt; altitude. When
provided, &lt;code&gt;z&lt;/code&gt; must be an integer from 0 through 10000. When omitted, the
unit&amp;rsquo;s altitude is derived from the destination terrain rather than preserved;
drop-surface state is cleared, and flying unit classes are marked as landed.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;</description></item><item><title>range</title><link>https://stompymux.com/docs/scripting/packages/btech/map/range/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/range/</guid><description>&lt;p&gt;Calculates the distance between two units or positions on a map.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.range( map, from, to )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object map&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The BattleTech map.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object|BtechPosition from&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The starting unit or position.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object|BtechPosition to&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The ending unit or position.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;number range&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The three-dimensional map distance.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Unit endpoints use their current three-dimensional positions and must be on the
supplied map. A position with an explicit &lt;code&gt;z&lt;/code&gt; uses that altitude; when &lt;code&gt;z&lt;/code&gt; is
omitted, the position uses the hex&amp;rsquo;s terrain elevation.&lt;/p&gt;</description></item><item><title>set_cargo_transfer_point</title><link>https://stompymux.com/docs/scripting/packages/btech/map/set-cargo-transfer-point/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/set-cargo-transfer-point/</guid><description>&lt;p&gt;Sets or clears a map&amp;rsquo;s cargo-transfer point.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.set_cargo_transfer_point( map, point )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object map&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The BattleTech map.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;BtechCargoTransferPoint|nil point&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The new point, or &lt;code&gt;nil&lt;/code&gt; to clear it.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;A non-&lt;code&gt;nil&lt;/code&gt; point requires these fields:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;integer x&lt;/code&gt;, &lt;code&gt;integer y&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A valid hex on the map.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;boolean reveal_hint&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Whether to reveal the cargo-transfer hint.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.map&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>set_link</title><link>https://stompymux.com/docs/scripting/packages/btech/map/set-link/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/set-link/</guid><description>&lt;p&gt;Sets or clears a child map&amp;rsquo;s parent-link configuration.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.set_link( child, link )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object child&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The child BattleTech map.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;BtechMapLink|nil link&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The new parent link, or &lt;code&gt;nil&lt;/code&gt; to clear it.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;A non-&lt;code&gt;nil&lt;/code&gt; link requires these fields:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object parent&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The parent BattleTech map. A map cannot be its own parent.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;integer x&lt;/code&gt;, &lt;code&gt;integer y&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A valid destination hex on the parent map.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;The link may contain an &lt;code&gt;entrances&lt;/code&gt; table with &lt;code&gt;north&lt;/code&gt;, &lt;code&gt;east&lt;/code&gt;, &lt;code&gt;south&lt;/code&gt;, and
&lt;code&gt;west&lt;/code&gt; fields. Each directional field is optional and uses one of these forms:&lt;/p&gt;</description></item><item><title>terrain</title><link>https://stompymux.com/docs/scripting/packages/btech/map/terrain/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/terrain/</guid><description>&lt;p&gt;Returns the terrain type of a map hex.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.terrain( map, hex )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object map&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The BattleTech map.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;BtechHex hex&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The zero-based map coordinates.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechTerrain terrain&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The canonical terrain name.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.map&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>unit_by_id</title><link>https://stompymux.com/docs/scripting/packages/btech/map/unit-by-id/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/unit-by-id/</guid><description>&lt;p&gt;Finds a unit by its tactical ID.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.unit_by_id( origin, id )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object origin&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A BattleTech map or a unit on the map.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;string id&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;An exact two-character ASCII tactical ID.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;Object|nil unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The matching unit, or &lt;code&gt;nil&lt;/code&gt; when none exists.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.map&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>units</title><link>https://stompymux.com/docs/scripting/packages/btech/map/units/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/units/</guid><description>&lt;p&gt;Lists the live units on a map.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.units( map, filter )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object map&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The BattleTech map.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;table|nil filter&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;An optional &lt;code&gt;{ origin = { x = x, y = y }, range = range }&lt;/code&gt; filter. The
origin must be a valid map hex, and &lt;code&gt;range&lt;/code&gt; must be a non-negative number.
Range filtering is two-dimensional; unit altitude is ignored.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;Object[] units&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The matching unit handles.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.map&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>update_links</title><link>https://stompymux.com/docs/scripting/packages/btech/map/update-links/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/map/update-links/</guid><description>&lt;p&gt;Recursively updates a map and its linked child maps.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.map.update_links( map )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object map&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The root BattleTech map.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.map&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>