fish-station/Content.Shared/Implants/Components/SubdermalImplantComponent.cs
Vigers Ray 252e81c728 Merge remote-tracking branch 'space-wizards/master'
# Conflicts:
#	Content.Client/Administration/UI/Logs/AdminLogsControl.xaml.cs
#	Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTab.xaml.cs
#	Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs
#	Content.Server/Mindshield/MindShieldSystem.cs
#	Content.Shared/Gravity/SharedGravitySystem.cs
#	Content.Shared/Implants/SharedSubdermalImplantSystem.cs
#	Resources/Locale/en-US/_strings/traits/traits.ftl
#	Resources/Prototypes/Entities/Clothing/Shoes/misc.yml
#	Resources/Prototypes/Entities/Objects/Devices/Electronics/door_access.yml
#	Resources/Prototypes/Entities/Objects/Misc/implanters.yml
#	Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml
#	Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml
#	Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml
#	Resources/Prototypes/Entities/Structures/Doors/Airlocks/airlocks.yml
#	Resources/Prototypes/Entities/Structures/Machines/surveillance_camera_routers.yml
#	Resources/Textures/Interface/Misc/job_icons.rsi/meta.json
2025-08-23 23:10:05 +03:00

92 lines
2.9 KiB
C#

using Content.Shared.Actions;
using Content.Shared.Whitelist;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Implants.Components;
/// <summary>
/// Subdermal implants get stored in a container on an entity and grant the entity special actions
/// The actions can be activated via an action, a passive ability (ie tracking), or a reactive ability (ie on death) or some sort of combination
/// They're added and removed with implanters
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class SubdermalImplantComponent : Component
{
/// <summary>
/// Used where you want the implant to grant the owner an instant action.
/// </summary>
[DataField]
public EntProtoId? ImplantAction;
/// <summary>
/// The provided action entity.
/// </summary>
[DataField, AutoNetworkedField]
public EntityUid? Action;
/// <summary>
/// Components to add/remove to the implantee when the implant is injected/extracted.
/// </summary>
[DataField]
public ComponentRegistry ImplantComponents = new();
/// <summary>
/// The entity this implant is inside
/// </summary>
[ViewVariables, AutoNetworkedField]
public EntityUid? ImplantedEntity;
/// <summary>
/// Should this implant be removeable?
/// </summary>
[DataField, AutoNetworkedField]
public bool Permanent = false;
/// <summary>
/// Target whitelist for this implant specifically.
/// Only checked if the implanter allows implanting on the target to begin with.
/// </summary>
[DataField]
public EntityWhitelist? Whitelist;
/// <summary>
/// Target blacklist for this implant specifically.
/// Only checked if the implanter allows implanting on the target to begin with.
/// </summary>
[DataField]
public EntityWhitelist? Blacklist;
/// <summary>
/// If set, this ProtoId is used when attempting to draw the implant instead.
/// Useful if the implant is a child to another implant and you don't want to differentiate between them when drawing.
/// </summary>
[DataField]
public EntProtoId? DrawableProtoIdOverride;
// Sunrise-Start
[DataField, AutoNetworkedField]
public bool DropContainerItemsIfGib;
// Sunrise-End
}
/// <summary>
/// Used for opening the storage implant via action.
/// </summary>
/// <remarks>
/// TODO: Delete this and just add a ToggleUIOnTriggerComponent
/// </remarks>
public sealed partial class OpenStorageImplantEvent : InstantActionEvent;
/// <summary>
/// Used for triggering trigger events on the implant via action
/// </summary>
public sealed partial class ActivateImplantEvent : InstantActionEvent;
/// <summary>
/// Used for opening the uplink implant via action.
/// </summary>
/// <remarks>
/// TODO: Delete this and just add a ToggleUIOnTriggerComponent
/// </remarks>
public sealed partial class OpenUplinkImplantEvent : InstantActionEvent;