2021-08-25 05:11:29 +00:00
|
|
|
|
|
|
|
function Antennas {
|
|
|
|
parameter enable is true.
|
|
|
|
|
|
|
|
local eventName is "Activate".
|
|
|
|
if not enable {
|
|
|
|
set eventName to "Deactivate".
|
|
|
|
}
|
|
|
|
|
|
|
|
for p in SHIP:PARTS {
|
|
|
|
if p:MODULES:Find("ModuleRTAntenna") > -1 and p:GetModule("ModuleRTAntenna"):ALLEVENTNAMES:Find(eventName) > -1 {
|
|
|
|
p:GetModule("ModuleRTAntenna"):DoEvent(eventName).
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function SolarPanels {
|
|
|
|
parameter enable is true.
|
|
|
|
|
|
|
|
if enable {
|
|
|
|
PANELS on.
|
|
|
|
} else {
|
|
|
|
PANELS off.
|
|
|
|
}
|
|
|
|
}
|
2021-08-29 05:07:14 +00:00
|
|
|
|
|
|
|
function NoFuelResources {
|
|
|
|
parameter enable is true.
|
|
|
|
|
|
|
|
for part in SHIP:PartsTagged("nofuel") {
|
|
|
|
for resource in part:RESOURCES {
|
|
|
|
set resource:ENABLED to enable.
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|