Skip to content

Commit 8333fed

Browse files
Fixed issue on 1.11 where a uncontrolled ship would be controllable when changing scenes to it
1 parent 779b2d9 commit 8333fed

File tree

8 files changed

+43
-10
lines changed

8 files changed

+43
-10
lines changed

Changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
ChangeLog
22

3+
0.1.10.16
4+
Fixed issue on 1.11 where a uncontrolled ship would be controllable when changing scenes to it
5+
36
0.1.10.15
47
Fixed issue in editor where a single open window which was closed was leaving everything locked.
58

ClickThroughBlocker.version

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"MAJOR": 0,
1111
"MINOR": 1,
1212
"PATCH": 10,
13-
"BUILD": 15
13+
"BUILD": 16
1414
},
1515
"KSP_VERSION_MIN": {
1616
"MAJOR": 1,
17-
"MINOR": 8,
17+
"MINOR": 11,
1818
"PATCH": 0
1919
}
2020
}

ClickThroughBlocker/AssemblyVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
using System.Reflection;
77

8-
[assembly: AssemblyVersion("0.1.10.14")]
8+
[assembly: AssemblyVersion("0.1.10.16")]

ClickThroughBlocker/SceneChangeCleanup.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace ClearAllInputLocks
77
{
88
[KSPAddon(KSPAddon.Startup.AllGameScenes, false)]
9-
class SceneChangeCleanup : MonoBehaviour
9+
class SceneChangeCleanup : MonoBehaviour
1010
{
1111
void Start()
1212
{
@@ -60,13 +60,16 @@ void StopStartCoroutine()
6060
}
6161

6262
bool isRunning = false;
63-
IEnumerator CleanupInputLocks()
63+
IEnumerator CleanupInputLocks()
6464
{
6565
//Log.Info("CleanUpInputLocks entry");
6666
isRunning = true;
6767
yield return new WaitForSeconds(HighLogic.CurrentGame.Parameters.CustomParams<ClickThroughFix.CTB>().cleanupDelay);
68-
InputLockManager.ClearControlLocks();
69-
yield return null;
68+
if (Versioning.version_major == 1 && Versioning.version_minor < 11)
69+
{
70+
InputLockManager.ClearControlLocks();
71+
yield return null;
72+
}
7073
isRunning = false;
7174
//Log.Info("CleanUpInputLocks exit");
7275
}

ClickThroughBlocker/Settings.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,14 @@ public class CTB : GameParameters.CustomParameterNode
4444
toolTip = "Time to wait after scene change before clearing all the input locks")]
4545
public float cleanupDelay = 0.5f;
4646

47-
public override bool Enabled(MemberInfo member, GameParameters parameters) { return true; }
47+
public override bool Enabled(MemberInfo member, GameParameters parameters)
48+
{
49+
if (Versioning.version_major == 1 && Versioning.version_minor >= 11)
50+
{
51+
return member.Name != "cleanupDelay";
52+
}
53+
return true;
54+
}
4855

4956
bool? oldFocusFollowsClick;
5057

GameData/000_ClickThroughBlocker/ClickThroughBlocker.version

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"MAJOR": 0,
1111
"MINOR": 1,
1212
"PATCH": 10,
13-
"BUILD": 14
13+
"BUILD": 16
1414
},
1515
"KSP_VERSION_MIN": {
1616
"MAJOR": 1,
17-
"MINOR": 8,
17+
"MINOR": 11,
1818
"PATCH": 0
1919
}
2020
}

GameData/000_ClickThroughBlocker/changelog.cfg

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ KERBALCHANGELOG
55
license = Lesser GPLv3
66
author = Linuxgurugamer
77

8+
9+
VERSION
10+
{
11+
version = 0.1.10.16
12+
CHANGE
13+
{
14+
change = Fixed issue on 1.11 where a uncontrolled ship would be controllable when changing scenes to it
15+
type = update
16+
}
17+
}
818
VERSION
919
{
1020
version = 0.1.10.15

changelog.cfg

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ KERBALCHANGELOG
55
license = Lesser GPLv3
66
author = Linuxgurugamer
77

8+
9+
VERSION
10+
{
11+
version = 0.1.10.16
12+
CHANGE
13+
{
14+
change = Fixed issue on 1.11 where a uncontrolled ship would be controllable when changing scenes to it
15+
type = update
16+
}
17+
}
818
VERSION
919
{
1020
version = 0.1.10.15

0 commit comments

Comments
 (0)