(a410fd46c) Trying to help the merge script through a jungle of merges

This commit is contained in:
Joonas Rikkonen
2019-06-04 16:19:53 +03:00
parent 5208b922d8
commit bea7b58ff3
84 changed files with 1720 additions and 929 deletions
@@ -98,7 +98,7 @@ namespace Barotrauma
{
if (item.GetComponent<Items.Components.Repairable>() != null)
{
item.Condition = item.Health;
item.Condition = item.Prefab.Health;
}
}
}
@@ -176,7 +176,16 @@ namespace Barotrauma
Level.Loaded.Seed + (outpost == Level.Loaded.StartOutpost ? "start" : "end"));
InitializeWatchman(spawnedCharacter);
var objectiveManager = (spawnedCharacter.AIController as HumanAIController)?.ObjectiveManager;
objectiveManager?.SetOrder(new AIObjectiveGoTo(watchmanSpawnpoint, spawnedCharacter, objectiveManager, repeat: true, getDivingGearIfNeeded: false));
if (objectiveManager != null)
{
var moveOrder = new AIObjectiveGoTo(watchmanSpawnpoint, spawnedCharacter, objectiveManager, repeat: true, getDivingGearIfNeeded: false);
moveOrder.Completed += () =>
{
// Turn towards the center of the sub. Doesn't work in all possible cases, but this is the simplest solution for now.
spawnedCharacter.AnimController.TargetDir = spawnedCharacter.Submarine.WorldPosition.X > spawnedCharacter.WorldPosition.X ? Direction.Right : Direction.Left;
};
objectiveManager.SetOrder(moveOrder);
}
if (watchmanJob != null)
{
spawnedCharacter.GiveJobItems();