public void BorgActivate(EntityUid uid, BorgChassisComponent component)
{
Popup.PopupEntity(Loc.GetString("borg-mind-added", ("name", Identity.Name(uid, EntityManager))), uid);
- Toggle.TryActivate(uid);
- _powerCell.SetDrawEnabled(uid, _mobState.IsAlive(uid));
+ if (_powerCell.HasDrawCharge(uid))
+ {
+ Toggle.TryActivate(uid);
+ _powerCell.SetDrawEnabled(uid, _mobState.IsAlive(uid));
+ }
_appearance.SetData(uid, BorgVisuals.HasPlayer, true);
}
using Content.Shared.Item.ItemToggle.Components;
+using Content.Shared.Light.Components;
using Content.Shared.Toggleable;
using ItemTogglePointLightComponent = Content.Shared.Light.Components.ItemTogglePointLightComponent;
{
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly SharedPointLightSystem _light = default!;
+ [Dependency] private readonly SharedHandheldLightSystem _handheldLight = default!;
public override void Initialize()
{
_appearance.SetData(ent, ToggleableLightVisuals.Enabled, args.Activated);
_light.SetEnabled(ent.Owner, args.Activated, comp: light);
+ if (TryComp<HandheldLightComponent>(ent.Owner, out var handheldLight))
+ {
+ _handheldLight.SetActivated(ent.Owner, args.Activated, handheldLight);
+ }
}
}