Skip to content

Commit

Permalink
добавил через код
Browse files Browse the repository at this point in the history
  • Loading branch information
Schrodinger71 committed Dec 30, 2024
1 parent 6eb9ce4 commit 2385a20
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ public sealed partial class TurretControllableComponent : Component

[DataField("ControlReturnAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string ControlReturnAction = "ControlReturnAction";
[DataField("ActionAGhostShowRadar", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string ActionAGhostShowRadar = "ActionAGhostShowRadar";

[DataField("ControlReturnActionEntity")]
public EntityUid? ControlReturnActEntity;

[DataField("ActionAGhostShowRadarAct")]
public EntityUid? ActionAGhostShowRadarAct;

[DataField("Range")]
public float Range = 50f;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public void Return(EntityUid uid, TurretControllableComponent component)
public void OnStartup(EntityUid uid, TurretControllableComponent component, MapInitEvent args)
{
_actionsSystem.AddAction(uid, ref component.ControlReturnActEntity, component.ControlReturnAction);
_actionsSystem.AddAction(uid, ref component.ActionAGhostShowRadarAct, component.ActionAGhostShowRadar);
}
public void OnShutdown(EntityUid uid, TurretControllableComponent component, ComponentShutdown args)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,38 @@
- type: DeviceLinkSink
ports:
- On #можно переписать нахуй прототип турели, но главное что б
# - type: UserInterface
# interfaces:
# enum.RadarConsoleUiKey.Key:
# type: RadarConsoleBoundUserInterface
# - type: IntrinsicUI
# uis:
# enum.RadarConsoleUiKey.Key:
# toggleAction: ActionAGhostShowRadar
- type: RadarConsole
followEntity: true
- type: UserInterface
interfaces:
enum.RadarConsoleUiKey.Key:
type: RadarConsoleBoundUserInterface
enum.CrewMonitoringUIKey.Key:
type: CrewMonitoringBoundUserInterface
enum.GeneralStationRecordConsoleKey.Key:
type: GeneralStationRecordConsoleBoundUserInterface
enum.SiliconLawsUiKey.Key:
type: SiliconLawBoundUserInterface
enum.CommunicationsConsoleUiKey.Key:
type: CommunicationsConsoleBoundUserInterface
- type: IntrinsicUI
uis:
enum.RadarConsoleUiKey.Key:
toggleAction: ActionAGhostShowRadar
- type: RadarConsole
followEntity: true
enum.CrewMonitoringUIKey.Key:
toggleAction: ActionAGhostShowCrewMonitoring
enum.GeneralStationRecordConsoleKey.Key:
toggleAction: ActionAGhostShowStationRecords
enum.CommunicationsConsoleUiKey.Key:
toggleAction: ActionAGhostShowCommunications

- type: entity
parent: BaseStructure
Expand Down

0 comments on commit 2385a20

Please sign in to comment.