Refactor actions to be entities with components (#19900)

This commit is contained in:
DrSmugleaf
2023-09-08 18:16:05 -07:00
committed by GitHub
parent e18f731b91
commit c71f97e3a2
210 changed files with 10693 additions and 11714 deletions

View File

@@ -3,10 +3,7 @@ using Content.Shared.Clothing.EntitySystems;
using Content.Shared.Item;
using Content.Shared.Light.Components;
using Content.Shared.Toggleable;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Player;
using Robust.Shared.Utility;
namespace Content.Shared.Light;
@@ -74,8 +71,8 @@ public abstract class SharedHandheldLightSystem : EntitySystem
_clothingSys.SetEquippedPrefix(uid, prefix);
}
if (component.ToggleAction != null)
_actionSystem.SetToggled(component.ToggleAction, component.Activated);
if (component.ToggleActionEntity != null)
_actionSystem.SetToggled(component.ToggleActionEntity, component.Activated);
_appearance.SetData(uid, ToggleableLightVisuals.Enabled, component.Activated, appearance);
}