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

BorgChassis transfer their mind to a dropped BorgBrain fix #34464

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
5 changes: 2 additions & 3 deletions Content.Server/Silicons/Borgs/BorgSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ protected override void OnInserted(EntityUid uid, BorgChassisComponent component
{
base.OnInserted(uid, component, args);

if (HasComp<BorgBrainComponent>(args.Entity) && _mind.TryGetMind(args.Entity, out var mindId, out var mind))
if (HasComp<BorgBrainComponent>(args.Entity) && _mind.TryGetMind(args.Entity, out var mindId, out var mind) && args.Container == component.BrainContainer)
{
_mind.TransferTo(mindId, uid, mind: mind);
}
Expand All @@ -164,8 +164,7 @@ protected override void OnRemoved(EntityUid uid, BorgChassisComponent component,
{
base.OnRemoved(uid, component, args);

if (HasComp<BorgBrainComponent>(args.Entity) &
_mind.TryGetMind(uid, out var mindId, out var mind))
if (HasComp<BorgBrainComponent>(args.Entity) && _mind.TryGetMind(uid, out var mindId, out var mind) && args.Container == component.BrainContainer)
{
_mind.TransferTo(mindId, args.Entity, mind: mind);
}
Expand Down
Loading