[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly IResourceManager _resources = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
+ [Dependency] private readonly ISerializationManager _serialization = default!;
public event Action<EntityUid>? OnActionAdded;
public event Action<EntityUid>? OnActionRemoved;
continue;
}
+ if (assignmentNode is SequenceDataNode sequenceAssignments)
+ {
+ try
+ {
+ var nodeAssignments = _serialization.Read<List<(byte Hotbar, byte Slot)>>(sequenceAssignments, notNullableOverride: true);
+
+ foreach (var index in nodeAssignments)
+ {
+ assignments.Add(new SlotAssignment(index.Hotbar, index.Slot, actionId));
+ }
+ }
+ catch (Exception ex)
+ {
+ Log.Error($"Failed to parse action assignments: {ex}");
+ }
+ }
+
AddActionDirect((user, actions), actionId);
}
+
+ AssignSlot?.Invoke(assignments);
}
private void OnWorldTargetAttempt(Entity<WorldTargetActionComponent> ent, ref ActionTargetAttemptEvent args)
// this is the actual entity-world targeting magic
EntityUid? targetEnt = null;
if (TryComp<EntityTargetActionComponent>(ent, out var entity) &&
- args.Input.EntityUid != null &&
- ValidateEntityTarget(user, args.Input.EntityUid, (uid, entity)))
+ args.Input.EntityUid is { Valid: true } entityUid &&
+ ValidateEntityTarget(user, entityUid, (uid, entity)))
{
- targetEnt = args.Input.EntityUid;
+ targetEnt = entityUid;
}
if (action.ClientExclusive)
Viewport.StretchMode = filterMode switch
{
"nearest" => ScalingViewportStretchMode.Nearest,
- "bilinear" => ScalingViewportStretchMode.Bilinear
+ "bilinear" => ScalingViewportStretchMode.Bilinear,
+ _ => ScalingViewportStretchMode.Nearest
};
Viewport.IgnoreDimension = verticalFit ? ScalingViewportIgnoreDimension.Horizontal : ScalingViewportIgnoreDimension.None;
if (!_actionsQuery.Resolve(performer, ref performer.Comp, false))
{
- DebugTools.Assert(performer == null || TerminatingOrDeleted(performer));
+ DebugTools.Assert(TerminatingOrDeleted(performer));
ent.Comp.AttachedEntity = null;
// TODO: should this delete the action since it's now orphaned?
return;
public sealed class SharedMagbootsSystem : EntitySystem
{
[Dependency] private readonly AlertsSystem _alerts = default!;
- [Dependency] private readonly InventorySystem _inventory = default!;
[Dependency] private readonly ItemToggleSystem _toggle = default!;
[Dependency] private readonly SharedContainerSystem _container = default!;
[Dependency] private readonly SharedGravitySystem _gravity = default!;
using Content.Shared.Construction.Components;
using Content.Shared.Database;
using Content.Shared.Friction;
-using Content.Shared.Gravity;
using Content.Shared.Projectiles;
using Robust.Shared.Configuration;
using Robust.Shared.Map;
private float _airDamping;
[Dependency] private readonly IGameTiming _gameTiming = default!;
- [Dependency] private readonly SharedGravitySystem _gravity = default!;
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly ThrownItemSystem _thrownSystem = default!;