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

# Conflicts:
#	.github/CODEOWNERS
#	Content.Client/UserInterface/Systems/Actions/Controls/ActionButton.cs
#	Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs
#	Content.Server/Chat/Systems/ChatSystem.cs
#	Content.Server/Explosion/EntitySystems/TriggerSystem.cs
#	Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs
#	Content.Shared/Lock/LockSystem.cs
#	Content.Shared/Nutrition/Components/FoodComponent.cs
#	Content.Shared/Speech/ListenEvent.cs
#	Resources/Prototypes/Entities/Effects/admin_triggers.yml
This commit is contained in:
Ed
2025-08-25 16:22:32 +03:00
1069 changed files with 42396 additions and 29527 deletions

View File

@@ -236,7 +236,14 @@ public abstract class SharedStorageSystem : EntitySystem
StoredItems = storedItems,
SavedLocations = component.SavedLocations,
Whitelist = component.Whitelist,
Blacklist = component.Blacklist
Blacklist = component.Blacklist,
QuickInsert = component.QuickInsert,
AreaInsert = component.AreaInsert,
StorageInsertSound = component.StorageInsertSound,
StorageRemoveSound = component.StorageRemoveSound,
StorageOpenSound = component.StorageOpenSound,
StorageCloseSound = component.StorageCloseSound,
DefaultStorageOrientation = component.DefaultStorageOrientation,
};
}
@@ -352,6 +359,44 @@ public abstract class SharedStorageSystem : EntitySystem
args.Verbs.Add(verb);
}
/// <summary>
/// Copy this component's datafields from one entity to another.
/// This can't use CopyComp because we don't want to copy the references to the items inside the storage.
/// <summary>
public void CopyComponent(Entity<StorageComponent?> source, EntityUid target)
{
if (!Resolve(source, ref source.Comp))
return;
var targetComp = EnsureComp<StorageComponent>(target);
targetComp.Grid = new List<Box2i>(source.Comp.Grid);
targetComp.MaxItemSize = source.Comp.MaxItemSize;
targetComp.QuickInsert = source.Comp.QuickInsert;
targetComp.QuickInsertCooldown = source.Comp.QuickInsertCooldown;
targetComp.OpenUiCooldown = source.Comp.OpenUiCooldown;
targetComp.ClickInsert = source.Comp.ClickInsert;
targetComp.OpenOnActivate = source.Comp.OpenOnActivate;
targetComp.AreaInsert = source.Comp.AreaInsert;
targetComp.AreaInsertRadius = source.Comp.AreaInsertRadius;
targetComp.Whitelist = source.Comp.Whitelist;
targetComp.Blacklist = source.Comp.Blacklist;
targetComp.StorageInsertSound = source.Comp.StorageInsertSound;
targetComp.StorageRemoveSound = source.Comp.StorageRemoveSound;
targetComp.StorageOpenSound = source.Comp.StorageOpenSound;
targetComp.StorageCloseSound = source.Comp.StorageCloseSound;
targetComp.DefaultStorageOrientation = source.Comp.DefaultStorageOrientation;
targetComp.HideStackVisualsWhenClosed = source.Comp.HideStackVisualsWhenClosed;
targetComp.SilentStorageUserTag = source.Comp.SilentStorageUserTag;
targetComp.ShowVerb = source.Comp.ShowVerb;
UpdateOccupied((target, targetComp));
Dirty(target, targetComp);
var targetUI = EnsureComp<UserInterfaceComponent>(target);
UI.SetUi((target, targetUI), StorageComponent.StorageUiKey.Key, new InterfaceData("StorageBoundUserInterface"));
}
/// <summary>
/// Tries to get the storage location of an item.
/// </summary>
@@ -1303,7 +1348,7 @@ public abstract class SharedStorageSystem : EntitySystem
Angle startAngle;
if (storageEnt.Comp.DefaultStorageOrientation == null)
{
startAngle = Angle.FromDegrees(-itemEnt.Comp.StoredRotation);
startAngle = Angle.Zero;
}
else
{
@@ -1970,15 +2015,17 @@ public abstract class SharedStorageSystem : EntitySystem
protected sealed class StorageComponentState : ComponentState
{
public Dictionary<NetEntity, ItemStorageLocation> StoredItems = new();
public Dictionary<string, List<ItemStorageLocation>> SavedLocations = new();
public List<Box2i> Grid = new();
public ProtoId<ItemSizePrototype>? MaxItemSize;
public EntityWhitelist? Whitelist;
public EntityWhitelist? Blacklist;
public bool QuickInsert;
public bool AreaInsert;
public SoundSpecifier? StorageInsertSound;
public SoundSpecifier? StorageRemoveSound;
public SoundSpecifier? StorageOpenSound;
public SoundSpecifier? StorageCloseSound;
public StorageDefaultOrientation? DefaultStorageOrientation;
}
}