Skip to content

Commit fcba504

Browse files
committed
Merge branch 'release/1.1.0'
2 parents 87025f5 + 05b1173 commit fcba504

File tree

13 files changed

+173
-235
lines changed

13 files changed

+173
-235
lines changed

.nuget/NuGet.exe

-1.59 MB
Binary file not shown.

.nuget/NuGet.targets

Lines changed: 0 additions & 144 deletions
This file was deleted.

CHANGES.md

Lines changed: 46 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,46 @@
1-
## v1.0.0
2-
##### Fixes
3-
- Initalize ControlMode to Rocket to avoid warning on vessel load
4-
5-
## v0.4.1
6-
##### Fixes
7-
- Kerbal Space Program v1.0 compatibility
8-
9-
## v0.4.0
10-
##### New
11-
- Added setting to disable Application Launcher (stock toolbar) button.
12-
- Docking controls are now supported.
13-
14-
##### Fixes
15-
- Interaction with trim controls should now be fixed.
16-
- Interaction with SAS/Autopilot should now be fixed.
17-
18-
## v0.3.0
19-
##### New
20-
- Use stock Application Launcher.
21-
- Control mode is persisted with command pods, probe cores, and docking ports. The mode used is determined by whichever
22-
part is selected with the *Control From Here* button.
23-
- Control mode is automatically selected for new parts in the editor. Parts in the VAB are placed in Rocket mode and
24-
parts in the SPH are placed in Plane mode.
25-
26-
##### Changes
27-
- Renamed from "Aeroplane Mode" to "Plane Mode".
28-
- Settings configuration has been changed slightly and toggle and hold keys have both been defaulted to None rather
29-
than ScrollLock and Home.
30-
31-
##### Fixes
32-
- Handle switching vessels better.
1+
## v1.1.0
2+
##### New
3+
- Add `KSPAssembly` attribute to assembly.
4+
5+
##### Changes
6+
- `PLANEMODE_USER_SETTINGS` is deprecated (although still supported), a Module Manager patch should now be used to
7+
modify settings. An example patch is distributed in the `PlaneMode/Configuration` directory.
8+
- Clarified log message that made it appeared as if code was being executed more times than it was.
9+
- Simplified the way textures are loaded.
10+
11+
##### Fixes
12+
- Fix Plane mode settings being persisted in certain situations.
13+
- Fix the display of the log level for debug messages.
14+
15+
## v1.0.0
16+
##### Fixes
17+
- Initalize ControlMode to Rocket to avoid warning on vessel load
18+
19+
## v0.4.1
20+
##### Fixes
21+
- Kerbal Space Program v1.0 compatibility
22+
23+
## v0.4.0
24+
##### New
25+
- Added setting to disable Application Launcher (stock toolbar) button.
26+
- Docking controls are now supported.
27+
28+
##### Fixes
29+
- Interaction with trim controls should now be fixed.
30+
- Interaction with SAS/Autopilot should now be fixed.
31+
32+
## v0.3.0
33+
##### New
34+
- Use stock Application Launcher.
35+
- Control mode is persisted with command pods, probe cores, and docking ports. The mode used is determined by whichever
36+
part is selected with the *Control From Here* button.
37+
- Control mode is automatically selected for new parts in the editor. Parts in the VAB are placed in Rocket mode and
38+
parts in the SPH are placed in Plane mode.
39+
40+
##### Changes
41+
- Renamed from "Aeroplane Mode" to "Plane Mode".
42+
- Settings configuration has been changed slightly and toggle and hold keys have both been defaulted to None rather
43+
than ScrollLock and Home.
44+
45+
##### Fixes
46+
- Handle switching vessels better.

Settings/DefaultSettings.cfg renamed to Configuration/PlaneMode.cfg

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
// DefaultSettings.cfg - PlaneMode Default Settings
1+
// Do *NOT* modify this file as it will be overwritten on every upgrade.
2+
// Use a Module Manager patch to change settings.
23

3-
// Do *NOT* modify this file as it will be overwritten on every upgrade. Instead:
4-
// 1. Copy this file to another file named `UserSettings.cfg`
5-
// 2. Change `PLANEMODE_DEFAULT_SETTINGS` to `PLANEMODE_USER_SETTINGS`
6-
// 3. Edit `UserSettings.cfg` as necessary
7-
// 4. Remove any setting you do not explicitly change in `UserSettings.cfg` so that you receive new defaults in the
8-
// future
9-
10-
PLANEMODE_DEFAULT_SETTINGS
4+
PLANEMODE
115
{
126
// Key to toggle control mode
137
// Set `primary` to one of the KeyCodes specified here: http://docs.unity3d.com/ScriptReference/KeyCode.html
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// This is an example file for how to modify PlaneMode's configuration using a Module Manager patch.
2+
// Remove the `.example` from the end of the filename and uncomment lines for settings you wish to change.
3+
4+
@PLANEMODE:NEEDS[PlaneMode]
5+
{
6+
// Key to toggle control mode
7+
// Set `primary` to one of the KeyCodes specified here: http://docs.unity3d.com/ScriptReference/KeyCode.html
8+
//@TOGGLE_CONTROL_MODE
9+
//{
10+
// primary = None
11+
// secondary = None
12+
// group = 0
13+
// switchState = Any
14+
//}
15+
16+
// Key to temporarily toggle control mode
17+
// Set `primary` to one of the KeyCodes specified here: http://docs.unity3d.com/ScriptReference/KeyCode.html
18+
//@HOLD_CONTROL_MODE
19+
//{
20+
// primary = None
21+
// secondary = None
22+
// group = 0
23+
// switchState = Any
24+
//}
25+
26+
// Set true to invert pitch in plane mode
27+
//@pitchInvert = false
28+
29+
// Set false to disable the Application Launcher (stock toolbar) button from appearing
30+
//@enableAppLauncherButton = true
31+
}

Source/PlaneMode/Log.cs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ internal static class Log
66
{
77
public static LogLevel Level { get; set; }
88

9-
private static string Prefix
10-
{
11-
get
12-
{
13-
return String.Format("[PlaneMode] [{0}]: ", Level);
14-
}
15-
}
16-
179
static Log()
1810
{
1911
Level = LogLevel.Info;
@@ -23,40 +15,45 @@ public static void Error(string format, params object[] args)
2315
{
2416
if ((byte)LogLevel.Error <= (byte)Level)
2517
{
26-
UnityEngine.Debug.LogError(Prefix + String.Format(format, args));
18+
UnityEngine.Debug.LogError(Prefix(LogLevel.Error) + String.Format(format, args));
2719
}
2820
}
2921

3022
public static void Warning(string format, params object[] args)
3123
{
3224
if ((byte)LogLevel.Warning <= (byte)Level)
3325
{
34-
UnityEngine.Debug.LogWarning(Prefix + String.Format(format, args));
26+
UnityEngine.Debug.LogWarning(Prefix(LogLevel.Warning) + String.Format(format, args));
3527
}
3628
}
3729

3830
public static void Info(string format, params object[] args)
3931
{
4032
if ((byte)LogLevel.Info <= (byte)Level)
4133
{
42-
UnityEngine.Debug.Log(Prefix + String.Format(format, args));
34+
UnityEngine.Debug.Log(Prefix(LogLevel.Info) + String.Format(format, args));
4335
}
4436
}
4537

4638
public static void Debug(string format, params object[] args)
4739
{
4840
if ((byte)LogLevel.Debug <= (byte)Level)
4941
{
50-
UnityEngine.Debug.Log(Prefix + String.Format(format, args));
42+
UnityEngine.Debug.Log(Prefix(LogLevel.Debug) + String.Format(format, args));
5143
}
5244
}
5345

5446
public static void Trace(string format, params object[] args)
5547
{
5648
if ((byte)LogLevel.Trace <= (byte)Level)
5749
{
58-
UnityEngine.Debug.Log(Prefix + String.Format(format, args));
50+
UnityEngine.Debug.Log(Prefix(LogLevel.Trace) + String.Format(format, args));
5951
}
6052
}
53+
54+
private static string Prefix(LogLevel level)
55+
{
56+
return String.Format("[PlaneMode] [{0}]: ", level);
57+
}
6158
}
6259
}

Source/PlaneMode/ModulePlaneMode.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ public void ToggleControlMode()
120120
break;
121121
}
122122

123-
Log.Info("Changed control mode for {0} to {1}", part.partInfo.title, ControlMode);
124-
123+
Log.Info("Toggled control mode for {0} to {1}", part.partInfo.title, ControlMode);
125124
Log.Trace("Leaving ModulePlaneMode.ToggleControlMode()");
126125
}
127126

0 commit comments

Comments
 (0)