Keybind to stop pulling. (#2094)

* keybind to stop pulling.

* smug
This commit is contained in:
derek
2020-09-16 14:58:50 -07:00
committed by GitHub
parent 84230a47ad
commit 158f765895
6 changed files with 20 additions and 2 deletions

View File

@@ -49,6 +49,7 @@ namespace Content.Server.GameObjects.EntitySystems
.Bind(ContentKeyFunctions.SmartEquipBackpack, InputCmdHandler.FromDelegate(HandleSmartEquipBackpack))
.Bind(ContentKeyFunctions.SmartEquipBelt, InputCmdHandler.FromDelegate(HandleSmartEquipBelt))
.Bind(ContentKeyFunctions.MovePulledObject, new PointerInputCmdHandler(HandleMovePulledObject))
.Bind(ContentKeyFunctions.ReleasePulledObject, InputCmdHandler.FromDelegate(HandleReleasePulledObject))
.Register<HandsSystem>();
}
@@ -244,5 +245,14 @@ namespace Content.Server.GameObjects.EntitySystems
return false;
}
private static void HandleReleasePulledObject(ICommonSession session)
{
if (!TryGetAttachedComponent(session as IPlayerSession, out HandsComponent handsComp))
return;
handsComp.StopPull();
}
}
}