Fix for holoparasite's ability to attack the host through mech (#36659)

This commit is contained in:
nikitosych
2025-08-07 18:38:36 +02:00
committed by Quanteey
parent dbbf45c407
commit fd6597d3da
4 changed files with 57 additions and 2 deletions
@@ -36,7 +36,7 @@ namespace Content.Shared.Mech.EntitySystems;
/// <summary>
/// Handles all of the interactions, UI handling, and items shennanigans for <see cref="MechComponent"/>
/// </summary>
public abstract class SharedMechSystem : EntitySystem
public abstract partial class SharedMechSystem : EntitySystem
{
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly INetManager _net = default!;
@@ -74,6 +74,8 @@ public abstract class SharedMechSystem : EntitySystem
SubscribeLocalEvent<MechPilotComponent, EntGotRemovedFromContainerMessage>(OnEntGotRemovedFromContainer);
SubscribeLocalEvent<MechEquipmentComponent, ShotAttemptedEvent>(OnShotAttempted); // Goobstation
Subs.CVar(_config, GoobCVars.MechGunOutsideMech, value => _canUseMechGunOutside = value, true); // Goobstation
InitializeRelay();
}
// GoobStation: Fixes scram implants or teleports locking the pilot out of being able to move.
private void OnEntGotRemovedFromContainer(EntityUid uid, MechPilotComponent component, EntGotRemovedFromContainerMessage args)