forked from RCrockford/kOS-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfcfuncs.ks
More file actions
36 lines (36 loc) · 794 Bytes
/
fcfuncs.ks
File metadata and controls
36 lines (36 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@lazyglobal off.
global lock LAS_ShipPos to-Ship:Body:Position.
global function LAS_EngineIsUllage
{
parameter _p0.
return _p0:Title:Contains("Separation")or _p0:Title:Contains("Spin")or _p0:Tag:Contains("ullage").
}
global function LAS_GetStageEngines
{
parameter _p0 is Stage:Number.
parameter _p1 is false.
local _0 is list().
for e in ship:engines
{
if e:Stage=_p0 and LAS_EngineIsUllage(e)=_p1 and not e:Name:Contains("vernier")and not e:Name:Contains("lr101")
_0:Add(e).
}
return _0.
}
global function LAS_Avionics
{
parameter _p0.
local evt is _p0+" avionics".
for a in Ship:ModulesNamed("ModuleProceduralAvionics")
{
if a:HasEvent(evt)
a:DoEvent(evt).
}
for a in Ship:ModulesNamed("ModuleAvionics")
{
if a:HasEvent(evt)
a:DoEvent(evt).
}
if _p0="shutdown"
set core:bootfilename to"".
}