Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vm solidus upstream merge 8 2 2024 #57

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
e9bd710
Restore HoP As A Functional Job (#576)
VMSolidus Jul 22, 2024
a4424f6
Automatic Changelog Update (#576)
SimpleStation14 Jul 22, 2024
6b74938
Fix Subfloors For Diggable Diles (#577)
VMSolidus Jul 22, 2024
9732459
Automatic Changelog Update (#577)
SimpleStation14 Jul 22, 2024
2fc7725
Update CPRSystem.cs
VMSolidus Jul 22, 2024
ae4c6a4
Update DefibrillatorSystem.cs
VMSolidus Jul 22, 2024
fe84704
Update drinks.yml (#578)
VMSolidus Jul 22, 2024
cb8a2b2
Carrying System Refactor
VMSolidus Jul 22, 2024
972c4ad
Make a mistake in the order causing LIGHTER characters to be harder t…
VMSolidus Jul 22, 2024
cb27d72
Small change to variable name
VMSolidus Jul 22, 2024
cf0498e
Refactor FabricateCandySystem Into Its Generic Equivalent (#566)
Mnemotechnician Jul 23, 2024
72b0fd2
Fix Loadout and Trait Job Playtime Requirements (#584)
DEATHB4DEFEAT Jul 23, 2024
2ac6ec5
Automatic Changelog Update (#584)
SimpleStation14 Jul 23, 2024
527acd8
Fix FalseAlarmRule (#587)
Mnemotechnician Jul 24, 2024
6afac54
Automatic Changelog Update (#587)
SimpleStation14 Jul 24, 2024
ad7fd13
Update Contests System (#583)
VMSolidus Jul 24, 2024
b2e97ad
Merge branch 'master' into Carrying-System-Refactor
VMSolidus Jul 24, 2024
57adf2a
Update Carrying System to New Mass Contests
VMSolidus Jul 24, 2024
4a8b885
Include Stamina Contest
VMSolidus Jul 24, 2024
c9b9e85
Update CarryingSystem.cs
VMSolidus Jul 24, 2024
8751ca3
Update CarryingSystem.cs
VMSolidus Jul 24, 2024
db28ee6
Update CarryingSystem.cs
VMSolidus Jul 24, 2024
1ef3a41
Update CarryingSystem.cs
VMSolidus Jul 24, 2024
62a671f
Update CarryingSystem.cs
VMSolidus Jul 24, 2024
a5c515f
Fix Editor Dummy Always Being Human (#582)
DEATHB4DEFEAT Jul 24, 2024
c42e025
Automatic Changelog Update (#582)
SimpleStation14 Jul 24, 2024
224f74d
Event Rebalance (#581)
Mnemotechnician Jul 24, 2024
aca1132
Automatic Changelog Update (#581)
SimpleStation14 Jul 24, 2024
78f0a79
Social Anxiety Trait Renamed (#591)
CilliePaint Jul 25, 2024
bffc876
Prevent Instant Unequip of Clothing (#594)
Mnemotechnician Jul 25, 2024
7d1b23f
Random Announcer Fixes (#557)
DEATHB4DEFEAT Jul 26, 2024
634e933
Automatic Changelog Update (#557)
SimpleStation14 Jul 26, 2024
ec76fb9
Fix Talking Across Docked Grids (#593)
VMSolidus Jul 26, 2024
2ec1a03
Automatic Changelog Update (#593)
SimpleStation14 Jul 26, 2024
92dcd72
Refactor Sign Languages and Language Markers (#575)
Mnemotechnician Jul 26, 2024
7a8a0ad
Fix Multiple Species Requirements (#595)
DEATHB4DEFEAT Jul 26, 2024
910b4c3
Refactor Ramping Event Scheduler (#592)
VMSolidus Jul 27, 2024
c505552
Automatic Changelog Update (#592)
SimpleStation14 Jul 27, 2024
143b1d5
Fix Script Folder in Readme for Linux (#598)
Fansana Jul 27, 2024
c92ea10
Update Credits (#602)
github-actions[bot] Jul 28, 2024
305d585
Melee Light Refactoring
VMSolidus Jul 28, 2024
fe3e9e8
Cleaning up deprecated VV usage and datafield names
VMSolidus Jul 28, 2024
c6cd32b
More factoring
VMSolidus Jul 28, 2024
5a9259f
Update MeleeWeaponSystem.cs
VMSolidus Jul 28, 2024
2160377
Fix linter
VMSolidus Jul 28, 2024
a0d7f7d
Box Retexture (#597)
CilliePaint Jul 29, 2024
4b9c598
Automatic Changelog Update (#597)
SimpleStation14 Jul 29, 2024
faa239a
Fix 125 Toolshed Commands Being Unusable for Anyone without +HOST (#572)
Mnemotechnician Jul 29, 2024
41a5e8e
Automatic Changelog Update (#572)
SimpleStation14 Jul 29, 2024
a9e28ee
Radiation Doesn't Prevent DoAfters (#606)
VMSolidus Jul 29, 2024
7c5625b
Automatic Changelog Update (#606)
SimpleStation14 Jul 29, 2024
f149b25
replace cvar with component variable
VMSolidus Jul 29, 2024
d0cebd4
Update MeleeWeaponSystem.cs
VMSolidus Jul 29, 2024
e5088a1
9 New Physical traits
VMSolidus Jul 29, 2024
4ea187e
Update MeleeWeaponComponent.cs
VMSolidus Jul 29, 2024
2fbece4
Update TraitStatModifierSystem.cs
VMSolidus Jul 29, 2024
54c119e
Make Jobs & Antags Use CharacterRequirements (#596)
DEATHB4DEFEAT Jul 29, 2024
56d039c
Add Cybernetic Limb Markings (#613)
angelofallars Jul 30, 2024
055ad75
Automatic Changelog Update (#613)
SimpleStation14 Jul 30, 2024
08dde02
Add Makeup (#614)
angelofallars Jul 30, 2024
b744818
Automatic Changelog Update (#614)
SimpleStation14 Jul 30, 2024
29cb1b0
Hotfix Late Joins (#612)
VMSolidus Jul 31, 2024
d38c7d4
Hotfix Playtime Requirements (#621)
Mnemotechnician Jul 31, 2024
9527936
Remove Cargo Pallet From Request Console (#626)
Tmanzxd Jul 31, 2024
3a9c337
Use Correct Changelog Name (#627)
angelofallars Jul 31, 2024
d39c990
Fix Sound Params (#624)
VMSolidus Jul 31, 2024
5f73a5a
Automatic Changelog Update (#624)
SimpleStation14 Jul 31, 2024
c0114c0
Lasers Have No Recoil (#603)
VMSolidus Jul 31, 2024
8a3abcb
Automatic Changelog Update (#603)
SimpleStation14 Jul 31, 2024
fa2abfa
Fix the Uncategorized Category Not Being Hidden (#628)
DEATHB4DEFEAT Jul 31, 2024
5335dce
Automatic Changelog Update (#628)
SimpleStation14 Jul 31, 2024
b15d096
Minor Language Fixes (#618)
Mnemotechnician Jul 31, 2024
80eb456
Comms Console Announcer Fixes (#610)
VMSolidus Jul 31, 2024
3da588f
Automatic Changelog Update (#618)
SimpleStation14 Jul 31, 2024
6d1ae15
More Loadout Items: Wave 2 (#616)
angelofallars Aug 1, 2024
b3c3647
Automatic Changelog Update (#616)
SimpleStation14 Aug 1, 2024
7fb089d
Replace and Fix MedHud Icons (#631)
Tmanzxd Aug 1, 2024
5f2cae0
Manual Removal of easy_pry.yml (#632)
Tmanzxd Aug 1, 2024
00a74a2
Revert "Mirror: Restrict Door Remotes to only Being Able to Manipulat…
stellar-novas Aug 1, 2024
ac2fc06
Invert the Running/Walking States (#485)
DEATHB4DEFEAT Aug 1, 2024
a6237f3
Automatic Changelog Update (#485)
SimpleStation14 Aug 1, 2024
94098c6
Move Survival Boxes To Loadouts (#634)
VMSolidus Aug 1, 2024
11524d8
Automatic Changelog Update (#634)
SimpleStation14 Aug 1, 2024
dfdae62
Make Boxes Not Useless (#635)
VMSolidus Aug 1, 2024
437ac5a
Automatic Changelog Update (#635)
SimpleStation14 Aug 1, 2024
6bc8b60
"Buff" Vision Traits (#636)
VMSolidus Aug 1, 2024
0d1c931
Automatic Changelog Update (#636)
SimpleStation14 Aug 1, 2024
c96cfcc
More Loadout Items: Wave 3 (#633)
angelofallars Aug 1, 2024
adafe4a
Automatic Changelog Update (#633)
SimpleStation14 Aug 1, 2024
c4e53fd
Update vending.yml
VMSolidus Aug 1, 2024
e84f6c7
Update vendingdrinks.yml
VMSolidus Aug 1, 2024
1481146
Vulpkanin Tail Wagging (#588)
FoxxoTrystan Aug 1, 2024
8ccbf7e
Automatic Changelog Update (#588)
SimpleStation14 Aug 1, 2024
91c5d2d
Merge remote-tracking branch 'EE-Master/LamiaSystem' into upstream-me…
VMSolidus Aug 2, 2024
b067e17
aaaaaaaaa
VMSolidus Aug 2, 2024
5f37d06
Fixes from latest feedback
VMSolidus Jul 15, 2024
f8b8a0f
No idea how the hell potentialpsychics came back
VMSolidus Jul 20, 2024
1faea1c
Update xeno.yml
VMSolidus Jul 20, 2024
6662589
Update PsionicAbilitiesSystem.cs
VMSolidus Jul 25, 2024
75c75b2
Merge remote-tracking branch 'EE-Personal/Additional-Contests-Impleme…
VMSolidus Aug 2, 2024
7c87bc6
Merge remote-tracking branch 'EE-Personal/NyanoCombat-2,-Part-3-Physi…
VMSolidus Aug 2, 2024
977df33
Merge remote-tracking branch 'EE-Personal/Carrying-System-Refactor' i…
VMSolidus Aug 2, 2024
669dbee
Merge remote-tracking branch 'EE-Personal/Add-Sol-Federation-Vendors-…
VMSolidus Aug 2, 2024
e8113c9
Fix contests
VMSolidus Aug 2, 2024
90addd3
Merge remote-tracking branch 'EE-Personal/CPR-Remake' into Upstream-M…
VMSolidus Aug 2, 2024
39d89b1
womp
Jul 1, 2024
ec10f89
Update SupermatterSystem.cs
VMSolidus Jul 22, 2024
cad531f
Cleanup Deprecated VV Options
VMSolidus Jul 30, 2024
cc34952
Update SupermatterSystem.cs
VMSolidus Jul 30, 2024
b6f0344
Update SupermatterFoodComponent.cs
VMSolidus Jul 30, 2024
e117c79
Update SupermatterComponent.cs
VMSolidus Jul 31, 2024
45dc2de
Add job whitelist system (#28085)
VMSolidus Jul 31, 2024
3fa61be
This took way too long
VMSolidus Aug 2, 2024
35dd95e
Merge branch 'VMSolidus-Upstream-Merge-8-2-2024' of https://github.co…
VMSolidus Aug 2, 2024
04e4c39
Update elemental.yml
VMSolidus Aug 2, 2024
81c41d8
Update speech_emotes.yml
VMSolidus Aug 2, 2024
9d3f3ab
Fix times
VMSolidus Aug 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 21 additions & 3 deletions Content.Client/LateJoin/LateJoinGui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
using Content.Client.GameTicking.Managers;
using Content.Client.UserInterface.Controls;
using Content.Client.Players.PlayTimeTracking;
using Content.Client.Preferences;
using Content.Shared.CCVar;
using Content.Shared.Customization.Systems;
using Content.Shared.Preferences;
using Content.Shared.Roles;
using Content.Shared.StatusIcon;
using Microsoft.Win32.SafeHandles;
using Robust.Client.Console;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
Expand All @@ -26,12 +30,15 @@ public sealed class LateJoinGui : DefaultWindow
[Dependency] private readonly IConfigurationManager _configManager = default!;
[Dependency] private readonly IEntitySystemManager _entitySystem = default!;
[Dependency] private readonly JobRequirementsManager _jobRequirements = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IClientPreferencesManager _prefs = default!;

public event Action<(NetEntity, string)> SelectedId;

private readonly ClientGameTicker _gameTicker;
private readonly SpriteSystem _sprites;
private readonly CrewManifestSystem _crewManifest;
private readonly CharacterRequirementsSystem _characterRequirements;

private readonly Dictionary<NetEntity, Dictionary<string, List<JobButton>>> _jobButtons = new();
private readonly Dictionary<NetEntity, Dictionary<string, BoxContainer>> _jobCategories = new();
Expand All @@ -46,6 +53,7 @@ public LateJoinGui()
_sprites = _entitySystem.GetEntitySystem<SpriteSystem>();
_crewManifest = _entitySystem.GetEntitySystem<CrewManifestSystem>();
_gameTicker = _entitySystem.GetEntitySystem<ClientGameTicker>();
_characterRequirements = _entitySystem.GetEntitySystem<CharacterRequirementsSystem>();

Title = Loc.GetString("late-join-gui-title");

Expand Down Expand Up @@ -254,14 +262,24 @@ private void RebuildUI()

jobButton.OnPressed += _ => SelectedId.Invoke((id, jobButton.JobId));

if (!_jobRequirements.IsAllowed(prototype, out var reason))
if (!_characterRequirements.CheckRequirementsValid(
prototype.Requirements ?? new(),
prototype,
(HumanoidCharacterProfile) (_prefs.Preferences?.SelectedCharacter
?? HumanoidCharacterProfile.DefaultWithSpecies()),
_jobRequirements.GetRawPlayTimeTrackers(),
_jobRequirements.IsWhitelisted(),
_entityManager,
_prototypeManager,
_configManager,
out var reasons))
{
jobButton.Disabled = true;

if (!reason.IsEmpty)
if (reasons.Count > 0)
{
var tooltip = new Tooltip();
tooltip.SetMessage(reason);
tooltip.SetMessage(_characterRequirements.GetRequirementsText(reasons));
jobButton.TooltipSupplier = _ => tooltip;
}

Expand Down
70 changes: 39 additions & 31 deletions Content.Client/Lobby/LobbyUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
using Content.Client.Humanoid;
using Content.Client.Inventory;
using Content.Client.Lobby.UI;
using Content.Client.Players.PlayTimeTracking;
using Content.Client.Preferences;
using Content.Client.Preferences.UI;
using Content.Shared.Clothing.Loadouts.Systems;
using Content.Shared.GameTicking;
using Content.Shared.Humanoid;
using Content.Shared.Humanoid.Prototypes;
using Content.Shared.Preferences;
using Content.Shared.Roles;
Expand All @@ -22,6 +24,7 @@ public sealed class LobbyUIController : UIController, IOnStateEntered<LobbyState
[Dependency] private readonly IClientPreferencesManager _preferencesManager = default!;
[Dependency] private readonly IStateManager _stateManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly JobRequirementsManager _jobRequirements = default!;
[UISystemDependency] private readonly HumanoidAppearanceSystem _humanoid = default!;
[UISystemDependency] private readonly ClientInventorySystem _inventory = default!;
[UISystemDependency] private readonly LoadoutSystem _loadouts = default!;
Expand Down Expand Up @@ -98,41 +101,51 @@ public void UpdateCharacterUI()
return;
}

if (_previewDummy == null)
var maybeProfile = _profileEditor?.Profile ?? (HumanoidCharacterProfile) _preferencesManager.Preferences!.SelectedCharacter;

if (_previewDummy == null
|| maybeProfile.Species != EntityManager.GetComponent<HumanoidAppearanceComponent>(_previewDummy.Value).Species)
{
_previewDummy =
EntityManager.SpawnEntity(
_prototypeManager.Index<SpeciesPrototype>(HumanoidCharacterProfile.DefaultWithSpecies().Species)
.DollPrototype, MapCoordinates.Nullspace);
_previewPanel?.SetSprite(_previewDummy.Value);
RespawnDummy(maybeProfile);
_previewPanel?.SetSprite(_previewDummy!.Value);
}

_previewPanel?.SetLoaded(true);

if (_preferencesManager.Preferences?.SelectedCharacter is not HumanoidCharacterProfile selectedCharacter)
_previewPanel?.SetSummaryText(string.Empty);
else if (_previewDummy != null)
if (_previewDummy == null)
return;

_previewPanel?.SetSummaryText(maybeProfile.Summary);
_humanoid.LoadProfile(_previewDummy.Value, maybeProfile);


if (UpdateClothes)
{
var maybeProfile = _profileEditor?.Profile ?? selectedCharacter;
_previewPanel?.SetSummaryText(maybeProfile.Summary);
_humanoid.LoadProfile(_previewDummy.Value, maybeProfile);


if (UpdateClothes)
{
RemoveDummyClothes(_previewDummy.Value);
if (ShowClothes)
GiveDummyJobClothes(_previewDummy.Value, GetPreferredJob(maybeProfile), maybeProfile);
if (ShowLoadouts)
GiveDummyLoadouts(_previewDummy.Value, GetPreferredJob(maybeProfile), maybeProfile);
UpdateClothes = false;
}

PreviewDummyUpdated?.Invoke(_previewDummy.Value);
RemoveDummyClothes(_previewDummy.Value);
if (ShowClothes)
GiveDummyJobClothes(_previewDummy.Value, GetPreferredJob(maybeProfile), maybeProfile);
if (ShowLoadouts)
_loadouts.ApplyCharacterLoadout(_previewDummy.Value, GetPreferredJob(maybeProfile), maybeProfile,
_jobRequirements.GetRawPlayTimeTrackers(), _jobRequirements.IsWhitelisted());
UpdateClothes = false;
}

PreviewDummyUpdated?.Invoke(_previewDummy.Value);
}


public void RespawnDummy(HumanoidCharacterProfile profile)
{
if (_previewDummy != null)
RemoveDummyClothes(_previewDummy.Value);

EntityManager.DeleteEntity(_previewDummy);
_previewDummy = EntityManager.SpawnEntity(
_prototypeManager.Index<SpeciesPrototype>(profile.Species).DollPrototype, MapCoordinates.Nullspace);

UpdateClothes = true;
}

/// <summary>
/// Gets the highest priority job for the profile.
/// </summary>
Expand Down Expand Up @@ -160,12 +173,7 @@ public void GiveDummyJobClothesLoadout(EntityUid dummy, HumanoidCharacterProfile
{
var job = GetPreferredJob(profile);
GiveDummyJobClothes(dummy, job, profile);
GiveDummyLoadouts(dummy, job, profile);
}

public void GiveDummyLoadouts(EntityUid dummy, JobPrototype job, HumanoidCharacterProfile profile)
{
_loadouts.ApplyCharacterLoadout(dummy, job, profile);
_loadouts.ApplyCharacterLoadout(dummy, job, profile, _jobRequirements.GetRawPlayTimeTrackers(), _jobRequirements.IsWhitelisted());
}

/// <summary>
Expand Down
63 changes: 15 additions & 48 deletions Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using Content.Shared.CCVar;
using Content.Shared.Customization.Systems;
using Content.Shared.Players;
using Content.Shared.Players.PlayTimeTracking;
using Content.Shared.Roles;
Expand All @@ -17,9 +18,6 @@ public sealed partial class JobRequirementsManager : ISharedPlaytimeManager
{
[Dependency] private readonly IBaseClient _client = default!;
[Dependency] private readonly IClientNetManager _net = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly IEntityManager _entManager = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IPrototypeManager _prototypes = default!;

private readonly Dictionary<string, TimeSpan> _roles = new();
Expand Down Expand Up @@ -80,64 +78,33 @@ private void RxPlayTime(MsgPlayTime message)
Updated?.Invoke();
}

public bool IsAllowed(JobPrototype job, [NotNullWhen(false)] out FormattedMessage? reason)
{
reason = null;

if (_roleBans.Contains($"Job:{job.ID}"))
{
reason = FormattedMessage.FromUnformatted(Loc.GetString("role-ban"));
return false;
}

var player = _playerManager.LocalSession;
if (player == null)
return true;

return CheckRoleTime(job.Requirements, out reason);
}

public bool CheckRoleTime(HashSet<JobRequirement>? requirements, [NotNullWhen(false)] out FormattedMessage? reason, string? localePrefix = "role-timer-")
{
reason = null;

if (requirements == null || !_cfg.GetCVar(CCVars.GameRoleTimers))
return true;

var reasons = new List<string>();
foreach (var requirement in requirements)
{
if (JobRequirements.TryRequirementMet(requirement, _roles, out var jobReason, _entManager, _prototypes, _whitelisted, localePrefix))
continue;

reasons.Add(jobReason.ToMarkup());
}

reason = reasons.Count == 0 ? null : FormattedMessage.FromMarkup(string.Join('\n', reasons));
return reason == null;
}

public TimeSpan FetchOverallPlaytime()
{
return _roles.TryGetValue("Overall", out var overallPlaytime) ? overallPlaytime : TimeSpan.Zero;
}

public IEnumerable<KeyValuePair<string, TimeSpan>> FetchPlaytimeByRoles()
public Dictionary<string, TimeSpan> FetchPlaytimeByRoles()
{
var jobsToMap = _prototypes.EnumeratePrototypes<JobPrototype>();
var ret = new Dictionary<string, TimeSpan>();

foreach (var job in jobsToMap)
{
if (_roles.TryGetValue(job.PlayTimeTracker, out var locJobName))
{
yield return new KeyValuePair<string, TimeSpan>(job.Name, locJobName);
}
}
ret.Add(job.Name, locJobName);

return ret;
}


public IReadOnlyDictionary<string, TimeSpan> GetPlayTimes(ICommonSession session)
public Dictionary<string, TimeSpan> GetPlayTimes()
{
var dict = FetchPlaytimeByRoles();
dict.Add(PlayTimeTrackingShared.TrackerOverall, FetchOverallPlaytime());
return dict;
}

public Dictionary<string, TimeSpan> GetRawPlayTimeTrackers()
{
return session != _playerManager.LocalSession ? new Dictionary<string, TimeSpan>() : _roles;
return _roles;
}
}
26 changes: 23 additions & 3 deletions Content.Client/Preferences/UI/AntagPreferenceSelector.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
using Content.Client.Players.PlayTimeTracking;
using Content.Shared.Customization.Systems;
using Content.Shared.Preferences;
using Content.Shared.Roles;
using Robust.Shared.Configuration;
using Robust.Shared.Prototypes;

namespace Content.Client.Preferences.UI;

Expand All @@ -14,7 +18,7 @@ public bool Preference

public event Action<bool>? PreferenceChanged;

public AntagPreferenceSelector(AntagPrototype proto) : base(proto)
public AntagPreferenceSelector(AntagPrototype proto, JobPrototype highJob) : base(proto, highJob)
{
Options.OnItemSelected += _ => PreferenceChanged?.Invoke(Preference);

Expand All @@ -30,7 +34,23 @@ public AntagPreferenceSelector(AntagPrototype proto) : base(proto)
// Immediately lock requirements if they aren't met.
// Another function checks Disabled after creating the selector so this has to be done now
var requirements = IoCManager.Resolve<JobRequirementsManager>();
if (proto.Requirements != null && !requirements.CheckRoleTime(proto.Requirements, out var reason))
LockRequirements(reason);
var prefs = IoCManager.Resolve<IClientPreferencesManager>();
var entMan = IoCManager.Resolve<IEntityManager>();
var characterReqs = entMan.System<CharacterRequirementsSystem>();
var protoMan = IoCManager.Resolve<IPrototypeManager>();
var configMan = IoCManager.Resolve<IConfigurationManager>();

if (proto.Requirements != null
&& !characterReqs.CheckRequirementsValid(
proto.Requirements,
highJob,
(HumanoidCharacterProfile) (prefs.Preferences?.SelectedCharacter ?? HumanoidCharacterProfile.DefaultWithSpecies()),
requirements.GetRawPlayTimeTrackers(),
requirements.IsWhitelisted(),
entMan,
protoMan,
configMan,
out var reasons))
LockRequirements(characterReqs.GetRequirementsText(reasons));
}
}
Loading
Loading