Unstable 0.17.0.0

This commit is contained in:
Markus Isberg
2022-02-26 02:43:01 +09:00
parent a83f375681
commit 3974067915
913 changed files with 32472 additions and 32364 deletions
@@ -5,29 +5,11 @@ using System.Xml.Linq;
namespace Barotrauma
{
class DecalPrefab : IPrefab, IHasUintIdentifier, IDisposable
class DecalPrefab : PrefabWithUintIdentifier
{
public readonly string Name;
public string Name => Identifier.Value;
public string OriginalName { get { return Name; } }
public string Identifier
{
get;
private set;
}
/// <summary>
/// Unique identifier that's generated by hashing the prefab's string identifier.
/// Used to reduce the amount of bytes needed to write decal data into network messages in multiplayer.
/// </summary>
public uint UIntIdentifier { get; set; }
public string FilePath { get; private set; }
public ContentPackage ContentPackage { get; private set; }
public void Dispose()
public override void Dispose()
{
foreach (Sprite spr in Sprites)
{
@@ -44,19 +26,11 @@ namespace Barotrauma
public readonly float FadeOutTime;
public readonly float FadeInTime;
public DecalPrefab(XElement element, ContentFile file)
public DecalPrefab(ContentXElement element, DecalsFile file) : base(file, new Identifier(element.Name.LocalName))
{
Name = element.Name.ToString();
Identifier = Name.ToLowerInvariant();
FilePath = file.Path;
ContentPackage = file.ContentPackage;
Sprites = new List<Sprite>();
foreach (XElement subElement in element.Elements())
foreach (var subElement in element.Elements())
{
if (subElement.Name.ToString().Equals("sprite", StringComparison.OrdinalIgnoreCase))
{