Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About the PR
This PR moves various parts of
ClientAdminManager
andAdminManager
into a newSharedAdminManager
.Why / Balance
Reduces code duplication and required for space-wizards/RobustToolbox#5862
This PR was spun off from #36717, removing any parts that relied on engine changes to try decouple the engine PR from content.
Technical details
Part of this PR changes IoC initialization logic a bit. In particular, the shared entity point used to inject dependencies in
PreInit()
. However, it now depends ISharedAdminManager which is registered by the server/client. So not it instead injects dependencies inInit()
, while the client & server will register types inPreInit()
.I think these changes aren't strictly required, and I could just not use a
[Dependency]
field, but I think these changes make sense and clear up initialization spaghetti a bit. But maybe this behavior is required for some reason?Requirements
Breaking changes
AdminCommandAttribute
has been moved to shared (Content.Shared.Administration
)ClientAdminManager
andAdminManager
have modified or combined and moved toSharedAdminManager
.ServerContentIoC.Register()
) inPreInit()
instead ofInit()