Add pulling (#1409)
* Initial framework for pulling. * Make it possible to pull items via (temporary) keybind Ctrl+Click, make items follow the player correctly. * Make other objects pullable, implement functionality for moving an object being pulled, make only one object able to be pulled at a time. * Make sure that MoveTo won't allow collisions with the player * Update everything to work with the new physics engine * Update Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs Co-authored-by: ComicIronic <comicironic@gmail.com> * Physics update and convert to direct type casts * Add notnull checks * Add pull keybinds to the tutorial window * Move PullController to shared * Fix pulled items getting left behind * Fix moving pulled objects into walls * Remove flooring of coordinates when moving pulled objects * Add missing null check in PutInHand * Change pulling keybind to control and throwing to alt * Change PhysicsComponent references to IPhysicsComponent * Add trying to pull a pulled entity disabling the pull * Add pulled status effect * Fix merge conflicts * Merge fixes * Make players pullable * Fix being able to pull yourself * Change pull moving to use a velocity * Update pulled and pulling icons to not be buckle A tragedy * Make pulled and pulling icons more consistent * Remove empty not pulled and not pulling images * Pulled icon update * Pulled icon update * Add clicking pulling status effect to stop the pull * Fix spacewalking when pulling * Merge conflict fixes * Add a pull verb * Fix nullable error * Add pulling through the entity drop down menu Co-authored-by: Jackson Lewis <inquisitivepenguin@protonmail.com> Co-authored-by: ComicIronic <comicironic@gmail.com>
This commit is contained in:
@@ -14,6 +14,7 @@ using Robust.Shared.ViewVariables;
|
||||
namespace Content.Client.GameObjects.Components.Items
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(ISharedHandsComponent))]
|
||||
public class HandsComponent : SharedHandsComponent
|
||||
{
|
||||
private HandsGui? _gui;
|
||||
|
||||
@@ -447,7 +447,9 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
}
|
||||
|
||||
if (args.Function == EngineKeyFunctions.Use ||
|
||||
args.Function == ContentKeyFunctions.Point)
|
||||
args.Function == ContentKeyFunctions.Point ||
|
||||
args.Function == ContentKeyFunctions.TryPullObject ||
|
||||
args.Function == ContentKeyFunctions.MovePulledObject)
|
||||
{
|
||||
// TODO: Remove an entity from the menu when it is deleted
|
||||
if (_entity.Deleted)
|
||||
|
||||
@@ -136,6 +136,7 @@
|
||||
"TrashSpawner",
|
||||
"Pill",
|
||||
"RCD",
|
||||
"Pullable",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ namespace Content.Client.Input
|
||||
human.AddFunction(ContentKeyFunctions.OpenCharacterMenu);
|
||||
human.AddFunction(ContentKeyFunctions.ActivateItemInWorld);
|
||||
human.AddFunction(ContentKeyFunctions.ThrowItemInHand);
|
||||
human.AddFunction(ContentKeyFunctions.TryPullObject);
|
||||
human.AddFunction(ContentKeyFunctions.MovePulledObject);
|
||||
human.AddFunction(ContentKeyFunctions.OpenContextMenu);
|
||||
human.AddFunction(ContentKeyFunctions.OpenCraftingMenu);
|
||||
human.AddFunction(ContentKeyFunctions.OpenInventoryMenu);
|
||||
@@ -36,6 +38,8 @@ namespace Content.Client.Input
|
||||
human.AddFunction(ContentKeyFunctions.ToggleCombatMode);
|
||||
human.AddFunction(ContentKeyFunctions.WideAttack);
|
||||
human.AddFunction(ContentKeyFunctions.Point);
|
||||
human.AddFunction(ContentKeyFunctions.TryPullObject);
|
||||
human.AddFunction(ContentKeyFunctions.MovePulledObject);
|
||||
|
||||
var ghost = contexts.New("ghost", "common");
|
||||
ghost.AddFunction(EngineKeyFunctions.MoveUp);
|
||||
|
||||
@@ -81,6 +81,8 @@ Use hand/object in hand: [color=#a4885c]{22}[/color]
|
||||
Do wide attack: [color=#a4885c]{23}[/color]
|
||||
Use targeted entity: [color=#a4885c]{11}[/color]
|
||||
Throw held item: [color=#a4885c]{12}[/color]
|
||||
Pull entity: [color=#a4885c]{30}[/color]
|
||||
Move pulled entity: [color=#a4885c]{29}[/color]
|
||||
Examine entity: [color=#a4885c]{13}[/color]
|
||||
Point somewhere: [color=#a4885c]{28}[/color]
|
||||
Open entity context menu: [color=#a4885c]{14}[/color]
|
||||
@@ -116,7 +118,9 @@ Toggle sandbox window: [color=#a4885c]{21}[/color]",
|
||||
Key(SmartEquipBelt),
|
||||
Key(FocusOOC),
|
||||
Key(FocusAdminChat),
|
||||
Key(Point)));
|
||||
Key(Point),
|
||||
Key(TryPullObject),
|
||||
Key(MovePulledObject)));
|
||||
|
||||
//Gameplay
|
||||
VBox.AddChild(new Label { FontOverride = headerFont, Text = "\nGameplay" });
|
||||
|
||||
Reference in New Issue
Block a user