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:
ActiveMammmoth
2025-02-04 11:25:54 -05:00
committed by GitHub
parent 1d5b01190d
commit 6a017ef17b
8 changed files with 32 additions and 22 deletions

View File

@@ -27,14 +27,12 @@ public sealed partial class BuyerJobCondition : ListingCondition
public override bool Condition(ListingConditionArgs args)
{
var ent = args.EntityManager;
var minds = ent.System<SharedMindSystem>();
// this is for things like surplus crate
if (!minds.TryGetMind(args.Buyer, out var mindId, out _))
return true;
if (!ent.TryGetComponent<MindComponent>(args.Buyer, out var _))
return true; // inanimate objects don't have minds
var jobs = ent.System<SharedJobSystem>();
jobs.MindTryGetJob(mindId, out var job);
jobs.MindTryGetJob(args.Buyer, out var job);
if (Blacklist != null)
{