Bunch of crew AI bugfixes/improvements:
- replacing empty oxygen tanks - fixed characters only fixing leaks in the outer hull - prioritizing large leaks over small ones - fixed characters doing nothing after fixing all the leaks (and sinking to the bottom if they happen to be outside) - more accurate welder aiming - AIObjectiveGetItem makes the characters go to the cabinet/container an item is inside, not to the actual item (which may not be actually positioned at the container)
This commit is contained in:
@@ -466,6 +466,20 @@ namespace Barotrauma
|
||||
}
|
||||
return CurrentHull;
|
||||
}
|
||||
|
||||
public Item GetRootContainer()
|
||||
{
|
||||
if (Container == null) return null;
|
||||
|
||||
Item rootContainer = Container;
|
||||
|
||||
while (rootContainer.Container != null)
|
||||
{
|
||||
rootContainer = rootContainer.Container;
|
||||
}
|
||||
|
||||
return rootContainer;
|
||||
}
|
||||
|
||||
public void AddTag(string tag)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user