Upload from upload_mods.ps1
This commit is contained in:
6
Scripts/Input/PlayerActionRebirthData.cs
Normal file
6
Scripts/Input/PlayerActionRebirthData.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
public class PlayerActionRebirthData : PlayerActionData
|
||||
{
|
||||
public static readonly ActionTab TabRebirth = new ActionTab("inpTabRebirth", 35);
|
||||
public static readonly ActionGroup GroupRebirth = new ActionGroup("inpGrpRebirthName", null, 35, TabRebirth);
|
||||
}
|
||||
|
||||
71
Scripts/Input/PlayerActionsRebirth.cs
Normal file
71
Scripts/Input/PlayerActionsRebirth.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using InControl;
|
||||
using System.Collections.Generic;
|
||||
public class PlayerActionsRebirth : CustomPlayerActionVersionBase
|
||||
{
|
||||
PlayerAction ActivateSlot1;
|
||||
public readonly List<PlayerAction> ActivateActions = new List<PlayerAction>();
|
||||
|
||||
public int ActivateSlotIsPressed
|
||||
{
|
||||
get
|
||||
{
|
||||
for (int i = 0; i < ActivateActions.Count; i++)
|
||||
if (ActivateActions[i].IsPressed)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
public int ActivateSlotWasPressed
|
||||
{
|
||||
get
|
||||
{
|
||||
for (int i = 0; i < ActivateActions.Count; i++)
|
||||
if (ActivateActions[i].WasPressed)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
public int ActivateSlotWasReleased
|
||||
{
|
||||
get
|
||||
{
|
||||
for (int i = 0; i < ActivateActions.Count; i++)
|
||||
if (ActivateActions[i].WasReleased)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
public PlayerActionsRebirth()
|
||||
{
|
||||
Name = "vehicleRebirth";
|
||||
Version = 1;
|
||||
Instance = this;
|
||||
Enabled = false;
|
||||
ActivateActions.Add(ActivateSlot1);
|
||||
var vehicleActions = Platform.PlatformManager.NativePlatform.Input.PrimaryPlayer.VehicleActions;
|
||||
var permaActions = Platform.PlatformManager.NativePlatform.Input.PrimaryPlayer.PermanentActions;
|
||||
UserData = new PlayerActionData.ActionSetUserData(new PlayerActionsBase[] { vehicleActions, permaActions });
|
||||
vehicleActions.AddUniConflict(this);
|
||||
permaActions.AddUniConflict(this);
|
||||
}
|
||||
|
||||
public override void CreateActions()
|
||||
{
|
||||
ActivateSlot1 = CreatePlayerAction("ActivateSlot1");
|
||||
ActivateSlot1.UserData = new PlayerActionData.ActionUserData("inputVehicleCruiseControl", "inputVehicleCruiseControlDesc", PlayerActionRebirthData.GroupRebirth, PlayerActionData.EAppliesToInputType.Both, true);
|
||||
}
|
||||
public override void CreateDefaultJoystickBindings()
|
||||
{
|
||||
//ActivateSlot1.AddDefaultBinding(InputControlType.DPadUp);
|
||||
}
|
||||
|
||||
public override void CreateDefaultKeyboardBindings()
|
||||
{
|
||||
ActivateSlot1.AddDefaultBinding(new Key[] { Key.Q });
|
||||
}
|
||||
|
||||
public static PlayerActionsRebirth Instance { get; private set; }
|
||||
public override ControllerActionType ControllerActionDisplay => ControllerActionType.Vehicle;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user