Portable Generator Rework (#19302)

This commit is contained in:
Pieter-Jan Briers
2023-08-25 20:40:42 +02:00
committed by GitHub
parent 50828363fe
commit bf16698efa
73 changed files with 1933 additions and 473 deletions

View File

@@ -0,0 +1,23 @@
using Content.Shared.Examine;
namespace Content.Shared.Power.Generator;
/// <summary>
/// Shared logic for power-switchable generators.
/// </summary>
/// <seealso cref="PowerSwitchableGeneratorComponent"/>
public abstract class SharedPowerSwitchableGeneratorSystem : EntitySystem
{
public override void Initialize()
{
SubscribeLocalEvent<PowerSwitchableGeneratorComponent, ExaminedEvent>(GeneratorExamined);
}
private void GeneratorExamined(EntityUid uid, PowerSwitchableGeneratorComponent component, ExaminedEvent args)
{
// Show which output is currently selected.
args.PushMarkup(Loc.GetString(
"power-switchable-generator-examine",
("output", component.ActiveOutput.ToString())));
}
}