Remove most static IoCManager. accesses from engine. (#3466)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Pieter-Jan Briers
2022-11-15 12:00:28 +01:00
committed by GitHub
parent c26c8fb81e
commit 1646297039
88 changed files with 877 additions and 743 deletions

View File

@@ -26,6 +26,7 @@ namespace Robust.Shared.Scripting
[field: Dependency] public IEntitySystemManager esm { get; } = default!;
[field: Dependency] public IPrototypeManager prot { get; } = default!;
[field: Dependency] public IMapManager map { get; } = default!;
[field: Dependency] public IDependencyCollection dependencies { get; } = default!;
public IEnumerable<T> protos<T>() where T : class, IPrototype
{
@@ -76,7 +77,7 @@ namespace Robust.Shared.Scripting
public T res<T>()
{
return IoCManager.Resolve<T>();
return dependencies.Resolve<T>();
}
public T ressys<T>() where T : EntitySystem