43 lines
1.9 KiB
C#
43 lines
1.9 KiB
C#
using Content.Shared.Input;
|
|
using Robust.Shared.Input;
|
|
|
|
namespace Content.Client.Input
|
|
{
|
|
/// <summary>
|
|
/// Contains a helper function for setting up all content
|
|
/// contexts, and modifying existing engine ones.
|
|
/// </summary>
|
|
public static class ContentContexts
|
|
{
|
|
public static void SetupContexts(IInputContextContainer contexts)
|
|
{
|
|
var common = contexts.GetContext("common");
|
|
common.AddFunction(ContentKeyFunctions.FocusChat);
|
|
common.AddFunction(ContentKeyFunctions.ExamineEntity);
|
|
common.AddFunction(ContentKeyFunctions.OpenTutorial);
|
|
|
|
var human = contexts.GetContext("human");
|
|
human.AddFunction(ContentKeyFunctions.SwapHands);
|
|
human.AddFunction(ContentKeyFunctions.Drop);
|
|
human.AddFunction(ContentKeyFunctions.ActivateItemInHand);
|
|
human.AddFunction(ContentKeyFunctions.OpenCharacterMenu);
|
|
human.AddFunction(ContentKeyFunctions.ActivateItemInWorld);
|
|
human.AddFunction(ContentKeyFunctions.ThrowItemInHand);
|
|
human.AddFunction(ContentKeyFunctions.OpenContextMenu);
|
|
human.AddFunction(ContentKeyFunctions.OpenCraftingMenu);
|
|
human.AddFunction(ContentKeyFunctions.OpenInventoryMenu);
|
|
human.AddFunction(ContentKeyFunctions.MouseMiddle);
|
|
// Disabled until there is feedback, so hitting tab doesn't suddenly break interaction.
|
|
// human.AddFunction(ContentKeyFunctions.ToggleCombatMode);
|
|
|
|
var ghost = contexts.New("ghost", "common");
|
|
ghost.AddFunction(EngineKeyFunctions.MoveUp);
|
|
ghost.AddFunction(EngineKeyFunctions.MoveDown);
|
|
ghost.AddFunction(EngineKeyFunctions.MoveLeft);
|
|
ghost.AddFunction(EngineKeyFunctions.MoveRight);
|
|
ghost.AddFunction(EngineKeyFunctions.Run);
|
|
ghost.AddFunction(ContentKeyFunctions.OpenContextMenu);
|
|
}
|
|
}
|
|
}
|