<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>btech.repair on StompyMUX Documentation</title><link>https://stompymux.com/docs/scripting/packages/btech/repair/</link><description>Recent content in btech.repair on StompyMUX Documentation</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://stompymux.com/docs/scripting/packages/btech/repair/index.xml" rel="self" type="application/rss+xml"/><item><title>apply</title><link>https://stompymux.com/docs/scripting/packages/btech/repair/apply/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/repair/apply/</guid><description>&lt;p&gt;Performs an immediate repair on a live 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.repair.apply( unit, repair )
&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;A registered live BattleTech unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;table repair&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A strict operation record. Unknown fields are rejected. Every record requires
a typed &lt;a href="../../unit/sections/"&gt;&lt;code&gt;BtechSection&lt;/code&gt;&lt;/a&gt; in &lt;code&gt;section&lt;/code&gt; and one of these
exact shapes, using &lt;a href="../operations/"&gt;&lt;code&gt;btech.repair.operations&lt;/code&gt;&lt;/a&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;{ operation = operations.REPAIR_ARMOR, section = BtechSection, value = integer }&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{ operation = operations.REPAIR_INTERNAL, section = BtechSection, value = integer }&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{ operation = operations.REPAIR_REAR_ARMOR, section = BtechSection, value = integer }&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{ operation = operations.REPAIR_PART, section = BtechSection, slot = integer }&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{ operation = operations.REATTACH, section = BtechSection }&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Raw operation and section strings are rejected. Armor and internal values must
be integers from 0 through 255. &lt;code&gt;slot&lt;/code&gt; is a one-based integer within the
selected section&amp;rsquo;s current critical-slot count. &lt;code&gt;REPAIR_REAR_ARMOR&lt;/code&gt; is valid
only for a Mech&amp;rsquo;s center, left, or right torso (&lt;code&gt;CTORSO&lt;/code&gt;/&lt;code&gt;CT&lt;/code&gt;, &lt;code&gt;LTORSO&lt;/code&gt;/&lt;code&gt;LT&lt;/code&gt;,
or &lt;code&gt;RTORSO&lt;/code&gt;/&lt;code&gt;RT&lt;/code&gt;); this immediate operation is rejected for every other
section and unit type.&lt;/p&gt;</description></item><item><title>btech.repair.operations</title><link>https://stompymux.com/docs/scripting/packages/btech/repair/operations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/repair/operations/</guid><description>&lt;p&gt;&lt;code&gt;btech.repair.operations&lt;/code&gt; is an immutable namespace of typed
&lt;code&gt;BtechRepairOperation&lt;/code&gt; constants.&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.repair.operations.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;BtechRepairOperation constant&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The typed operation 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, raw strings,
wrong-kind constants, or constants from another runtime.&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;Constants&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;REATTACH&lt;/code&gt;, &lt;code&gt;REPAIR_PART&lt;/code&gt;, &lt;code&gt;REPAIR_WEAPON_TEMPORARY&lt;/code&gt;, &lt;code&gt;REPAIR_ENHANCEMENT&lt;/code&gt;, &lt;code&gt;REPAIR_FOCUS&lt;/code&gt;, &lt;code&gt;REPAIR_CRYSTAL&lt;/code&gt;, &lt;code&gt;REPAIR_BARREL&lt;/code&gt;, &lt;code&gt;REPAIR_AMMO_FEED&lt;/code&gt;, &lt;code&gt;REPAIR_RANGING&lt;/code&gt;, &lt;code&gt;REPAIR_AMMO_MOUNT&lt;/code&gt;, &lt;code&gt;REPLACE_WEAPON&lt;/code&gt;, &lt;code&gt;RELOAD&lt;/code&gt;, &lt;code&gt;REPAIR_ARMOR&lt;/code&gt;, &lt;code&gt;REPAIR_REAR_ARMOR&lt;/code&gt;, &lt;code&gt;REPAIR_INTERNAL&lt;/code&gt;, &lt;code&gt;DETACH&lt;/code&gt;, &lt;code&gt;SCRAP_PART&lt;/code&gt;, &lt;code&gt;SCRAP_WEAPON&lt;/code&gt;, &lt;code&gt;UNLOAD&lt;/code&gt;, &lt;code&gt;RESEAL&lt;/code&gt;, &lt;code&gt;REPLACE_SUIT&lt;/code&gt;&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;code&gt;btech.repair.apply&lt;/code&gt; accepts the supported immediate-repair subset:
&lt;code&gt;REATTACH&lt;/code&gt;, &lt;code&gt;REPAIR_PART&lt;/code&gt;, &lt;code&gt;REPAIR_ARMOR&lt;/code&gt;, &lt;code&gt;REPAIR_REAR_ARMOR&lt;/code&gt;, and
&lt;code&gt;REPAIR_INTERNAL&lt;/code&gt;. Other constants describe jobs returned by
&lt;code&gt;btech.repair.needs&lt;/code&gt; and are rejected by &lt;code&gt;apply&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>is_fixable</title><link>https://stompymux.com/docs/scripting/packages/btech/repair/is-fixable/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/repair/is-fixable/</guid><description>&lt;p&gt;Tests whether a live unit can be repaired.&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.repair.is_fixable( unit )
&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;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;boolean fixable&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Whether the unit is fixable.&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.repair&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>is_under_repair</title><link>https://stompymux.com/docs/scripting/packages/btech/repair/is-under-repair/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/repair/is-under-repair/</guid><description>&lt;p&gt;Tests whether a live unit has an active repair event.&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.repair.is_under_repair( unit )
&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;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;boolean under_repair&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Whether the unit is under repair.&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.repair&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>needs</title><link>https://stompymux.com/docs/scripting/packages/btech/repair/needs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/repair/needs/</guid><description>&lt;p&gt;Lists the repairs needed by a live 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.repair.needs( unit )
&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;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechRepairNeed[] needs&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The required and in-progress repair operations. Each &lt;code&gt;operation&lt;/code&gt; is a typed
&lt;a href="../operations/"&gt;&lt;code&gt;BtechRepairOperation&lt;/code&gt;&lt;/a&gt; constant and each &lt;code&gt;section&lt;/code&gt; is a
typed &lt;a href="../../unit/sections/"&gt;&lt;code&gt;BtechSection&lt;/code&gt;&lt;/a&gt; constant; both round-trip into
&lt;code&gt;btech.repair.apply&lt;/code&gt; for supported immediate repairs.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Scheduled repair discovery preserves compatibility with stored unit data. It
may report rear-armor jobs for any section whose configured current and original
rear values differ. Scheduled technician work can restore configured stored
rear armor for ordinary deficits where the current value is below the original
value. Outside a Mech&amp;rsquo;s center, left, and right torsos, stored rear armor is not
consumed by combat and cannot be changed through the immediate
&lt;a href="../apply/"&gt;&lt;code&gt;btech.repair.apply&lt;/code&gt;&lt;/a&gt; operation.&lt;/p&gt;</description></item><item><title>technician_available_in</title><link>https://stompymux.com/docs/scripting/packages/btech/repair/technician-available-in/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/repair/technician-available-in/</guid><description>&lt;p&gt;Returns the time until a player&amp;rsquo;s technician is available.&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.repair.technician_available_in( player )
&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 player&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The player.&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 seconds&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The remaining wait in seconds.&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.repair&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>