Merge remote-tracking branch 'upstream/master' into ed-27-09-2024-upstream
# Conflicts: # Content.Server/Explosion/EntitySystems/TriggerSystem.cs
This commit is contained in:
@@ -368,7 +368,9 @@ public abstract class SharedStorageSystem : EntitySystem
|
||||
if (args.Handled || !CanInteract(args.User, (uid, storageComp), storageComp.ClickInsert, false))
|
||||
return;
|
||||
|
||||
if (HasComp<PlaceableSurfaceComponent>(uid))
|
||||
var attemptEv = new StorageInteractUsingAttemptEvent();
|
||||
RaiseLocalEvent(uid, ref attemptEv);
|
||||
if (attemptEv.Cancelled)
|
||||
return;
|
||||
|
||||
if (_whitelistSystem.IsWhitelistPass(storageComp.CP14Ignorelist, args.Used))
|
||||
@@ -458,7 +460,7 @@ public abstract class SharedStorageSystem : EntitySystem
|
||||
}
|
||||
|
||||
//If there's only one then let's be generous
|
||||
if (_entList.Count > 1)
|
||||
if (_entList.Count >= 1)
|
||||
{
|
||||
var doAfterArgs = new DoAfterArgs(EntityManager, args.User, delay, new AreaPickupDoAfterEvent(GetNetEntityList(_entList)), uid, target: uid)
|
||||
{
|
||||
@@ -552,7 +554,7 @@ public abstract class SharedStorageSystem : EntitySystem
|
||||
|
||||
var angle = targetXform.LocalRotation;
|
||||
|
||||
if (PlayerInsertEntityInWorld((uid, component), args.Args.User, entity))
|
||||
if (PlayerInsertEntityInWorld((uid, component), args.Args.User, entity, playSound: false))
|
||||
{
|
||||
successfullyInserted.Add(entity);
|
||||
successfullyInsertedPositions.Add(position);
|
||||
@@ -1045,12 +1047,12 @@ public abstract class SharedStorageSystem : EntitySystem
|
||||
/// <param name="player">The player to insert an entity with</param>
|
||||
/// <param name="toInsert"></param>
|
||||
/// <returns>true if inserted, false otherwise</returns>
|
||||
public bool PlayerInsertEntityInWorld(Entity<StorageComponent?> uid, EntityUid player, EntityUid toInsert)
|
||||
public bool PlayerInsertEntityInWorld(Entity<StorageComponent?> uid, EntityUid player, EntityUid toInsert, bool playSound = true)
|
||||
{
|
||||
if (!Resolve(uid, ref uid.Comp) || !_interactionSystem.InRangeUnobstructed(player, uid.Owner))
|
||||
return false;
|
||||
|
||||
if (!Insert(uid, toInsert, out _, user: player, uid.Comp))
|
||||
if (!Insert(uid, toInsert, out _, user: player, uid.Comp, playSound: playSound))
|
||||
{
|
||||
_popupSystem.PopupClient(Loc.GetString("comp-storage-cant-insert"), uid, player);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user