mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
Fix two grafana errors (#10858)
This commit is contained in:
@@ -119,9 +119,8 @@ namespace Content.Shared.Interaction
|
||||
/// </summary>
|
||||
private void HandleInteractInventorySlotEvent(InteractInventorySlotEvent msg, EntitySessionEventArgs args)
|
||||
{
|
||||
var coords = Transform(msg.ItemUid).Coordinates;
|
||||
// client sanitization
|
||||
if (!ValidateClientInput(args.SenderSession, coords, msg.ItemUid, out var user))
|
||||
if (!TryComp(msg.ItemUid, out TransformComponent? itemXform) || !ValidateClientInput(args.SenderSession, itemXform.Coordinates, msg.ItemUid, out var user))
|
||||
{
|
||||
Logger.InfoS("system.interaction", $"Inventory interaction validation failed. Session={args.SenderSession}");
|
||||
return;
|
||||
@@ -134,7 +133,7 @@ namespace Content.Shared.Interaction
|
||||
|
||||
if (msg.AltInteract)
|
||||
// Use 'UserInteraction' function - behaves as if the user alt-clicked the item in the world.
|
||||
UserInteraction(user.Value, coords, msg.ItemUid, msg.AltInteract);
|
||||
UserInteraction(user.Value, itemXform.Coordinates, msg.ItemUid, msg.AltInteract);
|
||||
else
|
||||
// User used 'E'. We want to activate it, not simulate clicking on the item
|
||||
InteractionActivate(user.Value, msg.ItemUid);
|
||||
|
||||
Reference in New Issue
Block a user