Move minds, roles, jobs and objectives to shared (#19679)

This commit is contained in:
DrSmugleaf
2023-08-30 21:46:11 -07:00
committed by GitHub
parent b702963d5e
commit 3f3ba6ac62
139 changed files with 1209 additions and 1041 deletions

View File

@@ -1,5 +1,4 @@
using Content.Server.Mind;
using Content.Server.Roles;
using Content.Shared.Mind;
using Content.Shared.Roles;
using Content.Shared.Store;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
@@ -28,12 +27,12 @@ public sealed partial class BuyerAntagCondition : ListingCondition
public override bool Condition(ListingConditionArgs args)
{
var ent = args.EntityManager;
var minds = ent.System<MindSystem>();
var minds = ent.System<SharedMindSystem>();
if (!minds.TryGetMind(args.Buyer, out var mindId, out var mind))
return true;
var roleSystem = ent.System<RoleSystem>();
var roleSystem = ent.System<SharedRoleSystem>();
var roles = roleSystem.MindGetAllRoles(mindId);
if (Blacklist != null)

View File

@@ -1,6 +1,6 @@
using Content.Server.Mind;
using Content.Server.Roles.Jobs;
using Content.Shared.Mind;
using Content.Shared.Roles;
using Content.Shared.Roles.Jobs;
using Content.Shared.Store;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
@@ -30,13 +30,13 @@ public sealed partial class BuyerDepartmentCondition : ListingCondition
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
var ent = args.EntityManager;
var minds = ent.System<MindSystem>();
var minds = ent.System<SharedMindSystem>();
// this is for things like surplus crate
if (!minds.TryGetMind(args.Buyer, out var mindId, out _))
return true;
var jobs = ent.System<JobSystem>();
var jobs = ent.System<SharedJobSystem>();
if (jobs.MindTryGetJob(mindId, out var job, out _))
{
if (Blacklist != null)

View File

@@ -1,6 +1,6 @@
using Content.Server.Mind;
using Content.Server.Roles.Jobs;
using Content.Shared.Mind;
using Content.Shared.Roles;
using Content.Shared.Roles.Jobs;
using Content.Shared.Store;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
@@ -27,13 +27,13 @@ public sealed partial class BuyerJobCondition : ListingCondition
public override bool Condition(ListingConditionArgs args)
{
var ent = args.EntityManager;
var minds = ent.System<MindSystem>();
var minds = ent.System<SharedMindSystem>();
// this is for things like surplus crate
if (!minds.TryGetMind(args.Buyer, out var mindId, out _))
return true;
var jobs = ent.System<JobSystem>();
var jobs = ent.System<SharedJobSystem>();
if (jobs.MindTryGetJob(mindId, out var job, out _))
{
if (Blacklist != null)