Fix actions not being usable, ordering, and containers (#19964)

This commit is contained in:
DrSmugleaf
2023-09-09 16:14:17 -07:00
committed by GitHub
parent 7b41f7451c
commit 09bce85f19
21 changed files with 166 additions and 119 deletions

View File

@@ -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);