removes beforeserialization hook (#12319)

This commit is contained in:
Paul Ritter
2022-11-03 02:41:12 +01:00
committed by GitHub
parent 6eca66a637
commit c5e5729bd4
14 changed files with 199 additions and 229 deletions

View File

@@ -1,8 +1,5 @@
using System;
using Content.Shared.Research.Components;
using Content.Shared.Research.Prototypes;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Prototypes;
namespace Content.Client.Research
@@ -21,14 +18,14 @@ namespace Content.Client.Research
if (curState is not TechnologyDatabaseState state) return;
Technologies.Clear();
TechnologyIds.Clear();
var protoManager = IoCManager.Resolve<IPrototypeManager>();
foreach (var techID in state.Technologies)
{
if (!protoManager.TryIndex(techID, out TechnologyPrototype? technology)) continue;
Technologies.Add(technology);
if (!protoManager.HasIndex<TechnologyPrototype>(techID)) continue;
TechnologyIds.Add(techID);
}
OnDatabaseUpdated?.Invoke();