Skip to content

Commit 4bc99b4

Browse files
author
Chris Woerz
committed
Merge remote-tracking branch 'Starstrider42/free-rename' into develop
2 parents d3a598d + dc2a98c commit 4bc99b4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/RemoteTech2/Modules/ModuleSPU.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections.Generic;
23
using System.Linq;
34
using System.Text;
45
using UnityEngine;
@@ -44,6 +45,14 @@ private enum State
4445
NoConnection
4546
}
4647

48+
/// <summary>
49+
/// Contains the names of any events that should always be run,
50+
/// regardless of connection status or signal delay
51+
/// </summary>
52+
private static readonly HashSet<String> eventWhiteList = new HashSet<String>() {
53+
"RenameVessel", "RenameAsteroidEvent"
54+
};
55+
4756
private Guid mRegisteredId;
4857

4958
public override String GetInfo()
@@ -149,6 +158,10 @@ public void HookPartMenus()
149158
{
150159
e.Invoke();
151160
}
161+
else if (eventWhiteList.Contains(e.name))
162+
{
163+
e.Invoke();
164+
}
152165
else if (vs.FlightComputer != null && vs.FlightComputer.InputAllowed)
153166
{
154167
if (ignore_delay)

0 commit comments

Comments
 (0)