|
|
|
@ -11,6 +11,9 @@ namespace SCJMapper_V2.Layout
|
|
|
|
|
/// </summary>
|
|
|
|
|
class ActionGroups
|
|
|
|
|
{
|
|
|
|
|
// logger
|
|
|
|
|
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// All actionmap groups
|
|
|
|
|
/// </summary>
|
|
|
|
@ -24,7 +27,7 @@ namespace SCJMapper_V2.Layout
|
|
|
|
|
Player,
|
|
|
|
|
EVA,
|
|
|
|
|
Vehicle,
|
|
|
|
|
VehicleWeapons,
|
|
|
|
|
//VehicleWeapons, // removed in 3.10.0
|
|
|
|
|
Lights,
|
|
|
|
|
Interaction,
|
|
|
|
|
Spectator,
|
|
|
|
@ -39,33 +42,57 @@ namespace SCJMapper_V2.Layout
|
|
|
|
|
static ActionGroups()
|
|
|
|
|
{
|
|
|
|
|
m_actionDict = new Dictionary<EGroup, List<string>>( );
|
|
|
|
|
// Define which maps belongs to which group
|
|
|
|
|
var x = new List<string>( ) { "spaceship_general", "spaceship_view", "spaceship_movement", "spaceship_docking", "spaceship_power", "IFCS_controls" };
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceFlight, x );
|
|
|
|
|
x = new List<string>( ) { "spaceship_targeting", "spaceship_target_hailing", "spaceship_scanning", "spaceship_ping", "spaceship_radar" };
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceTargeting, x );
|
|
|
|
|
x = new List<string>( ) { "spaceship_mining" };
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceMining, x );
|
|
|
|
|
x = new List<string>( ) { "spaceship_turret", "spaceship_weapons", "spaceship_missiles", "spaceship_auto_weapons" };
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceWeapons, x );
|
|
|
|
|
x = new List<string>( ) { "spaceship_defensive" };
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceDefensive, x );
|
|
|
|
|
x = new List<string>( ) { "lights_controller" };
|
|
|
|
|
m_actionDict.Add( EGroup.Lights, x );
|
|
|
|
|
x = new List<string>( ) { "default", "prone", "player", "player_choice", "player_emotes", "player_input_optical_tracking" };
|
|
|
|
|
m_actionDict.Add( EGroup.Player, x );
|
|
|
|
|
x = new List<string>( ) { "zero_gravity_eva" };
|
|
|
|
|
m_actionDict.Add( EGroup.EVA, x );
|
|
|
|
|
x = new List<string>( ) { "vehicle_general", "vehicle_driver" };
|
|
|
|
|
m_actionDict.Add( EGroup.Vehicle, x );
|
|
|
|
|
x = new List<string>( ) { "vehicle_gunner" };
|
|
|
|
|
m_actionDict.Add( EGroup.VehicleWeapons, x );
|
|
|
|
|
x = new List<string>( ) { "spaceship_hud", "ui_textfield", "ui_notification" };
|
|
|
|
|
m_actionDict.Add( EGroup.Interaction, x );
|
|
|
|
|
x = new List<string>( ) { "spectator", "flycam", "view_director_mode" };
|
|
|
|
|
m_actionDict.Add( EGroup.Spectator, x );
|
|
|
|
|
x = new List<string>( ) { };
|
|
|
|
|
m_actionDict.Add( EGroup.Others, x );
|
|
|
|
|
|
|
|
|
|
// Try to read the user file
|
|
|
|
|
var lg = LayoutGroupsJson.FromJson( TheUser.LayoutJsonFileName( ) );
|
|
|
|
|
if ( lg != null ) {
|
|
|
|
|
log.Info( "Layout-ActionGroups: use user provided file" );
|
|
|
|
|
// read from the user file
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceFlight, lg.SpaceFlight );
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceTargeting, lg.SpaceTargeting );
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceMining, lg.SpaceMining );
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceWeapons, lg.SpaceWeapons );
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceDefensive, lg.SpaceDefensive );
|
|
|
|
|
m_actionDict.Add( EGroup.Lights, lg.Lights );
|
|
|
|
|
m_actionDict.Add( EGroup.Player, lg.Player );
|
|
|
|
|
m_actionDict.Add( EGroup.EVA, lg.EVA );
|
|
|
|
|
m_actionDict.Add( EGroup.Vehicle, lg.Vehicle );
|
|
|
|
|
//m_actionDict.Add( EGroup.VehicleWeapons, lg.VehicleWeapons ); // removed in 3.10.0
|
|
|
|
|
m_actionDict.Add( EGroup.Interaction, lg.Interaction );
|
|
|
|
|
m_actionDict.Add( EGroup.Spectator, lg.Spectator );
|
|
|
|
|
m_actionDict.Add( EGroup.Others, lg.Others );
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
log.Info( "Layout-ActionGroups: user provided file not available, use internal backup mapping" );
|
|
|
|
|
// use the built in backup assignment (as of 3.10.0/1
|
|
|
|
|
// Define which maps belongs to which group
|
|
|
|
|
var x = new List<string>( ) { "spaceship_general", "spaceship_view", "spaceship_movement", "spaceship_docking", "spaceship_power", "IFCS_controls" };
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceFlight, x );
|
|
|
|
|
x = new List<string>( ) { "spaceship_targeting", "spaceship_target_hailing", "spaceship_scanning", "spaceship_ping", "spaceship_radar", "spaceship_targeting_advanced" };
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceTargeting, x );
|
|
|
|
|
x = new List<string>( ) { "spaceship_mining" };
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceMining, x );
|
|
|
|
|
x = new List<string>( ) { "turret_main", "spaceship_weapons", "spaceship_missiles", "spaceship_auto_weapons" };
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceWeapons, x );
|
|
|
|
|
x = new List<string>( ) { "spaceship_defensive" };
|
|
|
|
|
m_actionDict.Add( EGroup.SpaceDefensive, x );
|
|
|
|
|
x = new List<string>( ) { "lights_controller" };
|
|
|
|
|
m_actionDict.Add( EGroup.Lights, x );
|
|
|
|
|
x = new List<string>( ) { "default", "prone", "player", "player_choice", "player_emotes", "player_input_optical_tracking" };
|
|
|
|
|
m_actionDict.Add( EGroup.Player, x );
|
|
|
|
|
x = new List<string>( ) { "zero_gravity_eva" };
|
|
|
|
|
m_actionDict.Add( EGroup.EVA, x );
|
|
|
|
|
x = new List<string>( ) { "vehicle_general", "vehicle_driver" };
|
|
|
|
|
m_actionDict.Add( EGroup.Vehicle, x );
|
|
|
|
|
//x = new List<string>( ) { "vehicle_gunner" }; // removed in 3.10.0
|
|
|
|
|
//m_actionDict.Add( EGroup.VehicleWeapons, x ); // removed in 3.10.0
|
|
|
|
|
x = new List<string>( ) { "spaceship_hud", "ui_textfield", "ui_notification" };
|
|
|
|
|
m_actionDict.Add( EGroup.Interaction, x );
|
|
|
|
|
x = new List<string>( ) { "spectator", "flycam", "view_director_mode" };
|
|
|
|
|
m_actionDict.Add( EGroup.Spectator, x );
|
|
|
|
|
x = new List<string>( ) { "server_renderer" };
|
|
|
|
|
m_actionDict.Add( EGroup.Others, x );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|