Untouch Harpy Visuals
This commit is contained in:
parent
f9419a023b
commit
b07cf6b1f9
|
|
@ -1,4 +1,3 @@
|
|||
using Content.Shared.Body;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Tag;
|
||||
using Content.Shared.Humanoid;
|
||||
|
|
@ -9,6 +8,7 @@ namespace Content.Shared._DV.Harpy;
|
|||
public sealed class HarpyVisualsSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly TagSystem _tagSystem = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearanceSystem = default!;
|
||||
|
||||
private readonly ProtoId<TagPrototype> HarpyWingsTag = "HidesHarpyWings";
|
||||
|
||||
|
|
@ -16,22 +16,16 @@ public sealed class HarpyVisualsSystem : EntitySystem
|
|||
{
|
||||
base.Initialize();
|
||||
|
||||
// Delta V - Commented out since the layer system works differently.
|
||||
// SubscribeLocalEvent<HarpySingerComponent, DidEquipEvent>(OnDidEquipEvent);
|
||||
// SubscribeLocalEvent<HarpySingerComponent, DidUnequipEvent>(OnDidUnequipEvent);
|
||||
SubscribeLocalEvent<HarpySingerComponent, DidEquipEvent>(OnDidEquipEvent);
|
||||
SubscribeLocalEvent<HarpySingerComponent, DidUnequipEvent>(OnDidUnequipEvent);
|
||||
}
|
||||
|
||||
private void OnDidEquipEvent(EntityUid uid, HarpySingerComponent component, DidEquipEvent args)
|
||||
{
|
||||
if (args.Slot == "outerClothing" && _tagSystem.HasTag(args.Equipment, HarpyWingsTag))
|
||||
{
|
||||
// Delta V - Begin make this system work with Nubody
|
||||
var evWing = new HumanoidLayerVisibilityChangedEvent(HumanoidVisualLayers.RArmExtension, false);
|
||||
var evTail = new HumanoidLayerVisibilityChangedEvent(HumanoidVisualLayers.Tail, false);
|
||||
|
||||
RaiseLocalEvent(uid, ref evWing);
|
||||
RaiseLocalEvent(uid, ref evTail);
|
||||
// Delta V - End
|
||||
_appearanceSystem.SetData(uid, HumanoidVisualLayers.RArmExtension, false); // Frontier: RArm<RArmExtension
|
||||
_appearanceSystem.SetData(uid, HumanoidVisualLayers.Tail, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -39,13 +33,8 @@ public sealed class HarpyVisualsSystem : EntitySystem
|
|||
{
|
||||
if (args.Slot == "outerClothing" && _tagSystem.HasTag(args.Equipment, HarpyWingsTag))
|
||||
{
|
||||
// Delta V - Begin make this system work with Nubody
|
||||
var evWing = new HumanoidLayerVisibilityChangedEvent(HumanoidVisualLayers.RArmExtension, true);
|
||||
var evTail = new HumanoidLayerVisibilityChangedEvent(HumanoidVisualLayers.Tail, true);
|
||||
|
||||
RaiseLocalEvent(uid, ref evWing);
|
||||
RaiseLocalEvent(uid, ref evTail);
|
||||
// Delta V - End
|
||||
_appearanceSystem.SetData(uid, HumanoidVisualLayers.RArmExtension, true); // Frontier: RArm<RArmExtension
|
||||
_appearanceSystem.SetData(uid, HumanoidVisualLayers.Tail, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue