Unstable 0.1400.7.0 (Coronavirus edition)

This commit is contained in:
Markus Isberg
2021-07-23 21:01:17 +03:00
parent ee5308b39f
commit 47707c824a
133 changed files with 1310 additions and 533 deletions
@@ -685,7 +685,7 @@ namespace Barotrauma
if (HasTargetType(TargetType.NearbyItems))
{
//optimization for powered components that can be easily fetched from Powered.PoweredList
if (targetIdentifiers.Count == 1 &&
if (targetIdentifiers?.Count == 1 &&
(targetIdentifiers.Contains("powered") || targetIdentifiers.Contains("junctionbox") || targetIdentifiers.Contains("relaycomponent")))
{
foreach (Powered powered in Powered.PoweredList)
@@ -971,6 +971,13 @@ namespace Barotrauma
{
position = targetLimb.WorldPosition;
}
else if (HasTargetType(TargetType.Contained))
{
if (targets.FirstOrDefault(t => t is Item) is Item targetItem)
{
position = targetItem.WorldPosition;
}
}
}
}
position += Offset;