diff --git a/Content.Shared/_Amour/RoleplayInfo/SharedRoleplaySystem.cs b/Content.Shared/_Amour/RoleplayInfo/SharedRoleplaySystem.cs index aa593e3fbc..e9a280698e 100644 --- a/Content.Shared/_Amour/RoleplayInfo/SharedRoleplaySystem.cs +++ b/Content.Shared/_Amour/RoleplayInfo/SharedRoleplaySystem.cs @@ -1,7 +1,5 @@ using System.Linq; using Content.Shared._Amour.HumanoidAppearanceExtension; -using Content.Shared.Examine; -using Content.Shared.Humanoid; namespace Content.Shared._Amour.RoleplayInfo; @@ -15,10 +13,12 @@ public abstract class SharedRoleplaySystem : EntitySystem private void OnHumanoidLoading(EntityUid uid, RoleplayInfoComponent component, HumanoidAppearanceLoadingEvent args) { component.Data = new List(args.Profile.RoleplayInfoData.Select(p => p.Value)); - if (component.Data.Count == 0) + if (component.Data.Count < 2) { - var erp = new RoleplayInfo(name: "erp", roleplaySelection: RoleplaySelection.No); - var noncon = new RoleplayInfo(name: "noncon", roleplaySelection: RoleplaySelection.No); + var erpField = component.Data.Find((x) => { return x.Name.ToLower() == "erp"; }); + var erp = new RoleplayInfo(name: "erp", roleplaySelection: erpField != null ? erpField.RoleplaySelection : RoleplaySelection.No); + var nonconField = component.Data.Find((x) => { return x.Name.ToLower() == "noncon"; }); + var noncon = new RoleplayInfo(name: "noncon", roleplaySelection: nonconField != null ? nonconField.RoleplaySelection : RoleplaySelection.No); component.Data = new List { erp, noncon }; } }