Various minor interaction features. There is no concept of gravity in the game yet, so items drift through space or the hallways of a station until they are stopped. Thrown items do not collide with walls because making them collidable makes them collide with EVERYTHING, including the player. We need collision groups in the physics system. Because of the previous problems the velocity things are throw at is set quite low, it can be tweaked after the other mentioned issues are resolved.
26 lines
986 B
C#
26 lines
986 B
C#
using Content.Shared.Input;
|
|
using SS14.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 human = contexts.GetContext("human");
|
|
human.AddFunction(ContentKeyFunctions.SwapHands);
|
|
human.AddFunction(ContentKeyFunctions.Drop);
|
|
human.AddFunction(ContentKeyFunctions.ActivateItemInHand);
|
|
human.AddFunction(ContentKeyFunctions.OpenCharacterMenu);
|
|
human.AddFunction(ContentKeyFunctions.ExamineEntity);
|
|
human.AddFunction(ContentKeyFunctions.UseItemInHand);
|
|
human.AddFunction(ContentKeyFunctions.ActivateItemInWorld);
|
|
human.AddFunction(ContentKeyFunctions.ThrowItemInHand);
|
|
}
|
|
}
|
|
}
|