This commit is contained in:
NoryiE
2025-02-16 14:12:49 +00:00
parent c6a89e5b35
commit e0aeb9b06e
2737 changed files with 5220 additions and 1039045 deletions

View File

@@ -1,7 +0,0 @@
import{_ as a,o as s,c as o,Q as e}from"./chunks/framework.4313453f.js";const u=JSON.parse('{"title":"Program","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"references/program.md","filePath":"references/program.md","lastUpdated":null}'),r={name:"references/program.md"},t=e(`<h1 id="program" tabindex="-1">Program <a class="header-anchor" href="#program" aria-label="Permalink to &quot;Program&quot;"></a></h1><p>Program objects allow you to execute other programs within your main application. You can run programs such as worms, shell, or any custom programs youve created.</p><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-label="Permalink to &quot;Properties&quot;"></a></h2><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>program</td><td>object</td><td>The internal program object</td></tr></tbody></table><h2 id="start" tabindex="-1">start <a class="header-anchor" href="#start" aria-label="Permalink to &quot;start&quot;"></a></h2><p>Starts a existing program</p><h3 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to &quot;Parameters&quot;"></a></h3><ol><li><code>string</code> Path to the program</li></ol><h3 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;"></a></h3><ol><li><code>object</code> The object in use</li></ol><h3 id="usage" tabindex="-1">Usage <a class="header-anchor" href="#usage" aria-label="Permalink to &quot;Usage&quot;"></a></h3><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> mainFrame </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> basalt.</span><span style="color:#79B8FF;">addFrame</span><span style="color:#E1E4E8;">()</span></span>
<span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> aProgram </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">mainFrame</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">addProgram</span><span style="color:#E1E4E8;">()</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">aProgram</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">start</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;path/to/your/program.lua&quot;</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> mainFrame </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> basalt.</span><span style="color:#005CC5;">addFrame</span><span style="color:#24292E;">()</span></span>
<span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> aProgram </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">mainFrame</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">addProgram</span><span style="color:#24292E;">()</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">aProgram</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">start</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;path/to/your/program.lua&quot;</span><span style="color:#24292E;">)</span></span></code></pre></div>`,12),n=[t];function l(p,c,i,d,h,m){return s(),o("div",null,n)}const E=a(r,[["render",l]]);export{u as __pageData,E as default};