-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfcfuncssrc.ks
47 lines (37 loc) · 1.03 KB
/
fcfuncssrc.ks
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
37
38
39
40
41
42
43
44
45
46
47
// Generic functions
@lazyglobal off.
global lock LAS_ShipPos to -Ship:Body:Position.
global function LAS_EngineIsUllage
{
parameter eng.
return eng:Title:Contains("Separation") or eng:Title:Contains("Spin") or eng:Tag:Contains("ullage").
}
global function LAS_GetStageEngines
{
parameter stageNum is Stage:Number.
parameter ullage is false.
local stageEngines is list().
for e in ship:engines
{
if e:Stage = stageNum and LAS_EngineIsUllage(e) = ullage and not e:Name:Contains("vernier") and not e:Name:Contains("lr101")
stageEngines:Add(e).
}
return stageEngines.
}
global function LAS_Avionics
{
parameter action.
local evt is action + " 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 action = "shutdown"
set core:bootfilename to "".
}