Add magazine auto-eject message back in (#1191)

I goofed.

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2020-06-22 23:18:41 +10:00
committed by GitHub
parent 3f7bd3010c
commit ac2c7da31f
3 changed files with 18 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ using Content.Client.Animations;
using Content.Client.UserInterface.Stylesheets;
using Content.Client.Utility;
using Content.Shared.GameObjects;
using Content.Shared.GameObjects.Components.Weapons.Ranged;
using Content.Shared.GameObjects.Components.Weapons.Ranged.Barrels;
using Robust.Client.Animations;
using Robust.Client.Graphics;
@@ -112,10 +113,10 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged.Barrels
switch (message)
{
/*
case BmwComponentAutoEjectedMessage _:
case MagazineAutoEjectMessage _:
_statusControl?.PlayAlarmAnimation();
return;*/
return;
}
}

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects;
using Content.Shared.GameObjects.Components.Weapons.Ranged;
using Content.Shared.GameObjects.Components.Weapons.Ranged.Barrels;
using Content.Shared.Interfaces;
using Robust.Server.GameObjects;
@@ -217,6 +218,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
}
_magazineContainer.Remove(magazine);
SendNetworkMessage(new MagazineAutoEjectMessage());
}
if (nextRound == null && !BoltOpen)

View File

@@ -0,0 +1,12 @@
using System;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Weapons.Ranged
{
/// <summary>
/// This is sent if the MagazineBarrel AutoEjects the magazine
/// </summary>
[Serializable, NetSerializable]
public sealed class MagazineAutoEjectMessage : ComponentMessage {}
}