Unstable v0.19.5.0

This commit is contained in:
Juan Pablo Arce
2022-09-14 12:47:17 -03:00
parent 3f2c843247
commit 1fd2a51bbb
158 changed files with 5702 additions and 4813 deletions
@@ -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);
}