-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathModuleScienceDataIndicator.cs
More file actions
23 lines (22 loc) · 941 Bytes
/
Copy pathModuleScienceDataIndicator.cs
File metadata and controls
23 lines (22 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
namespace IndicatorLights
{
/// <summary>
/// Indicates whether a science experiment contains data or not. Has the ability
/// to show different colors depending on the value of the science data.
/// </summary>
class ModuleScienceDataIndicator : ModuleScienceDataIndicatorBase<ModuleScienceExperiment>
{
/// <summary>
/// Indicates the experiment which corresponds to this indicator (mainly useful
/// for cases where one part may have multiple science experiments on it).
/// Optional field. If null or empty, will simply use the first science experiment
/// found on the part.
/// </summary>
[KSPField]
public string experimentID = null;
protected override bool IsSource(ModuleScienceExperiment candidate)
{
return string.IsNullOrEmpty(experimentID) || (experimentID.Equals(candidate.experimentID));
}
}
}