Faction Fixes
This commit is contained in:
parent
a31fc4df45
commit
20358fcdb7
|
|
@ -1,11 +1,12 @@
|
|||
using Content.Shared.NPC.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.NPC.Components
|
||||
namespace Content.Shared.NPC.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
/// <summary>
|
||||
/// Allows clothing to add a faction to you when you wear it.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class ClothingAddFactionComponent : Component
|
||||
{
|
||||
public bool IsActive = false;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
using Content.Server.NPC.Components;
|
||||
using Content.Shared.NPC.Components;
|
||||
|
||||
namespace Content.Server.NPC.Systems;
|
||||
namespace Content.Shared.NPC.Systems;
|
||||
|
||||
public partial class NpcFactionSystem : EntitySystem
|
||||
{
|
||||
|
|
@ -1,15 +1,14 @@
|
|||
using Content.Server.NPC.Components;
|
||||
using Content.Server.Store.Systems;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.NPC.Components;
|
||||
|
||||
namespace Content.Server.NPC.Systems;
|
||||
namespace Content.Shared.NPC.Systems;
|
||||
|
||||
public partial class NpcFactionSystem : EntitySystem
|
||||
{
|
||||
public void InitializeItems()
|
||||
{
|
||||
SubscribeLocalEvent<NpcFactionMemberComponent, ItemPurchasedEvent>(OnItemPurchased);
|
||||
// SubscribeLocalEvent<NpcFactionMemberComponent, ItemPurchasedEvent>(OnItemPurchased);
|
||||
|
||||
SubscribeLocalEvent<ClothingAddFactionComponent, GotEquippedEvent>(OnClothingEquipped);
|
||||
SubscribeLocalEvent<ClothingAddFactionComponent, GotUnequippedEvent>(OnClothingUnequipped);
|
||||
|
|
@ -19,10 +18,10 @@ public partial class NpcFactionSystem : EntitySystem
|
|||
/// If we bought something we probably don't want it to start biting us after it's automatically placed in our hands.
|
||||
/// If you do, consider finding a better solution to grenade penguin CBT.
|
||||
/// </summary>
|
||||
private void OnItemPurchased(EntityUid uid, NpcFactionMemberComponent component, ref ItemPurchasedEvent args)
|
||||
{
|
||||
component.ExceptionalFriendlies.Add(args.Purchaser);
|
||||
}
|
||||
// private void OnItemPurchased(EntityUid uid, NpcFactionMemberComponent component, ref ItemPurchasedEvent args)
|
||||
// {
|
||||
// component.ExceptionalFriendlies.Add(args.Purchaser);
|
||||
// }
|
||||
|
||||
private void OnClothingEquipped(EntityUid uid, ClothingAddFactionComponent component, GotEquippedEvent args)
|
||||
{
|
||||
Loading…
Reference in New Issue