Files
crystall-punk-14/Content.Server/Silicons/StationAi/AiInteractWireAction.cs
metalgearsloth afd0618a60 Station AI (#30944)
* Station AI overlay

* implement

* Bunch of ports

* Fix a heap of bugs and basic scouting

* helldivers

* Shuffle interactions a bit

* navmap stuff

* Revert "navmap stuff"

This reverts commit d1f89dd4be83233e22cf5dd062b2581f3c6da062.

* AI wires implemented

* Fix examines

* Optimise the overlay significantly

* Back to old static

* BUI radial working

* lots of work

* Saving work

* thanks fork

* alright

* pc

* AI upload console

* AI upload

* stuff

* Fix copy-paste shitcode

* AI actions

* navmap work

* Fixes

* first impressions

* a

* reh

* Revert "navmap work"

This reverts commit 6f63fea6e9245e189f368f97be3e32e9b210580e.

# Conflicts:
#	Content.Client/Silicons/StationAi/StationAiOverlay.cs

* OD

* radar

* weh

* Fix examines

* scoop mine eyes

* fixes

* reh

* Optimise

* Final round of optimisations

* Fixes

* fixes
2024-08-28 10:57:12 +10:00

38 lines
1.4 KiB
C#

using Content.Server.Wires;
using Content.Shared.Doors;
using Content.Shared.Silicons.StationAi;
using Content.Shared.Wires;
namespace Content.Server.Silicons.StationAi;
/// <summary>
/// Controls whether an AI can interact with the target entity.
/// </summary>
public sealed partial class AiInteractWireAction : ComponentWireAction<StationAiWhitelistComponent>
{
public override string Name { get; set; } = "wire-name-ai-act-light";
public override Color Color { get; set; } = Color.DeepSkyBlue;
public override object StatusKey => AirlockWireStatus.AiControlIndicator;
public override StatusLightState? GetLightState(Wire wire, StationAiWhitelistComponent component)
{
return component.Enabled ? StatusLightState.On : StatusLightState.Off;
}
public override bool Cut(EntityUid user, Wire wire, StationAiWhitelistComponent component)
{
return EntityManager.System<SharedStationAiSystem>()
.SetWhitelistEnabled((component.Owner, component), false, announce: true);
}
public override bool Mend(EntityUid user, Wire wire, StationAiWhitelistComponent component)
{
return EntityManager.System<SharedStationAiSystem>()
.SetWhitelistEnabled((component.Owner, component), true);
}
public override void Pulse(EntityUid user, Wire wire, StationAiWhitelistComponent component)
{
}
}