Merge branch 'master' into 20-06-24-movement-prediction

This commit is contained in:
Pieter-Jan Briers
2020-06-24 04:04:43 +02:00
2259 changed files with 16436 additions and 11772 deletions

View File

@@ -17,6 +17,7 @@ using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
using System.Collections.Generic;
using System.Linq;
using Content.Shared.GameObjects.EntitySystems;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.GameObjects.Components.Chemistry
@@ -219,23 +220,23 @@ namespace Content.Server.GameObjects.Components.Chemistry
{
protected override void GetData(IEntity user, SolutionComponent component, VerbData data)
{
if (user.TryGetComponent<HandsComponent>(out var hands))
if (!ActionBlockerSystem.CanInteract(user) ||
!user.TryGetComponent<HandsComponent>(out var hands) ||
hands.GetActiveHand == null ||
!hands.GetActiveHand.Owner.TryGetComponent<SolutionComponent>(out var solution))
{
if (hands.GetActiveHand != null)
{
if (hands.GetActiveHand.Owner.TryGetComponent<SolutionComponent>(out var solution))
{
if ((solution.Capabilities & SolutionCaps.PourOut) != 0 &&
(component.Capabilities & SolutionCaps.PourIn) != 0)
{
var heldEntityName = hands.GetActiveHand.Owner?.Prototype?.Name ?? "<Item>";
var myName = component.Owner.Prototype?.Name ?? "<Item>";
data.Visibility = VerbVisibility.Invisible;
return;
}
data.Text= $"Transfer liquid from [{heldEntityName}] to [{myName}].";
return;
}
}
}
if ((solution.Capabilities & SolutionCaps.PourOut) != 0 &&
(component.Capabilities & SolutionCaps.PourIn) != 0)
{
var heldEntityName = hands.GetActiveHand.Owner?.Prototype?.Name ?? "<Item>";
var myName = component.Owner.Prototype?.Name ?? "<Item>";
data.Text= $"Transfer liquid from [{heldEntityName}] to [{myName}].";
return;
}
data.Visibility = VerbVisibility.Invisible;
@@ -318,23 +319,23 @@ namespace Content.Server.GameObjects.Components.Chemistry
{
protected override void GetData(IEntity user, SolutionComponent component, VerbData data)
{
if (user.TryGetComponent<HandsComponent>(out var hands))
if (!ActionBlockerSystem.CanInteract(user) ||
!user.TryGetComponent<HandsComponent>(out var hands) ||
hands.GetActiveHand == null ||
!hands.GetActiveHand.Owner.TryGetComponent<SolutionComponent>(out var solution))
{
if (hands.GetActiveHand != null)
{
if (hands.GetActiveHand.Owner.TryGetComponent<SolutionComponent>(out var solution))
{
if ((solution.Capabilities & SolutionCaps.PourIn) != 0 &&
(component.Capabilities & SolutionCaps.PourOut) != 0)
{
var heldEntityName = hands.GetActiveHand.Owner?.Prototype?.Name ?? "<Item>";
var myName = component.Owner.Prototype?.Name ?? "<Item>";
data.Visibility = VerbVisibility.Invisible;
return;
}
data.Text = $"Transfer liquid from [{myName}] to [{heldEntityName}].";
return;
}
}
}
if ((solution.Capabilities & SolutionCaps.PourIn) != 0 &&
(component.Capabilities & SolutionCaps.PourOut) != 0)
{
var heldEntityName = hands.GetActiveHand.Owner?.Prototype?.Name ?? "<Item>";
var myName = component.Owner.Prototype?.Name ?? "<Item>";
data.Text = $"Transfer liquid from [{myName}] to [{heldEntityName}].";
return;
}
data.Visibility = VerbVisibility.Invisible;