2018-08-16 15:57:11 -07:00
|
|
|
|
using Content.Shared.Input;
|
2019-04-15 21:11:38 -06:00
|
|
|
|
using Robust.Shared.Input;
|
2018-08-16 15:57:11 -07:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.Input
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2018-09-20 18:19:04 +02:00
|
|
|
|
/// Contains a helper function for setting up all content
|
2018-08-16 15:57:11 -07:00
|
|
|
|
/// contexts, and modifying existing engine ones.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static class ContentContexts
|
|
|
|
|
|
{
|
|
|
|
|
|
public static void SetupContexts(IInputContextContainer contexts)
|
|
|
|
|
|
{
|
2019-04-13 09:45:09 +02:00
|
|
|
|
var common = contexts.GetContext("common");
|
|
|
|
|
|
common.AddFunction(ContentKeyFunctions.FocusChat);
|
2019-05-16 14:41:43 -07:00
|
|
|
|
common.AddFunction(ContentKeyFunctions.ExamineEntity);
|
2019-07-19 14:21:36 +02:00
|
|
|
|
common.AddFunction(ContentKeyFunctions.OpenTutorial);
|
2020-04-30 12:45:21 +02:00
|
|
|
|
common.AddFunction(ContentKeyFunctions.TakeScreenshot);
|
|
|
|
|
|
common.AddFunction(ContentKeyFunctions.TakeScreenshotNoUI);
|
2019-04-13 09:45:09 +02:00
|
|
|
|
|
2018-08-16 15:57:11 -07:00
|
|
|
|
var human = contexts.GetContext("human");
|
|
|
|
|
|
human.AddFunction(ContentKeyFunctions.SwapHands);
|
|
|
|
|
|
human.AddFunction(ContentKeyFunctions.Drop);
|
|
|
|
|
|
human.AddFunction(ContentKeyFunctions.ActivateItemInHand);
|
|
|
|
|
|
human.AddFunction(ContentKeyFunctions.OpenCharacterMenu);
|
2018-08-22 01:19:47 -07:00
|
|
|
|
human.AddFunction(ContentKeyFunctions.ActivateItemInWorld);
|
|
|
|
|
|
human.AddFunction(ContentKeyFunctions.ThrowItemInHand);
|
2018-11-21 20:58:11 +01:00
|
|
|
|
human.AddFunction(ContentKeyFunctions.OpenContextMenu);
|
2019-07-17 21:37:58 +02:00
|
|
|
|
human.AddFunction(ContentKeyFunctions.OpenCraftingMenu);
|
2019-07-20 13:11:42 +02:00
|
|
|
|
human.AddFunction(ContentKeyFunctions.OpenInventoryMenu);
|
2020-05-05 00:39:15 +02:00
|
|
|
|
human.AddFunction(ContentKeyFunctions.SmartEquipBackpack);
|
|
|
|
|
|
human.AddFunction(ContentKeyFunctions.SmartEquipBelt);
|
2019-08-04 16:03:51 -07:00
|
|
|
|
human.AddFunction(ContentKeyFunctions.MouseMiddle);
|
2019-09-26 22:32:32 +02:00
|
|
|
|
human.AddFunction(ContentKeyFunctions.ToggleCombatMode);
|
2020-05-03 14:26:49 +02:00
|
|
|
|
human.AddFunction(ContentKeyFunctions.WideAttack);
|
2018-09-20 18:19:04 +02:00
|
|
|
|
|
|
|
|
|
|
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);
|
2018-11-21 20:58:11 +01:00
|
|
|
|
ghost.AddFunction(ContentKeyFunctions.OpenContextMenu);
|
2020-02-02 16:38:51 -05:00
|
|
|
|
|
|
|
|
|
|
common.AddFunction(ContentKeyFunctions.OpenEntitySpawnWindow);
|
|
|
|
|
|
common.AddFunction(ContentKeyFunctions.OpenSandboxWindow);
|
|
|
|
|
|
common.AddFunction(ContentKeyFunctions.OpenTileSpawnWindow);
|
2018-08-16 15:57:11 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|