Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Server.Heretic.EntitySystems;
using Content.Shared.Eye;

namespace Content.Server.Heretic.Components;

Expand All @@ -7,6 +8,5 @@ public sealed partial class EldritchInfluenceComponent : Component
{
[DataField] public bool Spent = false;

// make sure to update it with the prototype !!!
[NonSerialized] public static int LayerMask = 69; // 69 idk why not lolol
[NonSerialized] public static int LayerMask = (int)VisibilityFlags.Eldritch;
}
1 change: 1 addition & 0 deletions Content.Server/ADT/Heretic/EntitySystems/HereticSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using Content.Shared.Damage.Components;
using Content.Shared.ADT.Chaplain.Components;
using Robust.Shared.Utility;
using Content.Shared.Eye;

namespace Content.Server.Heretic.EntitySystems;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,9 @@ public sealed partial class PolymorphedEntityComponent : Component

[DataField]
public EntityUid? Action;

// ADT-Tweak start
[DataField]
public int? ParentVisibilityMask;
// ADT-Tweak end
}
16 changes: 16 additions & 0 deletions Content.Server/Polymorph/Systems/PolymorphSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Content.Shared.CombatMode.Pacification;
using Content.Shared.Bed.Sleep;
using Content.Shared.Eye.Blinding.Components;
using Robust.Shared.GameObjects;
using Content.Server.Traits.Assorted;
using Content.Shared.Speech.Muting;
using Content.Shared.ADT.Traits;
Expand All @@ -25,6 +26,7 @@
using Content.Shared.Damage.Components;
using Content.Shared.Damage.Systems;
using Content.Shared.Destructible;
using Content.Shared.Eye;
using Content.Shared.Follower;
using Content.Shared.Follower.Components;
using Content.Shared.Hands.EntitySystems;
Expand Down Expand Up @@ -69,6 +71,7 @@ public sealed partial class PolymorphSystem : EntitySystem
[Dependency] private readonly SharedMindSystem _mindSystem = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
[Dependency] private readonly FollowerSystem _follow = default!; // goob edit
[Dependency] private readonly SharedEyeSystem _eye = default!; // ADT-Tweak Heretic

[Dependency] private readonly ISerializationManager _serialization = default!; // ADT-Changeling-Tweak
private const string RevertPolymorphId = "ActionRevertPolymorph";
Expand Down Expand Up @@ -242,6 +245,12 @@ private void OnPolymorphedTerminating(Entity<PolymorphedEntityComponent> ent, re
var polymorphedComp = Factory.GetComponent<PolymorphedEntityComponent>();
polymorphedComp.Parent = uid;
polymorphedComp.Configuration = configuration;

// ADT-Tweak start Heretic
if (TryComp<EyeComponent>(uid, out var parentEye))
polymorphedComp.ParentVisibilityMask = parentEye.VisibilityMask;
// ADT-Tweak end

AddComp(child, polymorphedComp);

var childXform = Transform(child);
Expand Down Expand Up @@ -589,6 +598,13 @@ private void RetrievePausedEntity(EntityUid user, EntityUid target)
if (TryComp<PolymorphableComponent>(parent, out var polymorphableComponent))
polymorphableComponent.LastPolymorphEnd = _gameTiming.CurTime;

// ADT-Tweak start Heretic
if (component.ParentVisibilityMask.HasValue && TryComp<EyeComponent>(parent, out var parentEye))
{
_eye.SetVisibilityMask(parent, component.ParentVisibilityMask.Value, parentEye);
}
// ADT-Tweak end

// if an item polymorph was picked up, put it back down after reverting
_transform.AttachToGridOrMap(parent, parentXform);

Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Eye/VisibilityFlags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public enum VisibilityFlags : int
Narcotic = 1 << 2, // ADT-Changeling-Tweak
Schizo = 1 << 3, // ADT-Changeling-Tweak
LingToxin = 1 << 4, // ADT-Changeling-Tweak
Eldritch = 1 << 5, // ADT-Tweak Heretic
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
state: icon
- type: Clickable
- type: Visibility
layer: 69
layer: 32

- type: entity
id: EldritchInfluenceIntermediate
Expand Down
Loading