Mind Swap Fix (#33553)
* Stores owned by mind instead of body * Requested changes, traitor uplink fixed * Store, listings fixed and now use Entity<MindComponent> * Removed duplicate code * test change * test change 2 * back to mind entityuid * MilonPL requested minor changes * ScarKy0 requested changes
This commit is contained in:
@@ -10,6 +10,7 @@ using JetBrains.Annotations;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
using System.Linq;
|
||||
using Content.Shared.Mind;
|
||||
|
||||
namespace Content.Server.Store.Systems;
|
||||
|
||||
@@ -69,10 +70,13 @@ public sealed partial class StoreSystem : EntitySystem
|
||||
if (!component.OwnerOnly)
|
||||
return;
|
||||
|
||||
component.AccountOwner ??= args.User;
|
||||
if (!_mind.TryGetMind(args.User, out var mind, out _))
|
||||
return;
|
||||
|
||||
component.AccountOwner ??= mind;
|
||||
DebugTools.Assert(component.AccountOwner != null);
|
||||
|
||||
if (component.AccountOwner == args.User)
|
||||
if (component.AccountOwner == mind)
|
||||
return;
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("store-not-account-owner", ("store", uid)), uid, args.User);
|
||||
|
||||
Reference in New Issue
Block a user