v1.0.7.0 (Full Release)
This commit is contained in:
@@ -21,6 +21,9 @@ namespace Barotrauma
|
||||
[Serialize(true, IsPropertySaveable.Yes)]
|
||||
public bool IgnoreIncapacitatedCharacters { get; set; }
|
||||
|
||||
[Serialize(false, IsPropertySaveable.Yes)]
|
||||
public bool AllowHiddenItems { get; set; }
|
||||
|
||||
private bool isFinished = false;
|
||||
|
||||
public TagAction(ScriptedEvent parentEvent, ContentXElement element) : base(parentEvent, element)
|
||||
@@ -139,7 +142,7 @@ namespace Barotrauma
|
||||
|
||||
private bool IsValidItem(Item it)
|
||||
{
|
||||
return !it.HiddenInGame && SubmarineTypeMatches(it.Submarine);
|
||||
return (!it.HiddenInGame || AllowHiddenItems) && SubmarineTypeMatches(it.Submarine);
|
||||
}
|
||||
|
||||
private bool SubmarineTypeMatches(Submarine sub)
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace Barotrauma
|
||||
{
|
||||
foreach (Entity entity in Entity.GetEntities())
|
||||
{
|
||||
if (targetPredicates[tag].Any(p => p(entity)))
|
||||
if (targetPredicates[tag].Any(p => p(entity)) && !targetsToReturn.Contains(entity))
|
||||
{
|
||||
targetsToReturn.Add(entity);
|
||||
}
|
||||
@@ -131,7 +131,7 @@ namespace Barotrauma
|
||||
{
|
||||
foreach (Character npc in outpostNPCs)
|
||||
{
|
||||
if (npc.Removed) { continue; }
|
||||
if (npc.Removed || targetsToReturn.Contains(npc)) { continue; }
|
||||
targetsToReturn.Add(npc);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user