fix borgs not being able to toggle flashlight (#20448)

This commit is contained in:
Nemanja
2023-10-04 10:30:11 -04:00
committed by GitHub
parent bfa301b53e
commit 6131721fe5
2 changed files with 5 additions and 0 deletions

View File

@@ -99,11 +99,13 @@ namespace Content.Server.Light.EntitySystems
private void OnMapInit(EntityUid uid, HandheldLightComponent component, MapInitEvent args)
{
_actionContainer.EnsureAction(uid, ref component.ToggleActionEntity, component.ToggleAction);
_actions.AddAction(uid, ref component.SelfToggleActionEntity, component.ToggleAction);
}
private void OnShutdown(EntityUid uid, HandheldLightComponent component, ComponentShutdown args)
{
_actions.RemoveAction(uid, component.ToggleActionEntity);
_actions.RemoveAction(uid, component.SelfToggleActionEntity);
}
private byte? GetLevel(EntityUid uid, HandheldLightComponent component)