Files
wylab-station-14/Content.Shared/Silicons/Borgs/Components/SelectableBorgModuleComponent.cs
slarticodefast 937b61a832 Predict borgs (#41600)
* predict borgs

* small fix

* fix MMI item slot serialization

* fix movement speed for mothership core

* review and minor improvement

* fix resolve

* review
2025-11-30 10:25:22 +00:00

43 lines
1.4 KiB
C#

using Content.Shared.Actions;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Silicons.Borgs.Components;
/// <summary>
/// This is used for <see cref="BorgModuleComponent"/>s that can be "swapped" to, as opposed to having passive effects.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedBorgSystem))]
public sealed partial class SelectableBorgModuleComponent : Component
{
/// <summary>
/// The sidebar action prototype for swapping to this module.
/// </summary>
[DataField]
public EntProtoId ModuleSwapAction = "ActionBorgSwapModule";
/// <summary>
/// The sidebar action entity for swapping to this module.
/// </summary>
[DataField, AutoNetworkedField]
public EntityUid? ModuleSwapActionEntity;
}
/// <summary>
/// Raised on a borg module entity with <see cref="SelectableBorgModuleComponent"/> when a player uses the action provided by it.
/// </summary>
public sealed partial class BorgModuleActionSelectedEvent : InstantActionEvent;
/// <summary>
/// Event raised by-ref on a module when it is selected
/// </summary>
[ByRefEvent]
public readonly record struct BorgModuleSelectedEvent(EntityUid Chassis);
/// <summary>
/// Event raised by-ref on a module when it is deselected.
/// </summary>
[ByRefEvent]
public readonly record struct BorgModuleUnselectedEvent(EntityUid Chassis);