From 5344ef94d8f20b0a961b39f68f97050e90fc1d86 Mon Sep 17 00:00:00 2001 From: Vrga Date: Fri, 2 Jan 2015 23:27:02 +0100 Subject: [PATCH] fix for silly breakage when a non-lowercase letter is used for forward/backward keys. --- InfernalRobotics/InfernalRobotics/Toggle.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/InfernalRobotics/InfernalRobotics/Toggle.cs b/InfernalRobotics/InfernalRobotics/Toggle.cs index 338df12..d90ec72 100644 --- a/InfernalRobotics/InfernalRobotics/Toggle.cs +++ b/InfernalRobotics/InfernalRobotics/Toggle.cs @@ -88,10 +88,22 @@ private Assembly MyResolveEventHandler(object sender, ResolveEventArgs args) public string servoName = ""; [KSPField(isPersistant = true)] public string groupName = ""; + [KSPField(isPersistant = true)] - public string forwardKey = ""; + private string fKey = ""; + + public string forwardKey { + get{ return this.fKey;} + set{ this.fKey = value.ToLower(); } + } + [KSPField(isPersistant = true)] - public string reverseKey = ""; + private string rKey = ""; + + public string reverseKey { + get{ return this.rKey;} + set{ this.rKey = value.ToLower(); } + } [KSPField(isPersistant = false)] public string onKey = "p";