Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psionic insulation and invisibility fix #887

Merged
Merged
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
Expand Up @@ -86,8 +86,6 @@ private void OnInvisInit(EntityUid uid, PsionicallyInvisibleComponent component,
_visibilitySystem.AddLayer(uid, visibility, (int) VisibilityFlags.PsionicInvisibility, false);
_visibilitySystem.RemoveLayer(uid, visibility, (int) VisibilityFlags.Normal, false);
_visibilitySystem.RefreshVisibility(uid, visibility);

SetCanSeePsionicInvisiblity(uid, true);
}


Expand All @@ -99,8 +97,6 @@ private void OnInvisShutdown(EntityUid uid, PsionicallyInvisibleComponent compon
_visibilitySystem.AddLayer(uid, visibility, (int) VisibilityFlags.Normal, false);
_visibilitySystem.RefreshVisibility(uid, visibility);
}
if (HasComp<PotentialPsionicComponent>(uid) && !HasComp<PsionicInsulationComponent>(uid))
SetCanSeePsionicInvisiblity(uid, false);
}

private void OnEyeInit(EntityUid uid, EyeComponent component, ComponentInit args)
Expand Down Expand Up @@ -129,7 +125,7 @@ public void SetCanSeePsionicInvisiblity(EntityUid uid, bool set)
{
if (EntityManager.TryGetComponent(uid, out EyeComponent? eye))
{
//_eye.SetVisibilityMask(uid, eye.VisibilityMask & (int) VisibilityFlags.PsionicInvisibility, eye);
_eye.SetVisibilityMask(uid, eye.VisibilityMask & ~ (int) VisibilityFlags.PsionicInvisibility, eye);
}
}
}
Expand Down
Loading