@@ -4,6 +4,7 @@ using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.DoAfter;
|
||||
using Content.Server.Mech.Components;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Server.Tools;
|
||||
using Content.Server.Wires;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.FixedPoint;
|
||||
@@ -52,6 +53,7 @@ public sealed class MechSystem : SharedMechSystem
|
||||
SubscribeLocalEvent<MechComponent, DamageChangedEvent>(OnDamageChanged);
|
||||
SubscribeLocalEvent<MechComponent, MechEquipmentRemoveMessage>(OnRemoveEquipmentMessage);
|
||||
|
||||
SubscribeLocalEvent<MechPilotComponent, ToolUserAttemptUseEvent>(OnToolUseAttempt);
|
||||
SubscribeLocalEvent<MechPilotComponent, InhaleLocationEvent>(OnInhale);
|
||||
SubscribeLocalEvent<MechPilotComponent, ExhaleLocationEvent>(OnExhale);
|
||||
SubscribeLocalEvent<MechPilotComponent, AtmosExposedGetAirEvent>(OnExpose);
|
||||
@@ -137,6 +139,12 @@ public sealed class MechSystem : SharedMechSystem
|
||||
ToggleMechUi(uid, component);
|
||||
}
|
||||
|
||||
private void OnToolUseAttempt(EntityUid uid, MechPilotComponent component, ref ToolUserAttemptUseEvent args)
|
||||
{
|
||||
if (args.Target == component.Mech)
|
||||
args.Cancelled = true;
|
||||
}
|
||||
|
||||
private void OnAlternativeVerb(EntityUid uid, MechComponent component, GetVerbsEvent<AlternativeVerb> args)
|
||||
{
|
||||
if (!args.CanAccess || !args.CanInteract || component.Broken)
|
||||
|
||||
Reference in New Issue
Block a user