Predict gasthermomachines (#33837)

* Predict gasthermomachines

* despawn

* smellby
This commit is contained in:
metalgearsloth
2025-05-13 21:49:43 +10:00
committed by GitHub
parent 24141aa1e9
commit df2257cd92
16 changed files with 236 additions and 135 deletions

View File

@@ -1,6 +1,21 @@
using Content.Shared.Power.Components;
namespace Content.Shared.Power.EntitySystems;
public abstract class SharedPowerNetSystem : EntitySystem
{
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
public abstract bool IsPoweredCalculate(SharedApcPowerReceiverComponent comp);
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<AppearanceComponent, PowerChangedEvent>(OnPowerAppearance);
}
private void OnPowerAppearance(Entity<AppearanceComponent> ent, ref PowerChangedEvent args)
{
_appearance.SetData(ent, PowerDeviceVisuals.Powered, args.Powered, ent.Comp);
}
}