Stores owned by mind instead of body

This commit is contained in:
ActiveMammmoth
2024-11-21 12:33:59 -05:00
parent dbb2055dfd
commit dfb72ab70e

View File

@@ -69,10 +69,12 @@ public sealed partial class StoreSystem : EntitySystem
if (!component.OwnerOnly)
return;
component.AccountOwner ??= args.User;
_mind.TryGetMind(args.User, out var mind, out var mindComp);
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);