first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
using NitroxModel.Core;
using NitroxModel.DataStructures.GameLogic.Entities.Metadata;
using NitroxModel.DataStructures.Util;
namespace NitroxClient.GameLogic.Spawning.Metadata.Extractor.Abstract;
public abstract class EntityMetadataExtractor<I, O> : IEntityMetadataExtractor where O : EntityMetadata
{
public abstract O Extract(I entity);
public Optional<EntityMetadata> From(object o)
{
EntityMetadata result = Extract((I)o);
return Optional.OfNullable(result);
}
protected T Resolve<T>() where T : class
{
return NitroxServiceLocator.Cache<T>.Value;
}
}