virtualize all net ids to reduce net traffic
This commit is contained in:
@@ -117,7 +117,9 @@ namespace Content.Shared.GameObjects.Components.Research
|
||||
public class LatheDatabaseState : ComponentState
|
||||
{
|
||||
public readonly List<string> Recipes;
|
||||
public LatheDatabaseState(List<string> recipes) : base(ContentNetIDs.LATHE_DATABASE)
|
||||
public override uint NetID => ContentNetIDs.LATHE_DATABASE;
|
||||
|
||||
public LatheDatabaseState(List<string> recipes)
|
||||
{
|
||||
Recipes = recipes;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,9 @@ namespace Content.Shared.GameObjects.Components.Research
|
||||
public class MaterialStorageState : ComponentState
|
||||
{
|
||||
public readonly Dictionary<string, int> Storage;
|
||||
public MaterialStorageState(Dictionary<string, int> storage) : base(ContentNetIDs.MATERIAL_STORAGE)
|
||||
public override uint NetID => ContentNetIDs.MATERIAL_STORAGE;
|
||||
|
||||
public MaterialStorageState(Dictionary<string, int> storage)
|
||||
{
|
||||
Storage = storage;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,9 @@ namespace Content.Shared.GameObjects.Components.Research
|
||||
public class ProtolatheDatabaseState : ComponentState
|
||||
{
|
||||
public readonly List<string> Recipes;
|
||||
public ProtolatheDatabaseState(List<string> recipes) : base(ContentNetIDs.PROTOLATHE_DATABASE)
|
||||
public override uint NetID => ContentNetIDs.PROTOLATHE_DATABASE;
|
||||
|
||||
public ProtolatheDatabaseState(List<string> recipes)
|
||||
{
|
||||
Recipes = recipes;
|
||||
}
|
||||
|
||||
@@ -104,12 +104,14 @@ namespace Content.Shared.GameObjects.Components.Research
|
||||
public class TechnologyDatabaseState : ComponentState
|
||||
{
|
||||
public List<string> Technologies;
|
||||
public TechnologyDatabaseState(List<string> technologies) : base(ContentNetIDs.TECHNOLOGY_DATABASE)
|
||||
public override uint NetID => ContentNetIDs.TECHNOLOGY_DATABASE;
|
||||
|
||||
public TechnologyDatabaseState(List<string> technologies)
|
||||
{
|
||||
Technologies = technologies;
|
||||
}
|
||||
|
||||
public TechnologyDatabaseState(List<TechnologyPrototype> technologies) : base(ContentNetIDs.TECHNOLOGY_DATABASE)
|
||||
public TechnologyDatabaseState(List<TechnologyPrototype> technologies)
|
||||
{
|
||||
Technologies = new List<string>();
|
||||
foreach (var technology in technologies)
|
||||
|
||||
Reference in New Issue
Block a user