Updates the Content EntitySystems with the changes to the event API.

Visual Studio wants to update the version of the solution, and change some GUIDs around.
This commit is contained in:
Acruid
2020-02-18 19:43:54 -08:00
parent ffd06df700
commit c51533686b
10 changed files with 199 additions and 277 deletions

View File

@@ -1,9 +1,7 @@
using Content.Shared.GameObjects.EntitySystemMessages;
using Content.Shared.GameObjects.EntitySystems;
using Robust.Server.Interfaces.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.IoC;
using Robust.Shared.Maths;
using Robust.Shared.Utility;
@@ -37,17 +35,12 @@ namespace Content.Server.GameObjects.EntitySystems
{
base.Initialize();
SubscribeEvent<ExamineSystemMessages.RequestExamineInfoMessage>((sender, ev) => ExamineInfoRequest(ev));
IoCManager.InjectDependencies(this);
}
public override void RegisterMessageTypes()
{
base.RegisterMessageTypes();
RegisterMessageType<ExamineSystemMessages.RequestExamineInfoMessage>();
}
private FormattedMessage GetExamineText(IEntity entity)
private static FormattedMessage GetExamineText(IEntity entity)
{
var message = new FormattedMessage();
@@ -82,11 +75,10 @@ namespace Content.Server.GameObjects.EntitySystems
return message;
}
public override void HandleNetMessage(INetChannel channel, EntitySystemMessage message)
private void ExamineInfoRequest(ExamineSystemMessages.RequestExamineInfoMessage request)
{
base.HandleNetMessage(channel, message);
if (!(message is ExamineSystemMessages.RequestExamineInfoMessage request))
var channel = request.NetChannel;
if(channel == null)
return;
var session = _playerManager.GetSessionByChannel(channel);