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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user