Merge remote-tracking branch 'upstream/stable' into ed-15-09-2025-upstream-sync
# Conflicts: # .github/CODEOWNERS # Content.Client/Overlays/StencilOverlay.cs # Content.Server/Chemistry/EntitySystems/InjectorSystem.cs # Content.Server/GameTicking/Commands/SetGamePresetCommand.cs # Content.Server/Players/PlayTimeTracking/PlayTimeTrackingSystem.cs # Content.Shared/Chemistry/EntitySystems/SharedInjectorSystem.cs # Content.Shared/Clothing/Components/ClothingComponent.cs # Content.Shared/Humanoid/HumanoidCharacterAppearance.cs # Content.Shared/Humanoid/SkinColor.cs # Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/bowl.yml
This commit is contained in:
@@ -5,14 +5,17 @@ using Content.Client.Guidebook.Richtext;
|
||||
using Content.Client.Message;
|
||||
using Content.Client.UserInterface.ControlExtensions;
|
||||
using Content.Shared.Body.Prototypes;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Chemistry.Reaction;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.Contraband;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -27,8 +30,10 @@ public sealed partial class GuideReagentEmbed : BoxContainer, IDocumentTag, ISea
|
||||
[Dependency] private readonly IEntitySystemManager _systemManager = default!;
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototype = default!;
|
||||
[Dependency] private readonly IConfigurationManager _config = default!;
|
||||
|
||||
private readonly ChemistryGuideDataSystem _chemistryGuideData;
|
||||
private readonly ContrabandSystem _contraband;
|
||||
private readonly ISawmill _sawmill;
|
||||
|
||||
public IPrototype? RepresentedPrototype { get; private set; }
|
||||
@@ -39,6 +44,7 @@ public sealed partial class GuideReagentEmbed : BoxContainer, IDocumentTag, ISea
|
||||
IoCManager.InjectDependencies(this);
|
||||
_sawmill = _logManager.GetSawmill("guidebook.reagent");
|
||||
_chemistryGuideData = _systemManager.GetEntitySystem<ChemistryGuideDataSystem>();
|
||||
_contraband = _systemManager.GetEntitySystem<ContrabandSystem>();
|
||||
MouseFilter = MouseFilterMode.Stop;
|
||||
}
|
||||
|
||||
@@ -204,6 +210,25 @@ public sealed partial class GuideReagentEmbed : BoxContainer, IDocumentTag, ISea
|
||||
description.PushNewline();
|
||||
description.AddMarkupOrThrow(Loc.GetString("guidebook-reagent-physical-description",
|
||||
("description", reagent.LocalizedPhysicalDescription)));
|
||||
|
||||
if (_config.GetCVar(CCVars.ContrabandExamine))
|
||||
{
|
||||
// Department-restricted text
|
||||
if (reagent.AllowedJobs.Count > 0 || reagent.AllowedDepartments.Count > 0)
|
||||
{
|
||||
description.PushNewline();
|
||||
description.AddMarkupPermissive(
|
||||
_contraband.GenerateDepartmentExamineMessage(reagent.AllowedDepartments, reagent.AllowedJobs, ContrabandItemType.Reagent));
|
||||
}
|
||||
// Other contraband text
|
||||
else if (reagent.ContrabandSeverity != null &&
|
||||
_prototype.Resolve(reagent.ContrabandSeverity.Value, out var severity))
|
||||
{
|
||||
description.PushNewline();
|
||||
description.AddMarkupPermissive(Loc.GetString(severity.ExamineText, ("type", ContrabandItemType.Reagent)));
|
||||
}
|
||||
}
|
||||
|
||||
ReagentDescription.SetMessage(description);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user