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

@@ -41,6 +41,9 @@ namespace Content.Server.GameObjects.EntitySystems
{
base.Initialize();
SubscribeEvent<EntRemovedFromContainerMessage>(HandleContainerModified);
SubscribeEvent<EntInsertedIntoContainerMessage>(HandleContainerModified);
var input = EntitySystemManager.GetEntitySystem<InputSystem>();
input.BindMap.BindFunction(ContentKeyFunctions.SwapHands, InputCmdHandler.FromDelegate(HandleSwapHands));
input.BindMap.BindFunction(ContentKeyFunctions.Drop, new PointerInputCmdHandler(HandleDrop));
@@ -62,13 +65,6 @@ namespace Content.Server.GameObjects.EntitySystems
base.Shutdown();
}
/// <inheritdoc />
public override void SubscribeEvents()
{
SubscribeEvent<EntRemovedFromContainerMessage>(HandleContainerModified);
SubscribeEvent<EntInsertedIntoContainerMessage>(HandleContainerModified);
}
private static void HandleContainerModified(object sender, ContainerModifiedMessage args)
{
if (args.Container.Owner.TryGetComponent(out IHandsComponent handsComponent))