mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Remove most static IoCManager. accesses from engine. (#3466)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
committed by
GitHub
parent
c26c8fb81e
commit
1646297039
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user