Merge remote-tracking branch 'upstream/stable' into ed-27-05-2025-upstream-sync

# Conflicts:
#	.github/CODEOWNERS
#	Content.Client/Guidebook/Controls/GuideReagentReaction.xaml.cs
#	Content.IntegrationTests/Tests/Chemistry/TryAllReactionsTest.cs
#	Content.Server/Procedural/DungeonJob/DungeonJob.OreDunGen.cs
#	Resources/Prototypes/Entities/Effects/chemistry_effects.yml
#	Resources/Prototypes/Entities/Mobs/Customization/Markings/human_hair.yml
#	Resources/Prototypes/GameRules/meteorswarms.yml
#	Resources/Prototypes/Procedural/dungeon_configs.yml
This commit is contained in:
Ed
2025-05-27 12:21:14 +03:00
1165 changed files with 76878 additions and 44718 deletions

View File

@@ -1,3 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Examine;
using Content.Shared.Labels.Components;
@@ -150,6 +151,25 @@ public sealed partial class LabelSystem : EntitySystem
if (TryComp<PaperLabelTypeComponent>(slot.Item, out var type))
_appearance.SetData(ent, PaperLabelVisuals.LabelType, type.PaperType, ent.Comp2);
}
/// <summary>
/// Retrieves a label with the specified component from the default label slot.
/// </summary>
public bool TryGetLabel<T>(Entity<PaperLabelComponent?> ent, [NotNullWhen(true)] out Entity<T>? label) where T : Component
{
label = null;
if (!Resolve(ent, ref ent.Comp, false))
return false;
if (ent.Comp.LabelSlot.Item is not { } labelEnt)
return false;
if (!TryComp<T>(labelEnt, out var labelComp))
return false;
label = (labelEnt, labelComp);
return true;
}
}
//CP14 Labeling Event