Fix actions not being usable, ordering, and containers (#19964)
This commit is contained in:
@@ -17,7 +17,7 @@ using Content.Shared.Popups;
|
||||
using Content.Shared.Weapons.Melee;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Content.Shared.Mech.EntitySystems;
|
||||
public abstract class SharedMechSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototype = default!;
|
||||
[Dependency] private readonly INetManager _net = default!;
|
||||
[Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
|
||||
[Dependency] private readonly AccessReaderSystem _access = default!;
|
||||
[Dependency] private readonly SharedActionsSystem _actions = default!;
|
||||
@@ -176,6 +176,9 @@ public abstract class SharedMechSystem : EntitySystem
|
||||
rider.Mech = mech;
|
||||
Dirty(pilot, rider);
|
||||
|
||||
if (_net.IsClient)
|
||||
return;
|
||||
|
||||
_actions.AddAction(pilot, Spawn(component.MechCycleAction), mech);
|
||||
_actions.AddAction(pilot, Spawn(component.MechUiAction),
|
||||
mech);
|
||||
|
||||
Reference in New Issue
Block a user