Skip to content

Commit

Permalink
Update FactionClothingSystem.cs (new-frontiers-14#1659)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvir001 authored Jul 12, 2024
1 parent 361c97d commit 27890bd
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Shared.Inventory.Events;
using Content.Shared.NPC.Components;
using Content.Shared.NPC.Systems;
using Robust.Shared.Player; // Frontier - Dont edit AI factions

namespace Content.Shared.Clothing.EntitySystems;

Expand All @@ -22,6 +23,9 @@ public override void Initialize()

private void OnEquipped(Entity<FactionClothingComponent> ent, ref GotEquippedEvent args)
{
if (!HasComp<ActorComponent>(args.Equipee)) // Frontier - Dont edit AI factions
return; // Frontier - Dont edit AI factions

TryComp<NpcFactionMemberComponent>(args.Equipee, out var factionComp);
var faction = (args.Equipee, factionComp);
ent.Comp.AlreadyMember = _faction.IsMember(faction, ent.Comp.Faction);
Expand All @@ -31,6 +35,9 @@ private void OnEquipped(Entity<FactionClothingComponent> ent, ref GotEquippedEve

private void OnUnequipped(Entity<FactionClothingComponent> ent, ref GotUnequippedEvent args)
{
if (!HasComp<ActorComponent>(args.Equipee)) // Frontier - Dont edit AI factions
return; // Frontier - Dont edit AI factions

if (ent.Comp.AlreadyMember)
{
ent.Comp.AlreadyMember = false;
Expand Down

0 comments on commit 27890bd

Please sign in to comment.