(3315662d5) Implement optional required items (lol) and fix the doors. It's a bit confusing, but should work.
This commit is contained in:
@@ -16,6 +16,8 @@ namespace Barotrauma
|
||||
Container
|
||||
}
|
||||
|
||||
public bool IsOptional { get; set; }
|
||||
|
||||
private string[] identifiers;
|
||||
|
||||
private string[] excludedIdentifiers;
|
||||
@@ -138,7 +140,8 @@ namespace Barotrauma
|
||||
{
|
||||
element.Add(
|
||||
new XAttribute("identifiers", JoinedIdentifiers),
|
||||
new XAttribute("type", type.ToString()));
|
||||
new XAttribute("type", type.ToString()),
|
||||
new XAttribute("optional", IsOptional));
|
||||
|
||||
if (excludedIdentifiers.Length > 0)
|
||||
{
|
||||
@@ -218,7 +221,8 @@ namespace Barotrauma
|
||||
if (subElement.Name.ToString().ToLowerInvariant() != "statuseffect") continue;
|
||||
ri.statusEffects.Add(StatusEffect.Load(subElement, parentDebugName));
|
||||
}
|
||||
|
||||
|
||||
ri.IsOptional = element.GetAttributeBool("optional", false);
|
||||
return ri;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user