Fix helmet toggle bug (#7861)

This commit is contained in:
Leon Friedrich
2022-04-30 16:54:35 +12:00
committed by GitHub
parent 0ec32321bb
commit 33ddd2d73d
2 changed files with 3 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ public sealed class ToggleableClothingSystem : EntitySystem
{
base.Initialize();
SubscribeLocalEvent<ToggleableClothingComponent, ComponentAdd>(OnAdd);
SubscribeLocalEvent<ToggleableClothingComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<ToggleableClothingComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<ToggleableClothingComponent, ToggleClothingEvent>(OnToggleClothing);
SubscribeLocalEvent<ToggleableClothingComponent, GetItemActionsEvent>(OnGetActions);
@@ -163,7 +163,7 @@ public sealed class ToggleableClothingSystem : EntitySystem
args.Actions.Add(component.ToggleAction);
}
private void OnAdd(EntityUid uid, ToggleableClothingComponent component, ComponentAdd args)
private void OnInit(EntityUid uid, ToggleableClothingComponent component, ComponentInit args)
{
component.Container = _containerSystem.EnsureContainer<ContainerSlot>(uid, component.ContainerId);
}