Merge remote-tracking branch 'upstream/stable' into ed-08-07-2025-upstream

# Conflicts:
#	Content.Server/Audio/ContentAudioSystem.cs
#	Content.Server/Medical/HealthAnalyzerSystem.cs
#	Content.Server/Shuttles/Systems/ShuttleSystem.cs
#	Resources/Locale/en-US/navmap-beacons/station-beacons.ftl
This commit is contained in:
Ed
2025-07-08 00:40:30 +03:00
920 changed files with 19950 additions and 9262 deletions

View File

@@ -67,12 +67,18 @@ public sealed class BinSystem : EntitySystem
private void OnEntInserted(Entity<BinComponent> ent, ref EntInsertedIntoContainerMessage args)
{
if (args.Container.ID != ent.Comp.ContainerId)
return;
ent.Comp.Items.Add(args.Entity);
}
private void OnEntRemoved(EntityUid uid, BinComponent component, EntRemovedFromContainerMessage args)
private void OnEntRemoved(Entity<BinComponent> ent, ref EntRemovedFromContainerMessage args)
{
component.Items.Remove(args.Entity);
if (args.Container.ID != ent.Comp.ContainerId)
return;
ent.Comp.Items.Remove(args.Entity);
}
private void OnInteractHand(EntityUid uid, BinComponent component, InteractHandEvent args)

View File

@@ -21,7 +21,7 @@ namespace Content.Shared.Storage.EntitySystems
private void CounterEntityInserted(EntityUid uid, ItemCounterComponent itemCounter,
EntInsertedIntoContainerMessage args)
{
if (!EntityManager.TryGetComponent(uid, out AppearanceComponent? appearanceComponent))
if (!TryComp(uid, out AppearanceComponent? appearanceComponent))
return;
var count = GetCount(args, itemCounter);
@@ -37,7 +37,7 @@ namespace Content.Shared.Storage.EntitySystems
private void CounterEntityRemoved(EntityUid uid, ItemCounterComponent itemCounter,
EntRemovedFromContainerMessage args)
{
if (!EntityManager.TryGetComponent(uid, out AppearanceComponent? appearanceComponent))
if (!TryComp(uid, out AppearanceComponent? appearanceComponent))
return;
var count = GetCount(args, itemCounter);

View File

@@ -34,7 +34,7 @@ public abstract class SharedItemMapperSystem : EntitySystem
val.Layer = layerName;
}
if (EntityManager.TryGetComponent(uid, out AppearanceComponent? appearanceComponent))
if (TryComp(uid, out AppearanceComponent? appearanceComponent))
{
var list = new List<string>(component.MapLayers.Keys);
_appearance.SetData(uid, StorageMapVisuals.InitLayers, new ShowLayerData(list), appearanceComponent);
@@ -67,7 +67,7 @@ public abstract class SharedItemMapperSystem : EntitySystem
if (!Resolve(uid, ref itemMapper))
return;
if (EntityManager.TryGetComponent(uid, out AppearanceComponent? appearanceComponent)
if (TryComp(uid, out AppearanceComponent? appearanceComponent)
&& TryGetLayers(uid, itemMapper, out var containedLayers))
{
_appearance.SetData(uid,

View File

@@ -696,7 +696,7 @@ public abstract class SharedStorageSystem : EntitySystem
return;
// If the user's active hand is empty, try pick up the item.
if (player.Comp.ActiveHandEntity == null)
if (!_sharedHandsSystem.TryGetActiveItem(player.AsNullable(), out var activeItem))
{
_adminLog.Add(
LogType.Storage,
@@ -716,11 +716,11 @@ public abstract class SharedStorageSystem : EntitySystem
_adminLog.Add(
LogType.Storage,
LogImpact.Low,
$"{ToPrettyString(player):player} is interacting with {ToPrettyString(item):item} while it is stored in {ToPrettyString(storage):storage} using {ToPrettyString(player.Comp.ActiveHandEntity):used}");
$"{ToPrettyString(player):player} is interacting with {ToPrettyString(item):item} while it is stored in {ToPrettyString(storage):storage} using {ToPrettyString(activeItem):used}");
// Else, interact using the held item
if (_interactionSystem.InteractUsing(player,
player.Comp.ActiveHandEntity.Value,
activeItem.Value,
item,
Transform(item).Coordinates,
checkCanInteract: false))
@@ -1215,10 +1215,10 @@ public abstract class SharedStorageSystem : EntitySystem
{
if (!Resolve(ent.Owner, ref ent.Comp)
|| !Resolve(player.Owner, ref player.Comp)
|| player.Comp.ActiveHandEntity == null)
|| !_sharedHandsSystem.TryGetActiveItem(player, out var activeItem))
return false;
var toInsert = player.Comp.ActiveHandEntity;
var toInsert = activeItem;
if (!CanInsert(ent, toInsert.Value, out var reason, ent.Comp))
{
@@ -1226,7 +1226,7 @@ public abstract class SharedStorageSystem : EntitySystem
return false;
}
if (!_sharedHandsSystem.CanDrop(player, toInsert.Value, player.Comp))
if (!_sharedHandsSystem.CanDrop(player, toInsert.Value))
{
_popupSystem.PopupClient(Loc.GetString("comp-storage-cant-drop", ("entity", toInsert.Value)), ent, player);
return false;
@@ -1946,7 +1946,7 @@ public abstract class SharedStorageSystem : EntitySystem
if (held)
{
if (!_sharedHandsSystem.IsHolding(player, itemUid, out _))
if (!_sharedHandsSystem.IsHolding(player.AsNullable(), itemUid, out _))
return false;
}
else