Skip to content

Commit

Permalink
Don't crash when selecting NPC's that don't have the factionselector …
Browse files Browse the repository at this point in the history
…component
  • Loading branch information
Timfa2112 committed Jan 21, 2025
1 parent 9ff0a33 commit 785eb3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Content.Server/NPC/Systems/NpcFactionSelectorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<NpcFactionMemberComponent, GetVerbsEvent<Verb>>(OnGetVerb);
SubscribeLocalEvent<NpcFactionSelectorComponent, GetVerbsEvent<Verb>>(OnGetVerb);
}

private void OnGetVerb(Entity<NpcFactionMemberComponent> entity, ref GetVerbsEvent<Verb> args)
private void OnGetVerb(Entity<NpcFactionSelectorComponent> entity, ref GetVerbsEvent<Verb> args)
{
if (!args.CanAccess || !args.CanInteract || args.Hands == null)
return;
Expand Down

0 comments on commit 785eb3b

Please sign in to comment.