<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>btech.autopilot package on StompyMUX Documentation</title><link>https://stompymux.com/docs/scripting/packages/btech/autopilot/</link><description>Recent content in btech.autopilot package on StompyMUX Documentation</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://stompymux.com/docs/scripting/packages/btech/autopilot/index.xml" rel="self" type="application/rss+xml"/><item><title>add_order</title><link>https://stompymux.com/docs/scripting/packages/btech/autopilot/add-order/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/autopilot/add-order/</guid><description>&lt;p&gt;Appends one validated typed order to an autopilot queue.&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.autopilot.add_order( autopilot, order )
&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 autopilot&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A registered BattleTech autopilot.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;BtechAutopilotOrder order&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;One of the strict shapes below. No additional fields are accepted.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;The &lt;code&gt;name&lt;/code&gt; field must come from &lt;a href="../orders/"&gt;&lt;code&gt;btech.autopilot.orders&lt;/code&gt;&lt;/a&gt;.
Directions and modes use the corresponding typed constant namespaces.&lt;/p&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;{ name &lt;span style="color:#f92672"&gt;=&lt;/span&gt; orders.CHASE_TARGET&lt;span style="color:#f92672"&gt;|&lt;/span&gt;orders.DUMB_FOLLOW&lt;span style="color:#f92672"&gt;|&lt;/span&gt;orders.FOLLOW&lt;span style="color:#f92672"&gt;|&lt;/span&gt;orders.EMBARK&lt;span style="color:#f92672"&gt;|&lt;/span&gt;orders.PICK_UP, target &lt;span style="color:#f92672"&gt;=&lt;/span&gt; unit }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{ name &lt;span style="color:#f92672"&gt;=&lt;/span&gt; orders.DUMB_GOTO&lt;span style="color:#f92672"&gt;|&lt;/span&gt;orders.GOTO&lt;span style="color:#f92672"&gt;|&lt;/span&gt;orders.OLD_GOTO, x &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0..2147483647&lt;/span&gt;, y &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0..2147483647&lt;/span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{ name &lt;span style="color:#f92672"&gt;=&lt;/span&gt; orders.ENTER_BASE, direction &lt;span style="color:#f92672"&gt;=&lt;/span&gt; directions.NORTH&lt;span style="color:#f92672"&gt;|&lt;/span&gt;directions.EAST&lt;span style="color:#f92672"&gt;|&lt;/span&gt;directions.SOUTH&lt;span style="color:#f92672"&gt;|&lt;/span&gt;directions.WEST }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{ name &lt;span style="color:#f92672"&gt;=&lt;/span&gt; orders.LEAVE_BASE, heading &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0..359&lt;/span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{ name &lt;span style="color:#f92672"&gt;=&lt;/span&gt; orders.ROAM, mode &lt;span style="color:#f92672"&gt;=&lt;/span&gt; roam_modes.MAP }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{ name &lt;span style="color:#f92672"&gt;=&lt;/span&gt; orders.ROAM, mode &lt;span style="color:#f92672"&gt;=&lt;/span&gt; roam_modes.RADIUS, x &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0..2147483647&lt;/span&gt;, y &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0..2147483647&lt;/span&gt;, radius &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1..30&lt;/span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{ name &lt;span style="color:#f92672"&gt;=&lt;/span&gt; orders.AUTO_GUN, mode &lt;span style="color:#f92672"&gt;=&lt;/span&gt; autogun_modes.AUTOMATIC&lt;span style="color:#f92672"&gt;|&lt;/span&gt;autogun_modes.OFF }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{ name &lt;span style="color:#f92672"&gt;=&lt;/span&gt; orders.AUTO_GUN, mode &lt;span style="color:#f92672"&gt;=&lt;/span&gt; autogun_modes.TARGET, target &lt;span style="color:#f92672"&gt;=&lt;/span&gt; unit }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{ name &lt;span style="color:#f92672"&gt;=&lt;/span&gt; orders.DROP_OFF&lt;span style="color:#f92672"&gt;|&lt;/span&gt;orders.SHUT_DOWN&lt;span style="color:#f92672"&gt;|&lt;/span&gt;orders.START_UP&lt;span style="color:#f92672"&gt;|&lt;/span&gt;orders.UNIT_DISEMBARK }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{ name &lt;span style="color:#f92672"&gt;=&lt;/span&gt; orders.SPEED, percent &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1..100&lt;/span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here &lt;code&gt;orders&lt;/code&gt;, &lt;code&gt;directions&lt;/code&gt;, &lt;code&gt;roam_modes&lt;/code&gt;, and &lt;code&gt;autogun_modes&lt;/code&gt; abbreviate their
namespaces beneath &lt;code&gt;btech.autopilot&lt;/code&gt;; they are not raw strings.&lt;/p&gt;</description></item><item><title>btech.autopilot.autogun_modes</title><link>https://stompymux.com/docs/scripting/packages/btech/autopilot/autogun-modes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/autopilot/autogun-modes/</guid><description>&lt;p&gt;&lt;code&gt;btech.autopilot.autogun_modes&lt;/code&gt; is an immutable namespace of typed
&lt;code&gt;BtechAutopilotAutogunMode&lt;/code&gt; constants used by &lt;code&gt;AUTO_GUN&lt;/code&gt; orders.&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.autopilot.autogun_modes.CONSTANT
&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;p&gt;This namespace takes no arguments.&lt;/p&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechAutopilotAutogunMode constant&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The typed automatic-gunnery mode represented by &lt;code&gt;CONSTANT&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;p&gt;Raises &lt;code&gt;mux.arg.invalid&lt;/code&gt; for invalid lookup, mutation, or use as the wrong
typed argument.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Constants belong to their namespace and the Lua runtime that created them.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Constant&lt;/th&gt;
					&lt;th&gt;Behavior&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;AUTOMATIC&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Select targets automatically.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;OFF&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Disable automatic gunnery.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;TARGET&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Attack the supplied target unit.&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Repeated lookups of the same mode compare equal and stringify to their
uppercase key; other values, constant kinds, and runtimes compare unequal.
Unknown lookups and attempts to modify a constant or the namespace raise
&lt;code&gt;mux.arg.invalid&lt;/code&gt;. Raw strings, constants of another kind, and
values from another Lua runtime are rejected.&lt;/p&gt;</description></item><item><title>btech.autopilot.directions</title><link>https://stompymux.com/docs/scripting/packages/btech/autopilot/directions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/autopilot/directions/</guid><description>&lt;p&gt;&lt;code&gt;btech.autopilot.directions&lt;/code&gt; is an immutable namespace of typed
&lt;code&gt;BtechAutopilotDirection&lt;/code&gt; constants used by &lt;code&gt;ENTER_BASE&lt;/code&gt; orders.&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.autopilot.directions.CONSTANT
&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;p&gt;This namespace takes no arguments.&lt;/p&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechAutopilotDirection constant&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The typed direction represented by &lt;code&gt;CONSTANT&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;p&gt;Raises &lt;code&gt;mux.arg.invalid&lt;/code&gt; for invalid lookup, mutation, or use as the wrong
typed argument.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Constants belong to their namespace and the Lua runtime that created them.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Constant&lt;/th&gt;
					&lt;th&gt;Direction&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;NORTH&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;North.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;EAST&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;East.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;SOUTH&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;South.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;WEST&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;West.&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Repeated lookups of the same direction compare equal and stringify to their
uppercase key; other values, constant kinds, and runtimes compare unequal.
Unknown lookups and attempts to modify a constant or the namespace raise
&lt;code&gt;mux.arg.invalid&lt;/code&gt;. Raw strings, constants of another kind, and values
from another Lua runtime are rejected.&lt;/p&gt;</description></item><item><title>btech.autopilot.orders</title><link>https://stompymux.com/docs/scripting/packages/btech/autopilot/orders/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/autopilot/orders/</guid><description>&lt;p&gt;&lt;code&gt;btech.autopilot.orders&lt;/code&gt; is an immutable namespace of typed
&lt;code&gt;BtechAutopilotOrderName&lt;/code&gt; constants. Use these values as the &lt;code&gt;name&lt;/code&gt;
discriminator accepted by &lt;a href="../add-order/"&gt;&lt;code&gt;add_order&lt;/code&gt;&lt;/a&gt;; raw strings are
rejected.&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.autopilot.orders.CONSTANT
&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;p&gt;This namespace takes no arguments.&lt;/p&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechAutopilotOrderName constant&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The typed order name represented by &lt;code&gt;CONSTANT&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;p&gt;Raises &lt;code&gt;mux.arg.invalid&lt;/code&gt; for invalid lookup, mutation, or use as the wrong
typed argument.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Constants belong to their namespace and the Lua runtime that created them.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Constant&lt;/th&gt;
					&lt;th&gt;Order&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;CHASE_TARGET&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Chase a target unit.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;DUMB_FOLLOW&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Follow a target without pathfinding.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;FOLLOW&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Follow a target using normal navigation.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;EMBARK&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Embark into a target unit.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;PICK_UP&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Pick up a target unit.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;DUMB_GOTO&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Move directly to map coordinates.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;GOTO&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Navigate to map coordinates.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;OLD_GOTO&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Use the legacy coordinate-navigation behavior.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ENTER_BASE&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Enter a base from a direction.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;LEAVE_BASE&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Leave a base on a heading.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ROAM&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Roam a map or radius.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;AUTO_GUN&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Configure automatic gunnery.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;DROP_OFF&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Drop off a carried unit.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;SHUT_DOWN&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Shut down the associated unit.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;START_UP&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Start the associated unit.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;UNIT_DISEMBARK&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Disembark the associated unit.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;SPEED&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Set the desired speed percentage.&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Repeated lookups of the same order compare equal and stringify to their
uppercase key; other values, constant kinds, and runtimes compare unequal.
Unknown lookups and attempts to modify a constant or the namespace raise
&lt;code&gt;mux.arg.invalid&lt;/code&gt;. Constants belong to their namespace and current Lua
runtime; a raw string or a different kind of BTech constant is rejected.&lt;/p&gt;</description></item><item><title>btech.autopilot.roam_modes</title><link>https://stompymux.com/docs/scripting/packages/btech/autopilot/roam-modes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/autopilot/roam-modes/</guid><description>&lt;p&gt;&lt;code&gt;btech.autopilot.roam_modes&lt;/code&gt; is an immutable namespace of typed
&lt;code&gt;BtechAutopilotRoamMode&lt;/code&gt; constants used by &lt;code&gt;ROAM&lt;/code&gt; orders.&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.autopilot.roam_modes.CONSTANT
&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;p&gt;This namespace takes no arguments.&lt;/p&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechAutopilotRoamMode constant&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The typed roaming mode represented by &lt;code&gt;CONSTANT&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;p&gt;Raises &lt;code&gt;mux.arg.invalid&lt;/code&gt; for invalid lookup, mutation, or use as the wrong
typed argument.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Constants belong to their namespace and the Lua runtime that created them.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Constant&lt;/th&gt;
					&lt;th&gt;Behavior&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;MAP&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Roam across the current map.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;RADIUS&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Roam within a radius of the supplied coordinates.&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Repeated lookups of the same mode compare equal and stringify to their
uppercase key; other values, constant kinds, and runtimes compare unequal.
Unknown lookups and attempts to modify a constant or the namespace raise
&lt;code&gt;mux.arg.invalid&lt;/code&gt;. Raw strings, constants of another kind, and values
from another Lua runtime are rejected.&lt;/p&gt;</description></item><item><title>clear_orders</title><link>https://stompymux.com/docs/scripting/packages/btech/autopilot/clear-orders/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/autopilot/clear-orders/</guid><description>&lt;p&gt;Clears an autopilot&amp;rsquo;s order queue atomically when safe.&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.autopilot.clear_orders( autopilot )
&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 autopilot&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A registered BattleTech autopilot.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;mux.object.invalid&lt;/code&gt; or &lt;code&gt;mux.object.unavailable&lt;/code&gt; for an invalid autopilot.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;btech.operation.failed&lt;/code&gt; with reason &lt;code&gt;active_order&lt;/code&gt; if the engaged queue is
nonempty.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Failure leaves the entire queue unchanged. Disengage first to preserve safety
when clearing a nonempty active queue.&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.autopilot&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../disengage/"&gt;&lt;code&gt;disengage&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../remove-order/"&gt;&lt;code&gt;remove_order&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>disengage</title><link>https://stompymux.com/docs/scripting/packages/btech/autopilot/disengage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/autopilot/disengage/</guid><description>&lt;p&gt;Stops an engaged autopilot without discarding its association or orders.&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.autopilot.disengage( autopilot )
&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 autopilot&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A registered BattleTech autopilot.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;mux.object.invalid&lt;/code&gt; or &lt;code&gt;mux.object.unavailable&lt;/code&gt; for an invalid autopilot.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;btech.operation.failed&lt;/code&gt; with reason &lt;code&gt;already_disengaged&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;The associated unit and full queue remain intact. The authoritative engagement
boolean is saved exactly in version 8 snapshots.&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.autopilot&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../engage/"&gt;&lt;code&gt;engage&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../clear-orders/"&gt;&lt;code&gt;clear_orders&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>engage</title><link>https://stompymux.com/docs/scripting/packages/btech/autopilot/engage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/autopilot/engage/</guid><description>&lt;p&gt;Associates and engages an autopilot installed in a unit.&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.autopilot.engage( autopilot )
&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 autopilot&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A registered BattleTech autopilot physically contained by a registered unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;mux.object.invalid&lt;/code&gt; or &lt;code&gt;mux.object.unavailable&lt;/code&gt; for an invalid autopilot.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;btech.operation.failed&lt;/code&gt; with reason &lt;code&gt;not_installed_in_unit&lt;/code&gt;,
&lt;code&gt;already_engaged&lt;/code&gt;, or &lt;code&gt;association_conflict&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Another autopilot cannot claim the same unit, and a valid backlink to another
unit is a conflict. Only unambiguous stale cached associations are repaired.
Engagement is persisted explicitly in version 8 snapshots. Version 6 and 7
snapshots infer it once from the autogun or zombie flags, or from matching
physical containment and backlinks when the queue is nonempty; subsequent saves
use version 8. The guarded offline migration at
&lt;code&gt;game/data/migrations/btech-persistence-v8.sql&lt;/code&gt; applies the same inference. Stop
the server and back up a populated database before running it.&lt;/p&gt;</description></item><item><title>event_stats</title><link>https://stompymux.com/docs/scripting/packages/btech/autopilot/event-stats/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/autopilot/event-stats/</guid><description>&lt;p&gt;Counts pending events associated with an autopilot.&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;&lt;span style="color:#66d9ef"&gt;local&lt;/span&gt; stats &lt;span style="color:#f92672"&gt;=&lt;/span&gt; btech.autopilot.event_stats( autopilot )
&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 autopilot&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A registered BattleTech autopilot.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechAutopilotEventStats&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A fresh table with integer fields &lt;code&gt;goto&lt;/code&gt;, &lt;code&gt;leave&lt;/code&gt;, &lt;code&gt;command&lt;/code&gt;, &lt;code&gt;autogun&lt;/code&gt;,
&lt;code&gt;sensor&lt;/code&gt;, &lt;code&gt;follow&lt;/code&gt;, &lt;code&gt;enter_base&lt;/code&gt;, &lt;code&gt;reply&lt;/code&gt;, &lt;code&gt;profile&lt;/code&gt;, &lt;code&gt;roam&lt;/code&gt;, and &lt;code&gt;total&lt;/code&gt;.
Every category is present, including zero counts.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;mux.object.invalid&lt;/code&gt; if the object is not a registered autopilot.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mux.object.unavailable&lt;/code&gt; if its runtime state is unavailable.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;The result is a snapshot; later event scheduling does not mutate it.&lt;/p&gt;</description></item><item><title>remove_order</title><link>https://stompymux.com/docs/scripting/packages/btech/autopilot/remove-order/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/autopilot/remove-order/</guid><description>&lt;p&gt;Removes one queued autopilot order.&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.autopilot.remove_order( autopilot, 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 autopilot&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A registered BattleTech autopilot.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;integer position&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The one-based queue position, from 1 through 100.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;mux.arg.invalid&lt;/code&gt; if &lt;code&gt;position&lt;/code&gt; is not an integer in range.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mux.object.invalid&lt;/code&gt; or &lt;code&gt;mux.object.unavailable&lt;/code&gt; for an invalid autopilot.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;btech.operation.failed&lt;/code&gt; with reason &lt;code&gt;active_order&lt;/code&gt; when position 1 is
protected or &lt;code&gt;order_not_found&lt;/code&gt; when no such position exists.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Position 1 is protected whenever an engaged autopilot has queued orders. Later
pending orders can still be removed.&lt;/p&gt;</description></item><item><title>status</title><link>https://stompymux.com/docs/scripting/packages/btech/autopilot/status/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/autopilot/status/</guid><description>&lt;p&gt;Returns a fresh structured snapshot of an autopilot.&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;&lt;span style="color:#66d9ef"&gt;local&lt;/span&gt; status &lt;span style="color:#f92672"&gt;=&lt;/span&gt; btech.autopilot.status( autopilot )
&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 autopilot&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A registered BattleTech autopilot.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechAutopilotStatus&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A new table containing optional &lt;code&gt;Object&lt;/code&gt; fields &lt;code&gt;container_unit&lt;/code&gt;,
&lt;code&gt;associated_unit&lt;/code&gt;, and &lt;code&gt;map&lt;/code&gt;; &lt;code&gt;association&lt;/code&gt; (&lt;code&gt;none&lt;/code&gt;, &lt;code&gt;ready&lt;/code&gt;, &lt;code&gt;associated&lt;/code&gt;, or
&lt;code&gt;conflict&lt;/code&gt;); &lt;code&gt;engaged&lt;/code&gt;; &lt;code&gt;speed_percent&lt;/code&gt;; &lt;code&gt;order_count&lt;/code&gt;; &lt;code&gt;order_capacity&lt;/code&gt;
(always 100); a dense typed &lt;code&gt;orders&lt;/code&gt; array; and &lt;code&gt;modes&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;The modes are &lt;code&gt;autogun_enabled&lt;/code&gt;, &lt;code&gt;autogun_suspended&lt;/code&gt;, &lt;code&gt;piloting_suspended&lt;/code&gt;,
&lt;code&gt;roaming&lt;/code&gt;, &lt;code&gt;manual_sensors&lt;/code&gt;, &lt;code&gt;chasing_target&lt;/code&gt;, &lt;code&gt;chase_resume_pending&lt;/code&gt;,
&lt;code&gt;swarm_charging&lt;/code&gt;, and &lt;code&gt;assigned_target&lt;/code&gt;, all booleans.&lt;/p&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;mux.object.invalid&lt;/code&gt; if the object is not a registered autopilot or a stored
object relationship is corrupt.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mux.object.unavailable&lt;/code&gt; if its runtime state is unavailable.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;btech.operation.failed&lt;/code&gt; with reason &lt;code&gt;invalid_order_queue&lt;/code&gt; if stored orders
cannot be decoded safely.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Each call returns new tables. Object relationships are native &lt;code&gt;Object&lt;/code&gt; handles,
not numeric database references; absent relationships are &lt;code&gt;nil&lt;/code&gt;.
Order &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;direction&lt;/code&gt;, and &lt;code&gt;mode&lt;/code&gt; fields are typed constants from the
corresponding &lt;code&gt;btech.autopilot&lt;/code&gt; namespaces. They compare and stringify like the
input constants and can be passed back to &lt;code&gt;add_order&lt;/code&gt; without conversion.&lt;/p&gt;</description></item></channel></rss>