mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 16:17:27 +00:00
* added signal control to portable generators
* added documentation
* Discard changes to Content.Server/Radio/EntitySystems/HeadsetSystem.cs
* added DeviceNetworkComponent and WirelessNetworkConnectionComponent to generator prototype
* made GeneratorSignalControlComponent nicer
* implemented auto-revving
* added back necessary dependency
* can't send do-after event manually
* repeat now works with auto revving
* fixed
* removed vv
* stopping generating when it is revving now makes it stop revving
* Update Content.Shared/Power/Generator/ActiveGeneratorRevvingComponent.cs
Co-authored-by: Kara <lunarautomaton6@gmail.com>
* used resolve instead of TryComp
---------
Co-authored-by: Julian Giebel <juliangiebel@live.de>
Co-authored-by: Kara <lunarautomaton6@gmail.com>
(cherry picked from commit 5d2ddc0d8b)
30 lines
921 B
C#
30 lines
921 B
C#
using Content.Shared.DeviceLinking;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server.Power.Generator;
|
|
|
|
/// <summary>
|
|
/// When attached to an entity with <see cref="FuelGeneratorComponent"/> it will allow the signal network to exert control over the generator.
|
|
/// </summary>
|
|
[RegisterComponent]
|
|
public sealed partial class GeneratorSignalControlComponent: Component
|
|
{
|
|
/// <summary>
|
|
/// The port that should be invoked when turning the generator on.
|
|
/// </summary>
|
|
[DataField]
|
|
public ProtoId<SinkPortPrototype> OnPort = "On";
|
|
|
|
/// <summary>
|
|
/// The port that should be invoked when turning the generator off.
|
|
/// </summary>
|
|
[DataField]
|
|
public ProtoId<SinkPortPrototype> OffPort = "Off";
|
|
|
|
/// <summary>
|
|
/// The port that should be invoked when toggling the generator.
|
|
/// </summary>
|
|
[DataField]
|
|
public ProtoId<SinkPortPrototype> TogglePort = "Toggle";
|
|
}
|