Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
dbent committed May 9, 2015
2 parents 87025f5 + 05b1173 commit fcba504
Show file tree
Hide file tree
Showing 13 changed files with 173 additions and 235 deletions.
Binary file removed .nuget/NuGet.exe
Binary file not shown.
144 changes: 0 additions & 144 deletions .nuget/NuGet.targets

This file was deleted.

78 changes: 46 additions & 32 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,46 @@
## v1.0.0
##### Fixes
- Initalize ControlMode to Rocket to avoid warning on vessel load

## v0.4.1
##### Fixes
- Kerbal Space Program v1.0 compatibility

## v0.4.0
##### New
- Added setting to disable Application Launcher (stock toolbar) button.
- Docking controls are now supported.

##### Fixes
- Interaction with trim controls should now be fixed.
- Interaction with SAS/Autopilot should now be fixed.

## v0.3.0
##### New
- Use stock Application Launcher.
- Control mode is persisted with command pods, probe cores, and docking ports. The mode used is determined by whichever
part is selected with the *Control From Here* button.
- Control mode is automatically selected for new parts in the editor. Parts in the VAB are placed in Rocket mode and
parts in the SPH are placed in Plane mode.

##### Changes
- Renamed from "Aeroplane Mode" to "Plane Mode".
- Settings configuration has been changed slightly and toggle and hold keys have both been defaulted to None rather
than ScrollLock and Home.

##### Fixes
- Handle switching vessels better.
## v1.1.0
##### New
- Add `KSPAssembly` attribute to assembly.

##### Changes
- `PLANEMODE_USER_SETTINGS` is deprecated (although still supported), a Module Manager patch should now be used to
modify settings. An example patch is distributed in the `PlaneMode/Configuration` directory.
- Clarified log message that made it appeared as if code was being executed more times than it was.
- Simplified the way textures are loaded.

##### Fixes
- Fix Plane mode settings being persisted in certain situations.
- Fix the display of the log level for debug messages.

## v1.0.0
##### Fixes
- Initalize ControlMode to Rocket to avoid warning on vessel load

## v0.4.1
##### Fixes
- Kerbal Space Program v1.0 compatibility

## v0.4.0
##### New
- Added setting to disable Application Launcher (stock toolbar) button.
- Docking controls are now supported.

##### Fixes
- Interaction with trim controls should now be fixed.
- Interaction with SAS/Autopilot should now be fixed.

## v0.3.0
##### New
- Use stock Application Launcher.
- Control mode is persisted with command pods, probe cores, and docking ports. The mode used is determined by whichever
part is selected with the *Control From Here* button.
- Control mode is automatically selected for new parts in the editor. Parts in the VAB are placed in Rocket mode and
parts in the SPH are placed in Plane mode.

##### Changes
- Renamed from "Aeroplane Mode" to "Plane Mode".
- Settings configuration has been changed slightly and toggle and hold keys have both been defaulted to None rather
than ScrollLock and Home.

##### Fixes
- Handle switching vessels better.
12 changes: 3 additions & 9 deletions Settings/DefaultSettings.cfg → Configuration/PlaneMode.cfg
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
// DefaultSettings.cfg - PlaneMode Default Settings
// Do *NOT* modify this file as it will be overwritten on every upgrade.
// Use a Module Manager patch to change settings.

// Do *NOT* modify this file as it will be overwritten on every upgrade. Instead:
// 1. Copy this file to another file named `UserSettings.cfg`
// 2. Change `PLANEMODE_DEFAULT_SETTINGS` to `PLANEMODE_USER_SETTINGS`
// 3. Edit `UserSettings.cfg` as necessary
// 4. Remove any setting you do not explicitly change in `UserSettings.cfg` so that you receive new defaults in the
// future

PLANEMODE_DEFAULT_SETTINGS
PLANEMODE
{
// Key to toggle control mode
// Set `primary` to one of the KeyCodes specified here: http://docs.unity3d.com/ScriptReference/KeyCode.html
Expand Down
31 changes: 31 additions & 0 deletions Configuration/UserSettings.cfg.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// This is an example file for how to modify PlaneMode's configuration using a Module Manager patch.
// Remove the `.example` from the end of the filename and uncomment lines for settings you wish to change.

@PLANEMODE:NEEDS[PlaneMode]
{
// Key to toggle control mode
// Set `primary` to one of the KeyCodes specified here: http://docs.unity3d.com/ScriptReference/KeyCode.html
//@TOGGLE_CONTROL_MODE
//{
// primary = None
// secondary = None
// group = 0
// switchState = Any
//}

// Key to temporarily toggle control mode
// Set `primary` to one of the KeyCodes specified here: http://docs.unity3d.com/ScriptReference/KeyCode.html
//@HOLD_CONTROL_MODE
//{
// primary = None
// secondary = None
// group = 0
// switchState = Any
//}

// Set true to invert pitch in plane mode
//@pitchInvert = false

// Set false to disable the Application Launcher (stock toolbar) button from appearing
//@enableAppLauncherButton = true
}
23 changes: 10 additions & 13 deletions Source/PlaneMode/Log.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ internal static class Log
{
public static LogLevel Level { get; set; }

private static string Prefix
{
get
{
return String.Format("[PlaneMode] [{0}]: ", Level);
}
}

static Log()
{
Level = LogLevel.Info;
Expand All @@ -23,40 +15,45 @@ public static void Error(string format, params object[] args)
{
if ((byte)LogLevel.Error <= (byte)Level)
{
UnityEngine.Debug.LogError(Prefix + String.Format(format, args));
UnityEngine.Debug.LogError(Prefix(LogLevel.Error) + String.Format(format, args));
}
}

public static void Warning(string format, params object[] args)
{
if ((byte)LogLevel.Warning <= (byte)Level)
{
UnityEngine.Debug.LogWarning(Prefix + String.Format(format, args));
UnityEngine.Debug.LogWarning(Prefix(LogLevel.Warning) + String.Format(format, args));
}
}

public static void Info(string format, params object[] args)
{
if ((byte)LogLevel.Info <= (byte)Level)
{
UnityEngine.Debug.Log(Prefix + String.Format(format, args));
UnityEngine.Debug.Log(Prefix(LogLevel.Info) + String.Format(format, args));
}
}

public static void Debug(string format, params object[] args)
{
if ((byte)LogLevel.Debug <= (byte)Level)
{
UnityEngine.Debug.Log(Prefix + String.Format(format, args));
UnityEngine.Debug.Log(Prefix(LogLevel.Debug) + String.Format(format, args));
}
}

public static void Trace(string format, params object[] args)
{
if ((byte)LogLevel.Trace <= (byte)Level)
{
UnityEngine.Debug.Log(Prefix + String.Format(format, args));
UnityEngine.Debug.Log(Prefix(LogLevel.Trace) + String.Format(format, args));
}
}

private static string Prefix(LogLevel level)
{
return String.Format("[PlaneMode] [{0}]: ", level);
}
}
}
3 changes: 1 addition & 2 deletions Source/PlaneMode/ModulePlaneMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ public void ToggleControlMode()
break;
}

Log.Info("Changed control mode for {0} to {1}", part.partInfo.title, ControlMode);

Log.Info("Toggled control mode for {0} to {1}", part.partInfo.title, ControlMode);
Log.Trace("Leaving ModulePlaneMode.ToggleControlMode()");
}

Expand Down
Loading

0 comments on commit fcba504

Please sign in to comment.