Unstable v0.19.5.0
This commit is contained in:
@@ -807,9 +807,6 @@ namespace Barotrauma
|
||||
//only used if the item doesn't have a name/description defined in the currently selected language
|
||||
string fallbackNameIdentifier = ConfigElement.GetAttributeString("fallbacknameidentifier", "");
|
||||
|
||||
//works the same as nameIdentifier, but just replaces the description
|
||||
Identifier descriptionIdentifier = ConfigElement.GetAttributeIdentifier("descriptionidentifier", "");
|
||||
|
||||
name = TextManager.Get(nameIdentifier.IsEmpty
|
||||
? $"EntityName.{Identifier}"
|
||||
: $"EntityName.{nameIdentifier}",
|
||||
@@ -858,18 +855,7 @@ namespace Barotrauma
|
||||
|
||||
SerializableProperty.DeserializeProperties(this, ConfigElement);
|
||||
|
||||
if (descriptionIdentifier != Identifier.Empty)
|
||||
{
|
||||
Description = TextManager.Get($"EntityDescription.{descriptionIdentifier}").Fallback(Description);
|
||||
}
|
||||
else if (nameIdentifier == Identifier.Empty)
|
||||
{
|
||||
Description = TextManager.Get($"EntityDescription.{Identifier}").Fallback(Description);
|
||||
}
|
||||
else
|
||||
{
|
||||
Description = TextManager.Get($"EntityDescription.{nameIdentifier}").Fallback(Description);
|
||||
}
|
||||
LoadDescription(ConfigElement);
|
||||
|
||||
var allowDroppingOnSwapWith = ConfigElement.GetAttributeIdentifierArray("allowdroppingonswapwith", Array.Empty<Identifier>());
|
||||
AllowDroppingOnSwapWith = allowDroppingOnSwapWith.ToImmutableHashSet();
|
||||
@@ -1320,12 +1306,8 @@ namespace Barotrauma
|
||||
throw new InvalidOperationException("Can't call ItemPrefab.CreateInstance");
|
||||
}
|
||||
|
||||
private bool disposed = false;
|
||||
public override void Dispose()
|
||||
{
|
||||
if (disposed) { return; }
|
||||
disposed = true;
|
||||
Prefabs.Remove(this);
|
||||
Item.RemoveByPrefab(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user