Faction Test 100.10.0.0
This commit is contained in:
+9
@@ -238,6 +238,15 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsInTargetSlot(Item item)
|
||||
{
|
||||
if (container?.Inventory is ItemInventory inventory && TargetSlot is not null)
|
||||
{
|
||||
return inventory.IsInSlot(item, (int)TargetSlot);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
+2
@@ -115,6 +115,8 @@ namespace Barotrauma
|
||||
{
|
||||
objective.TargetSlot = container.FindSuitableSubContainerIndex(OXYGEN_SOURCE);
|
||||
}
|
||||
// Only remove the oxygen source being replaced
|
||||
objective.RemoveExistingPredicate = i => objective.IsInTargetSlot(i);
|
||||
return objective;
|
||||
},
|
||||
onAbandon: () =>
|
||||
|
||||
Reference in New Issue
Block a user