-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRCSModule.cs
More file actions
25 lines (24 loc) · 755 Bytes
/
Copy pathRCSModule.cs
File metadata and controls
25 lines (24 loc) · 755 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
using UnityEngine;
namespace MajiirKerbalLib
{
public class RCSModule : global::RCSModule
{
protected override void onPartFixedUpdate()
{
var commander = VesselCommander.GetInstance(this.vessel);
if (this.vessel.rootPart.RequestRCS(commander.RequestedRCS, 0))
{
this.stackIcon.SetIconColor(XKCDColors.White);
}
else
{
this.stackIcon.SetIconColor(XKCDColors.SlateGrey);
base.onCtrlUpd(new FlightCtrlState());
}
commander.RequestedRCS = 0;
commander.ReturnRealRCS = false;
base.onPartFixedUpdate();
commander.ReturnRealRCS = true;
}
}
}