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
@@ -0,0 +1,38 @@
using System;
using System.Security.Cryptography;
namespace Barotrauma
{
public abstract class BaseSubFile : ContentFile
{
protected BaseSubFile(ContentPackage contentPackage, ContentPath path) : base(contentPackage, path)
{
using var md5 = MD5.Create();
#warning TODO: this doesn't account for collisions, this should probably be using the PrefabCollection class like everything else
UintIdentifier = ToolBox.StringToUInt32Hash(Barotrauma.IO.Path.GetFileNameWithoutExtension(path.Value), md5);
}
public readonly UInt32 UintIdentifier;
public override void LoadFile()
{
SubmarineInfo.RefreshSavedSub(Path.Value);
}
public override void UnloadFile()
{
SubmarineInfo.RefreshSavedSub(Path.Value);
}
public override void Sort()
{
//Overrides for subs don't exist! Should we change this?
}
}
[NotSyncedInMultiplayer]
public class SubmarineFile : BaseSubFile
{
public SubmarineFile(ContentPackage contentPackage, ContentPath path) : base(contentPackage, path) { }
}
}