Skip to content

Commit 39d7e48

Browse files
committed
Merge pull request #54 from Apokee/topic/action_group_support
Action Group Support
2 parents 624d6b2 + d473d62 commit 39d7e48

File tree

3 files changed

+81
-56
lines changed

3 files changed

+81
-56
lines changed

CHANGES.md

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

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ The control mode is stored with command pods, probe cores, and docking ports. Th
3232
whether the part was created in the VAB (Rocket) or SPH (Plane). Existing parts in flight will default to Rocket mode.
3333
The part used is determined by which is selected by the *Control From Here* button. You can toggle the control mode of
3434
a part by right clicking on it in the editor or in flight and press *Toggle Control Mode*. Pressing the Application
35-
Launcher button will also toggle the control mode of the current controlling part.
35+
Launcher button will also toggle the control mode of the current controlling part. Actions are also available for use
36+
in action groups to toggle the control mode or switch to a specific mode.
3637

3738
## Configuration
3839

Source/PlaneMode/ModulePlaneMode.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,24 @@ public void ToggleControlMode()
125125
Log.Trace("Leaving ModulePlaneMode.ToggleControlMode()");
126126
}
127127

128+
[KSPAction("Control Mode: Toggle")]
129+
public void ActionToggleControlMode(KSPActionParam p)
130+
{
131+
ToggleControlMode();
132+
}
133+
134+
[KSPAction("Control Mode: Rocket")]
135+
public void ActionSetRocketControlMode(KSPActionParam p)
136+
{
137+
SetControlMode(ControlMode.Rocket);
138+
}
139+
140+
[KSPAction("Control Mode: Plane")]
141+
public void ActionSetPlaneControlMode(KSPActionParam p)
142+
{
143+
SetControlMode(ControlMode.Plane);
144+
}
145+
128146
public void SetControlMode(ControlMode controlMode)
129147
{
130148
Log.Trace("Entering ModulePlaneMode.SetControlMode()");

0 commit comments

Comments
 (0)