v0.19.8.0

This commit is contained in:
Juan Pablo Arce
2022-09-28 21:30:52 -03:00
parent fec8131243
commit 3ca584f2fc
152 changed files with 1931 additions and 1071 deletions
@@ -242,7 +242,7 @@ namespace Barotrauma
Submarine parentSub = item.CurrentHull?.Submarine ?? item.GetRootInventoryOwner()?.Submarine;
if (parentSub == null || parentSub.Info.Type != SubmarineType.Player)
{
return;
return;
}
}
State = 1;
@@ -254,23 +254,16 @@ namespace Barotrauma
}
}
public override void End()
protected override bool DetermineCompleted()
{
var root = item?.GetRootContainer() ?? item;
if (root?.CurrentHull?.Submarine == null || (!root.CurrentHull.Submarine.AtEndExit && !root.CurrentHull.Submarine.AtStartExit) || item.Removed)
{
return;
}
if (Prefab.LocationTypeChangeOnCompleted != null)
{
ChangeLocationType(Prefab.LocationTypeChangeOnCompleted);
}
return root?.CurrentHull?.Submarine != null && (root.CurrentHull.Submarine.AtEndExit || root.CurrentHull.Submarine.AtStartExit) && !item.Removed;
}
protected override void EndMissionSpecific(bool completed)
{
item?.Remove();
item = null;
GiveReward();
completed = true;
failed = !completed && state > 0;
}
}