Picking items from outside the sub, replcaed fabricator.png with separate sprites for each machine, descriptions moved from itemprefab to the mapentityprefab base class, editortutorial progress
This commit is contained in:
@@ -64,7 +64,7 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Vector2.Distance(character.SimPosition, container.Item.SimPosition) > container.Item.PickDistance
|
||||
if (Vector2.Distance(character.Position, container.Item.Position) > container.Item.PickDistance
|
||||
&& !container.Item.IsInsideTrigger(character.Position))
|
||||
{
|
||||
AddSubObjective(new AIObjectiveGoTo(container.Item, character));
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (targetItem != null)
|
||||
{
|
||||
if (Vector2.Distance(character.SimPosition, targetItem.SimPosition) < targetItem.PickDistance)
|
||||
if (Vector2.Distance(character.Position, targetItem.Position) < targetItem.PickDistance)
|
||||
{
|
||||
int targetSlot = -1;
|
||||
if (equip)
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace Barotrauma
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
allowedDistance = Math.Max(item.PickDistance, allowedDistance);
|
||||
allowedDistance = Math.Max(ConvertUnits.ToSimUnits(item.PickDistance), allowedDistance);
|
||||
if (item.IsInsideTrigger(character.WorldPosition)) completed = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (component.CanBeSelected)
|
||||
{
|
||||
if (Vector2.Distance(character.SimPosition, component.Item.SimPosition) < component.Item.PickDistance
|
||||
if (Vector2.Distance(character.Position, component.Item.Position) < component.Item.PickDistance
|
||||
|| component.Item.IsInsideTrigger(character.WorldPosition))
|
||||
{
|
||||
if (character.SelectedConstruction != component.Item && component.CanBeSelected)
|
||||
|
||||
Reference in New Issue
Block a user