clean up infinite researchsystem shitcode (#13136)

* clean up infinite researchsystem shitcode

* fml some more shit

* make syncing work logically

* naming naming naming
This commit is contained in:
Nemanja
2022-12-25 16:22:23 -05:00
committed by GitHub
parent 9afbdf6a17
commit 4eee1ee9b2
23 changed files with 497 additions and 293 deletions

View File

@@ -8,13 +8,31 @@ namespace Content.Shared.Research.Components
[RegisterComponent, NetworkedComponent]
public sealed class TechnologyDatabaseComponent : Component
{
/// <summary>
/// The ids of all the technologies which have been unlocked.
/// </summary>
[DataField("technologyIds", customTypeSerializer: typeof(PrototypeIdListSerializer<TechnologyPrototype>))]
public List<string> TechnologyIds = new();
/// <summary>
/// The ids of all the lathe recipes which have been unlocked.
/// This is maintained alongside the TechnologyIds
/// </summary>
[DataField("recipeIds", customTypeSerializer: typeof(PrototypeIdListSerializer<LatheRecipePrototype>))]
public List<string> RecipeIds = new();
}
/// <summary>
/// Event raised on the database whenever its
/// technologies or recipes are modified.
/// </summary>
/// <remarks>
/// This event is forwarded from the
/// server to all of it's clients.
/// </remarks>
[ByRefEvent]
public readonly record struct TechnologyDatabaseModifiedEvent;
[Serializable, NetSerializable]
public sealed class TechnologyDatabaseState : ComponentState
{