2023-08-12 17:39:58 -04:00
|
|
|
|
using Content.Shared.Actions;
|
|
|
|
|
|
using Robust.Shared.GameStates;
|
2023-09-08 18:16:05 -07:00
|
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2023-08-12 17:39:58 -04:00
|
|
|
|
|
|
|
|
|
|
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, Access(typeof(SharedBorgSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public sealed partial class SelectableBorgModuleComponent : Component
|
2023-08-12 17:39:58 -04:00
|
|
|
|
{
|
2023-09-08 18:16:05 -07:00
|
|
|
|
[DataField("moduleSwapAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
|
|
|
|
public string? ModuleSwapActionId = "ActionBorgSwapModule";
|
|
|
|
|
|
|
2023-08-12 17:39:58 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The sidebar action for swapping to this module.
|
|
|
|
|
|
/// </summary>
|
2023-09-08 18:16:05 -07:00
|
|
|
|
[DataField("moduleSwapActionEntity")] public EntityUid? ModuleSwapActionEntity;
|
2023-08-12 17:39:58 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public sealed partial class BorgModuleActionSelectedEvent : InstantActionEvent
|
2023-08-12 17:39:58 -04:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <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);
|