Fix two grafana errors (#10858)
This commit is contained in:
@@ -191,6 +191,9 @@ namespace Content.Server.ParticleAccelerator.Components
|
|||||||
|
|
||||||
protected override void OnRemove()
|
protected override void OnRemove()
|
||||||
{
|
{
|
||||||
|
_fireCancelTokenSrc?.Cancel();
|
||||||
|
_fireCancelTokenSrc = null;
|
||||||
|
|
||||||
Master = null;
|
Master = null;
|
||||||
foreach (var part in AllParts())
|
foreach (var part in AllParts())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -119,9 +119,8 @@ namespace Content.Shared.Interaction
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void HandleInteractInventorySlotEvent(InteractInventorySlotEvent msg, EntitySessionEventArgs args)
|
private void HandleInteractInventorySlotEvent(InteractInventorySlotEvent msg, EntitySessionEventArgs args)
|
||||||
{
|
{
|
||||||
var coords = Transform(msg.ItemUid).Coordinates;
|
|
||||||
// client sanitization
|
// 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}");
|
Logger.InfoS("system.interaction", $"Inventory interaction validation failed. Session={args.SenderSession}");
|
||||||
return;
|
return;
|
||||||
@@ -134,7 +133,7 @@ namespace Content.Shared.Interaction
|
|||||||
|
|
||||||
if (msg.AltInteract)
|
if (msg.AltInteract)
|
||||||
// Use 'UserInteraction' function - behaves as if the user alt-clicked the item in the world.
|
// 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
|
else
|
||||||
// User used 'E'. We want to activate it, not simulate clicking on the item
|
// User used 'E'. We want to activate it, not simulate clicking on the item
|
||||||
InteractionActivate(user.Value, msg.ItemUid);
|
InteractionActivate(user.Value, msg.ItemUid);
|
||||||
|
|||||||
Reference in New Issue
Block a user